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

Print public key of the SS node on start #8949

Merged
merged 1 commit into from
Jun 22, 2018
Merged

Conversation

svyatonik
Copy link
Collaborator

Background:

  • every SS node should have a key pair;
  • every SS node should know every other node public key;
  • the self_secret config option could be: a 64-char secret key or the 40-char address of the account (on this node) that is used to sign/encrypt messages.

Getting the node' public key is especially hard in the 2nd case - afaik we do not have an RPC for getting the account public (it could be recovered from the signature, but it is too hard anyway). So I usually use ./ethstore public <address> in my scripts. But as @Tbaut has suggested it still isn't the best way to describe in the private transactions tutorial. So I suggest to print it on start (similar to how we're printing enode). This is for --features secretstore only, so won't spoil usual output:

2018-06-22 10:31:26  main INFO parity::secretstore::server  Starting SecretStore node: 0xcac6c205eb06c8308d65156ff6c862c62b000b8ead121a4455a8ddeff7248128d895692136f240d5d1614dc7cc4147b1bd584bd617e30560bb872064d09ea325
2018-06-22 10:31:26  main WARN parity::secretstore::server  Running SecretStore with disabled ACL check: everyone has access to stored keys

@svyatonik svyatonik added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Jun 22, 2018
@5chdn 5chdn added this to the 1.12 milestone Jun 22, 2018
@@ -165,6 +161,11 @@ mod server {
None => return Err("self secret is required when using secretstore".into()),
};

info!("Starting SecretStore node: {}", White.bold().paint(format!("{:?}", self_secret.public())));
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about being explicit here and say Starting SecretStore node with pub key: {}?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd like to keep it as short as possible (this line is already too long) - not sure if that gives any additional information :) But could replace, if you insist it is better :)

@5chdn 5chdn added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jun 22, 2018
@5chdn 5chdn merged commit 796d72f into master Jun 22, 2018
@5chdn 5chdn deleted the secretstore_print_self_public branch June 22, 2018 10:50
dvdplm added a commit that referenced this pull request Jun 22, 2018
* master:
  Add type for passwords. (#8920)
  deps: bump fs-swap (#8953)
  Eliminate some more `transmute()` (#8879)
  Restrict vault.json permssion to owner and using random suffix for temp vault.json file (#8932)
  print SS.self_public when starting SS node (#8949)
  scripts: minor improvements (#8930)
ordian added a commit to ordian/parity that referenced this pull request Jun 27, 2018
…rp_sync_on_light_client

* 'master' of https://github.com/paritytech/parity:
  deps: bump fs-swap (openethereum#8953)
  Eliminate some more `transmute()` (openethereum#8879)
  Restrict vault.json permssion to owner and using random suffix for temp vault.json file (openethereum#8932)
  print SS.self_public when starting SS node (openethereum#8949)
  scripts: minor improvements (openethereum#8930)
  rpc: cap gas limit of local calls (openethereum#8943)
  docs: update changelogs (openethereum#8931)
  ethcore: fix compilation when using slow-blocks or evm-debug features (openethereum#8936)
  fixed blooms dir creation (openethereum#8941)
  Update hardcoded headers (openethereum#8925)
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. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants