Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

refactor&more (feel free to review, still improving docs and tests) #159

Merged
merged 229 commits into from Aug 24, 2018

Conversation

snd
Copy link
Contributor

@snd snd commented Apr 11, 2018

  • moved logic common to the 3 logical relay processes (main to side sign,
    side to main sign, side to main submit signatures) into RelayStream
    • RelayStream for any process that listens to a LogStream
      and executes transactions for each log
  • changed naming of deposit withdraw to be more neutral (for message passing)
    • rust only
  • resolved merge home/foreign authority addresses #154
  • moved contracts into separate subcrate
  • less future boilerplate
    • see helpers::AsyncCall and related changes to ethabi
  • use https://github.com/paritytech/rust_solc to compile contracts
  • use RPC instead of IPC so parity nodes and bridge nodes can exist on separate machines
  • change naming from home/foreign to main/side as the previous naming
    tended to confuse most people
  • bridge nodes now check whether they have provided signatures before doing so
    • doesn't crash when catching up from an old state file
  • adapted to upstream changes to various crates
  • couple things less to Config and Database
  • refactor database abstractions
  • MainContract and SideContract highlevel interfaces that are used by relay streams instead of scattering that logic throughout the relay streams
  • split relay streams into more focused individual relay futures and generic relay stream
  • remove App abstraction
  • finer logging
    • on the level of individual relays
  • provide context for more errors to make troubleshooting easier
  • add license headers add license header to every file #180
  • more docstrings
  • pin rust version on travis to not break rustfmt check randomly

@snd
Copy link
Contributor Author

snd commented May 2, 2018

still going down the refactoring rabbit hole ; ) lots of local changes still to be committed and pushed. though the end is in sight and i'm much more comfortable with the codebase

@snd snd changed the title refactor (work in progress) refactor&more (work in progress) May 2, 2018
@snd
Copy link
Contributor Author

snd commented Aug 22, 2018

almost done here. i'll give my go when all grumbles are fully addressed

main_to_side_sign: RelayStream<LogStream<T>, main_to_side_sign::LogToMainToSideSign<T>>,
side_to_main_sign: RelayStream<LogStream<T>, side_to_main_sign::LogToSideToMainSign<T>>,
side_to_main_signatures:
RelayStream<LogStream<T>, side_to_main_signatures::LogToSideToMainSignatures<T>>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be in the new line

pub contract: ContractConfig,
pub ipc: PathBuf,
pub http: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be configurable? ipc or http?

}

/// extends the `Stream` trait by the `last` function
pub trait StreamExt<I> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it used only in tests? if so, can you move it to cfg(test)?

@debris
Copy link
Contributor

debris commented Aug 24, 2018

let's get it in and resolve other issues separately

@debris debris merged commit d75443e into master Aug 24, 2018
@debris debris deleted the snd-refactor branch August 24, 2018 12:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

merge home/foreign authority addresses
3 participants