-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
It looks like @seunlanlege signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
blocked on #4842 |
What is the motivation for this change? Would be nice to have a write up either here or in an issue. |
|
#4842 has been merged. Updating this PR is going to be fun 😁 call me if you need any help @seunlanlege |
…substrate into seun-sc-cli-subkey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I now complained 2 times (this being the third time) that the SharedParams
is added by all the cli commands. I understand that this is a current requirement of the API, however this needs to be changed if this pr should be merged.
The following command makes no sense:
cargo run -p node-cli -- verify --dev SIGNATURE
And there are also other cli commands that follow this schema.
A CLI command should never require arguments that are useless for the given command.
.map_err(|e| Error::Other(format!("{:?}", e)))?; | ||
|
||
Ok(()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.map_err(|e| Error::Other(format!("{:?}", e)))?; | |
Ok(()) | |
.map_err(|e| Error::Other(format!("{:?}", e)).into()) |
.maintain/prometheus.yml
Outdated
@@ -0,0 +1,5 @@ | |||
scrape_configs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
Heyyyyy sorry about this, my strategy for removing unused- |
…line to Cargo.toml
|
||
use crate::{Error, NetworkSchemeFlag}; | ||
use std::fs; | ||
use libp2p::identity::{PublicKey, ed25519}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious as to why we're using ed25519 specific types from libp2p
.
pub fn run(&self) -> Result<(), Error> { | ||
let mut file_content = hex::decode(fs::read(&self.file)?) | ||
.map_err(|_| "failed to decode secret as hex")?; | ||
let secret = ed25519::SecretKey::from_bytes(&mut file_content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this command only usable for ed25519? would it make sense to generalize this so that i can also get the public key from an sr25519
file for example? I saw the CryptoScheme
earlier and i think it can be used here to receive an additional argument for the crypto scheme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for now, we only support ed25519, see
substrate/client/cli/src/arg_enums.rs
Lines 80 to 86 in 0079140
arg_enum! { | |
#[allow(missing_docs)] | |
#[derive(Debug, Copy, Clone, PartialEq, Eq)] | |
pub enum NodeKeyType { | |
Ed25519 | |
} | |
} |
client/cli/src/commands/tests.rs
Outdated
use super::{SignCmd, VanityCmd}; | ||
use structopt::StructOpt; | ||
|
||
#[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you take each of these 2 tests into their respective command modules?
client/cli/src/commands/tests.rs
Outdated
assert!(sign.run().is_ok()); | ||
} | ||
|
||
#[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@seunlanlege test is failing and it seems polkadot pr needs updating. |
bot merge |
Trying merge. |
see #4416