Skip to content

Commit

Permalink
Merge branch 'main' into refactor/output-privkey-to-file
Browse files Browse the repository at this point in the history
  • Loading branch information
Halimao authored Jul 11, 2024
2 parents 614f95c + 5757558 commit 8731c28
Show file tree
Hide file tree
Showing 35 changed files with 5,804 additions and 215 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

17 changes: 9 additions & 8 deletions crates/astria-cli/src/commands/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ use astria_core::{
InitBridgeAccountAction,
SudoAddressChangeAction,
TransferAction,
ValidatorUpdate,
},
TransactionParams,
UnsignedTransaction,
},
};
use astria_sequencer_client::{
tendermint,
tendermint_rpc::endpoint,
Client,
HttpClient,
Expand Down Expand Up @@ -425,13 +425,14 @@ pub(crate) async fn sudo_address_change(args: &SudoAddressChangeArgs) -> eyre::R
/// * If the http client cannot be created
/// * If the transaction failed to be submitted
pub(crate) async fn validator_update(args: &ValidatorUpdateArgs) -> eyre::Result<()> {
let public_key_raw = hex::decode(args.validator_public_key.as_str())
.wrap_err("failed to decode public key into bytes")?;
let pub_key = tendermint::PublicKey::from_raw_ed25519(&public_key_raw)
.expect("failed to parse public key from parsed bytes");
let validator_update = tendermint::validator::Update {
pub_key,
power: args.power.into(),
let verification_key = astria_core::crypto::VerificationKey::try_from(
&*hex::decode(&args.validator_public_key)
.wrap_err("failed to decode public key bytes from argument")?,
)
.wrap_err("failed to construct public key from bytes")?;
let validator_update = ValidatorUpdate {
power: args.power,
verification_key,
};

let res = submit_transaction(
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-core/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl From<[u8; 32]> for SigningKey {
}

/// An Ed25519 verification key.
#[derive(Clone)]
#[derive(Clone, Copy)]
pub struct VerificationKey {
key: Ed25519VerificationKey,
}
Expand Down
186 changes: 186 additions & 0 deletions crates/astria-core/src/generated/astria.composer.v1alpha1.serde.rs

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

Loading

0 comments on commit 8731c28

Please sign in to comment.