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

Sync stand-alone binary and feature-gated dependencies refactoring #1637

Merged
merged 19 commits into from
Jul 18, 2016

Conversation

NikVolf
Copy link
Contributor

@NikVolf NikVolf commented Jul 16, 2016

No description provided.

@NikVolf NikVolf added A0-pleasereview 🤓 Pull request needs code review. A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. labels Jul 16, 2016
@coveralls
Copy link

coveralls commented Jul 16, 2016

Coverage Status

Coverage increased (+0.04%) to 76.259% when pulling ac8db8f on sync-svc into 6441759 on master.

@NikVolf NikVolf changed the title Sync stand-alone binary and rpc dependencies refactoring Sync stand-alone binary and feature-gated dependencies refactoring Jul 16, 2016
@coveralls
Copy link

coveralls commented Jul 16, 2016

Coverage Status

Coverage increased (+0.09%) to 76.314% when pulling a74b72f on sync-svc into 6441759 on master.


run_service("ipc:///tmp/parity-sync.ipc", stop.clone(), &(sync.clone() as Arc<SyncProvider>));
run_service("ipc:///tmp/parity-manage-net.ipc", stop.clone(), &(sync.clone() as Arc<ManageNetwork>));
run_service("ipc:///tmp/parity-sync-notify.ipc", stop.clone(), &(sync.clone() as Arc<ChainNotify>));
Copy link
Contributor

Choose a reason for hiding this comment

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

why pass by reference here at all? you are cloning just so you can pass by-ref just so run_service can clone again?

@NikVolf NikVolf added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 16, 2016
use nanoipc::*;
use ethsync::{SyncProvider, SyncConfig, EthSync, ManageNetwork, NetworkConfiguration};
use std::thread;
use util::numbers::*;
Copy link
Contributor

@rphmeier rphmeier Jul 16, 2016

Choose a reason for hiding this comment

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

seems like just U256 is used here? prefer without glob import. atomic is only used for AtomicBool and Ordering.
nanoipc is used for Worker, but that's referenced explicitly from nanoipc

@NikVolf NikVolf added the A0-pleasereview 🤓 Pull request needs code review. label Jul 16, 2016
@NikVolf NikVolf removed the A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. label Jul 16, 2016
@NikVolf
Copy link
Contributor Author

NikVolf commented Jul 16, 2016

@rphmeier
all issues addressed, really helpful, thanx!

@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 16, 2016
@NikVolf NikVolf removed the A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. label Jul 16, 2016
@coveralls
Copy link

coveralls commented Jul 16, 2016

Coverage Status

Coverage increased (+0.03%) to 76.251% when pulling 9eed51e on sync-svc into 6441759 on master.

--public-address IP Public address.
--boot-nodes LIST List of boot nodes.
--reserved-nodes LIST List of reserved peers,
--secret HEX Use node key hash
Copy link
Contributor

Choose a reason for hiding this comment

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

if this is passed on the CLI, won't it be visible to anyone able to run ps? maybe better to pass via stdin/out.

@gavofyork gavofyork added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A8-looksgood 🦄 Pull request is reviewed well. labels Jul 17, 2016
@NikVolf
Copy link
Contributor Author

NikVolf commented Jul 17, 2016

@gavofyork i moved hashing of secret to the sync side, so ps-runner won't get any new information

@NikVolf NikVolf added A0-pleasereview 🤓 Pull request needs code review. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Jul 17, 2016
@coveralls
Copy link

coveralls commented Jul 17, 2016

Coverage Status

Coverage increased (+0.1%) to 76.334% when pulling a44e95b on sync-svc into 6441759 on master.

@@ -38,6 +38,7 @@ use std::thread;
use util::numbers::{U256, H256};
use std::str::FromStr;
use nanoipc::IpcInterface;
use util::sha3::*;
Copy link
Contributor

Choose a reason for hiding this comment

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

only used for Hashable trait?

@NikVolf NikVolf mentioned this pull request Jul 18, 2016
@NikVolf
Copy link
Contributor Author

NikVolf commented Jul 18, 2016

@rphmeier updated

@coveralls
Copy link

coveralls commented Jul 18, 2016

Coverage Status

Coverage increased (+0.002%) to 76.449% when pulling 028d6f6 on sync-svc into 3d00a91 on master.

@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 18, 2016
@arkpar
Copy link
Collaborator

arkpar commented Jul 18, 2016

lgtm, although I don't like the idea of passing network config on the command line. It should be serialized much as other type so we don't have to worry about IPC when adding a new config option.

@NikVolf
Copy link
Contributor Author

NikVolf commented Jul 18, 2016

@arkpar #1657

@NikVolf NikVolf merged commit 18f1661 into master Jul 18, 2016
@NikVolf NikVolf deleted the sync-svc branch July 18, 2016 15:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants