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

bump astria and penumbra deps #3

Closed
wants to merge 3 commits into from
Closed
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
48 changes: 25 additions & 23 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions crates/relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ ibc-proto = { version = "0.41.0", features = ["serde"] }
ibc-telemetry = { version = "0.26.4", path = "../telemetry", optional = true }
ibc-relayer-types = { version = "0.26.4", path = "../relayer-types", features = ["mocks"] }

astria-core = { git = "https://github.com/astriaorg/astria", rev = "21cc874ca499c1f4afa8576f8640a9c8deac7690" }
astria-sequencer-client = { git = "https://github.com/astriaorg/astria", rev = "21cc874ca499c1f4afa8576f8640a9c8deac7690", features = [ "http" ] }
astria-core = { git = "https://github.com/astriaorg/astria", rev = "8f261a4cadc9631f319b1872c2afdc64812d2ca4" }
astria-sequencer-client = { git = "https://github.com/astriaorg/astria", rev = "8f261a4cadc9631f319b1872c2afdc64812d2ca4", features = [ "http" ] }
ed25519-consensus = "2.1.0"
ibc-types = "0.12.0"
jmt = "0.6"
penumbra-ibc = { git = "https://github.com/penumbra-zone/penumbra.git", tag = "v0.69.1", default-features = false }
penumbra-proto = { git = "https://github.com/penumbra-zone/penumbra.git", tag = "v0.69.1" }
penumbra-ibc = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "8b06546af43bf073fd99f3f9d82b8afb51872489", default-features = false }
penumbra-proto = { git = "https://github.com/penumbra-zone/penumbra.git", rev = "8b06546af43bf073fd99f3f9d82b8afb51872489" }
pbjson-types = "0.6"

subtle-encoding = "0.5"
Expand Down
24 changes: 13 additions & 11 deletions crates/relayer/src/chain/astria/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,12 @@ impl AstriaEndpoint {

async fn broadcast_messages(&mut self, tracked_msgs: TrackedMsgs) -> Result<TxResponse, Error> {
use astria_core::{
generated::sequencer::v1::Ics20Withdrawal as RawIcs20Withdrawal,
sequencer::v1::{
transaction::{
action::Ics20Withdrawal,
Action,
},
Address,
generated::protocol::transaction::v1alpha1::Ics20Withdrawal as RawIcs20Withdrawal,
primitive::v1::Address,
protocol::transaction::v1alpha1::{
action::Ics20Withdrawal,
Action,
TransactionParams,
UnsignedTransaction,
},
};
Expand Down Expand Up @@ -268,7 +267,7 @@ impl AstriaEndpoint {
actions.push(Action::Ibc(non_raw));
}

let signing_key: ed25519_consensus::SigningKey =
let signing_key: astria_core::crypto::SigningKey =
(*self.get_key()?.signing_key().as_bytes()).into(); // TODO cache this
let address = Address::from_verification_key(signing_key.verification_key());
let nonce = self
Expand All @@ -278,7 +277,10 @@ impl AstriaEndpoint {
.map_err(|e| Error::other(Box::new(e)))?;

let unsigned_tx = UnsignedTransaction {
nonce: nonce.nonce,
params: TransactionParams {
nonce: nonce.nonce,
chain_id: self.config.id().to_string(),
},
actions,
};

Expand Down Expand Up @@ -586,7 +588,7 @@ impl ChainEndpoint for AstriaEndpoint {
_key_name: Option<&str>,
denom: Option<&str>,
) -> Result<Balance, Error> {
use astria_core::sequencer::v1::account::AssetBalance;
use astria_core::protocol::account::v1alpha1::AssetBalance;
use astria_sequencer_client::{
Address,
SequencerClientExt as _,
Expand All @@ -599,7 +601,7 @@ impl ChainEndpoint for AstriaEndpoint {
.block_on(self.sequencer_client.get_latest_balance(address))
.map_err(|e| Error::other(Box::new(e)))?;

let denom = denom.unwrap_or(astria_core::sequencer::v1::asset::DEFAULT_NATIVE_ASSET_DENOM);
let denom = denom.unwrap_or(astria_core::primitive::v1::asset::DEFAULT_NATIVE_ASSET_DENOM);

let balance: Vec<AssetBalance> = balance
.balances
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer/src/keyring/ed25519_key_pair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl SigningKeyPair for Ed25519KeyPair {
bs58::encode(&self.signing_key.verifying_key()).into_string()
}
Ed25519AddressType::Astria => {
hex::encode(astria_core::sequencer::v1::Address::from_verification_key(
hex::encode(astria_core::primitive::v1::Address::from_verification_key(
ed25519_consensus::VerificationKey::try_from(
self.signing_key.verifying_key().to_bytes(),
)
Expand Down
15 changes: 11 additions & 4 deletions crates/relayer/src/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,21 +195,27 @@ fn build_transfer_message_astria(
timeout_height: TimeoutHeight,
timeout_timestamp: Timestamp,
) -> Any {
use astria_core::sequencer::v1::asset::default_native_asset_id;
use astria_core::{
generated::protocol::transaction::v1alpha1::{
IbcHeight,
Ics20Withdrawal,
},
primitive::v1::asset::default_native_asset_id,
};

let timeout_height = match timeout_height {
// TODO: update astria IbcHeight to support optional?
TimeoutHeight::At(height) => astria_core::generated::sequencer::v1::IbcHeight {
TimeoutHeight::At(height) => IbcHeight {
revision_number: height.revision_number(),
revision_height: height.revision_height(),
},
TimeoutHeight::Never => astria_core::generated::sequencer::v1::IbcHeight {
TimeoutHeight::Never => IbcHeight {
revision_number: 0,
revision_height: u64::MAX,
},
};

let msg = astria_core::generated::sequencer::v1::Ics20Withdrawal {
let msg = Ics20Withdrawal {
source_channel: src_channel_id.to_string(),
denom: denom,
amount: Some(
Expand All @@ -222,6 +228,7 @@ fn build_transfer_message_astria(
timeout_height: Some(timeout_height),
timeout_time: timeout_timestamp.nanoseconds(),
fee_asset_id: default_native_asset_id().as_ref().to_vec(),
memo: "".to_string(),
};

Any {
Expand Down
2 changes: 1 addition & 1 deletion tools/test-framework/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description = """
ibc-relayer-types = { version = "=0.26.4", path = "../../crates/relayer-types" }
ibc-relayer = { version = "=0.26.4", path = "../../crates/relayer" }
ibc-relayer-cli = { version = "=1.7.4", path = "../../crates/relayer-cli" }
ibc-proto = { version = "0.40.0", features = ["serde"] }
ibc-proto = { version = "0.41.0", features = ["serde"] }
tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] }

http = "0.2.9"
Expand Down
Loading