Skip to content

Commit

Permalink
merge w main
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Mar 5, 2025
2 parents 3cf4a53 + 2ae3b64 commit 541442d
Show file tree
Hide file tree
Showing 39 changed files with 1,835 additions and 953 deletions.
1,784 changes: 931 additions & 853 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ itoa = "1.0.10"
jsonrpsee = { version = "0.20" }
pbjson-types = "0.6"
# Note that when updating the penumbra versions, vendored types in `proto/sequencerapis/astria_vendored` may need to be updated as well.
# can update to a tagged version when https://github.com/penumbra-zone/penumbra/commit/ac7abacc9bb09503d6fd6a396bc0b6850079084e is released
penumbra-ibc = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "ac7abacc9bb09503d6fd6a396bc0b6850079084e", default-features = false }
penumbra-proto = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "ac7abacc9bb09503d6fd6a396bc0b6850079084e" }
penumbra-tower-trace = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "ac7abacc9bb09503d6fd6a396bc0b6850079084e" }
penumbra-ibc = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "686fa5b53e8ad306736d2de61d1ffb6d11722e2b", default-features = false }
penumbra-proto = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "686fa5b53e8ad306736d2de61d1ffb6d11722e2b" }
penumbra-tower-trace = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "686fa5b53e8ad306736d2de61d1ffb6d11722e2b" }
pin-project-lite = "0.2.13"
prost = "0.12"
rand = "0.8.5"
Expand Down
3 changes: 3 additions & 0 deletions crates/astria-cli/src/sequencer/sudo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use color_eyre::eyre;
mod fee_asset;
mod ibc_relayer;
mod ibc_sudo_change;
mod recover_ibc_client;
mod sudo_address_change;
mod validator_update;

Expand All @@ -19,6 +20,7 @@ impl Command {
SubCommand::FeeAsset(fee_asset) => fee_asset.run().await,
SubCommand::SudoAddressChange(sudo_address_change) => sudo_address_change.run().await,
SubCommand::ValidatorUpdate(validator_update) => validator_update.run().await,
SubCommand::RecoverIbcClient(recover_ibc_client) => recover_ibc_client.run().await,
SubCommand::IbcSudoAddressChange(ibc_sudo_address_change) => {
ibc_sudo_address_change.run().await
}
Expand All @@ -32,5 +34,6 @@ enum SubCommand {
FeeAsset(fee_asset::Command),
SudoAddressChange(sudo_address_change::Command),
ValidatorUpdate(validator_update::Command),
RecoverIbcClient(recover_ibc_client::Command),
IbcSudoAddressChange(ibc_sudo_change::Command),
}
58 changes: 58 additions & 0 deletions crates/astria-cli/src/sequencer/sudo/recover_ibc_client.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
use astria_core::protocol::transaction::v1::{
action::RecoverIbcClient,
Action,
};
use color_eyre::eyre::{
self,
WrapErr as _,
};

use crate::utils::submit_transaction;

#[derive(Debug, clap::Args)]
pub(super) struct Command {
/// The bech32m prefix that will be used for constructing addresses using the private key
#[arg(long, default_value = "astria")]
prefix: String,
// TODO: https://github.com/astriaorg/astria/issues/594
// Don't use a plain text private, prefer wrapper like from
// the secrecy crate with specialized `Debug` and `Drop` implementations
// that overwrite the key on drop and don't reveal it when printing.
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")]
private_key: String,
/// The url of the Sequencer node
#[arg(long, env = "SEQUENCER_URL")]
sequencer_url: String,
/// The chain id of the sequencing chain being used
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")]
sequencer_chain_id: String,

/// The client id of the client to be replaced
#[arg(long)]
client_id: String,

/// The client id of the client to replace the subject client
#[arg(long)]
replacement_client_id: String,
}

impl Command {
pub(super) async fn run(self) -> eyre::Result<()> {
let res = submit_transaction(
self.sequencer_url.as_str(),
self.sequencer_chain_id.clone(),
&self.prefix,
self.private_key.as_str(),
Action::RecoverIbcClient(RecoverIbcClient {
client_id: self.client_id.parse()?,
replacement_client_id: self.replacement_client_id.parse()?,
}),
)
.await
.wrap_err("failed to submit RecoverIbcClient transaction")?;

println!("RecoverIbcClient completed!");
println!("Included in block: {}", res.height);
Ok(())
}
}
15 changes: 15 additions & 0 deletions crates/astria-core/src/generated/astria.protocol.fees.v1.rs

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

108 changes: 108 additions & 0 deletions crates/astria-core/src/generated/astria.protocol.fees.v1.serde.rs

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

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

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

36 changes: 34 additions & 2 deletions crates/astria-core/src/generated/astria.protocol.transaction.v1.rs

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

Loading

0 comments on commit 541442d

Please sign in to comment.