Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charleth support #19

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
support for charleth
  • Loading branch information
mateuszaaa committed Jul 4, 2024
commit 3c1c68a556eac45e437034564441d9a4db9d7977
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,8 @@ where
// there might be some txs comming in that time - so its better to sleep than
// shortening remaining time
debug!(target: LOG_TARGET, "sleeping by the end of the slot");
first_slot_limit.await;
//TODO: figure out better fix
// first_slot_limit.await;

// artificially simulate that block is half filled
// also include header & proof cost for the second part to make sure
Expand Down
26 changes: 16 additions & 10 deletions substrate/client/cli/src/commands/run_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,44 +149,48 @@ pub struct RunCmd {
pub keystore_params: KeystoreParams,

/// Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore.
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one", "two"])]
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one", "two", "baltathar", "charleth"])]
pub alith: bool,

/// Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore.
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one", "two"])]
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one", "two", "alith", "charleth"])]
pub baltathar: bool,

/// Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore.
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one", "two", "alith", "charleth"])]
pub baltathar: bool,

/// Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore.
#[arg(long, conflicts_with_all = &["bob", "charlie", "dave", "eve", "ferdie", "one", "two", "alith", "baltathar"])]
#[arg(long, conflicts_with_all = &["bob", "charlie", "dave", "eve", "ferdie", "one", "two", "alith", "baltathar", "charleth"])]
pub alice: bool,

/// Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore.
#[arg(long, conflicts_with_all = &["alice", "charlie", "dave", "eve", "ferdie", "one", "two", "alith", "baltathar"])]
#[arg(long, conflicts_with_all = &["alice", "charlie", "dave", "eve", "ferdie", "one", "two", "alith", "baltathar", "charleth"])]
pub bob: bool,

/// Shortcut for `--name Charlie --validator` with session keys for `Charlie` added to
/// keystore.
#[arg(long, conflicts_with_all = &["alice", "bob", "dave", "eve", "ferdie", "one", "two", "alith", "baltathar"])]
#[arg(long, conflicts_with_all = &["alice", "bob", "dave", "eve", "ferdie", "one", "two", "alith", "baltathar", "charleth"])]
pub charlie: bool,

/// Shortcut for `--name Dave --validator` with session keys for `Dave` added to keystore.
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "eve", "ferdie", "one", "two", "alith", "baltathar"])]
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "eve", "ferdie", "one", "two", "alith", "baltathar", "charleth"])]
pub dave: bool,

/// Shortcut for `--name Eve --validator` with session keys for `Eve` added to keystore.
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "ferdie", "one", "two", "alith", "baltathar"])]
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "ferdie", "one", "two", "alith", "baltathar", "charleth"])]
pub eve: bool,

/// Shortcut for `--name Ferdie --validator` with session keys for `Ferdie` added to keystore.
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "one", "two", "alith", "baltathar"])]
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "one", "two", "alith", "baltathar", "charleth"])]
pub ferdie: bool,

/// Shortcut for `--name One --validator` with session keys for `One` added to keystore.
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "two", "alith", "baltathar"])]
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "two", "alith", "baltathar", "charleth"])]
pub one: bool,

/// Shortcut for `--name Two --validator` with session keys for `Two` added to keystore.
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one", "alith", "baltathar"])]
#[arg(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one", "alith", "baltathar", "charleth"])]
pub two: bool,

/// Enable authoring even when offline.
Expand All @@ -212,6 +216,8 @@ impl RunCmd {
Some(Alith)
} else if self.baltathar {
Some(Baltathar)
} else if self.charleth {
Some(Charleth)
} else if self.alice {
Some(Alice)
} else if self.bob {
Expand Down
2 changes: 2 additions & 0 deletions substrate/primitives/keyring/src/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub enum Keyring {
Two,
Alith,
Baltathar,
Charleth,
}

impl Keyring {
Expand Down Expand Up @@ -110,6 +111,7 @@ impl From<Keyring> for &'static str {
Keyring::Two => "Two",
Keyring::Alith => "Alith",
Keyring::Baltathar => "Baltathar",
Keyring::Charleth => "Charleth,
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions substrate/primitives/keyring/src/sr25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub enum Keyring {
Two,
Alith,
Baltathar,
Charleth,
}

impl Keyring {
Expand Down Expand Up @@ -120,6 +121,7 @@ impl From<Keyring> for &'static str {
Keyring::Two => "Two",
Keyring::Alith => "Alith",
Keyring::Baltathar => "Baltathar",
Keyring::Charleth => "Charleth",
}
}
}
Expand Down Expand Up @@ -154,6 +156,7 @@ impl std::str::FromStr for Keyring {
"two" => Ok(Keyring::Two),
"Alith" => Ok(Keyring::Alith),
"Baltathar" => Ok(Keyring::Baltathar),
"Charleth" => Ok(Keyring::Charleth),
_ => Err(ParseKeyringError),
}
}
Expand Down
Loading