fix: e2e passes with escalator enabled

pull/3852/head
Daniel Savu 5 months ago
parent 044338fe11
commit 528f3dad9a
No known key found for this signature in database
GPG Key ID: 795E587829AF7E08
  1. 44
      rust/Cargo.lock
  2. 10
      rust/Cargo.toml
  3. 3
      rust/chains/hyperlane-ethereum/src/rpc_clients/trait_builder.rs
  4. 4
      rust/utils/run-locally/src/invariants.rs

44
rust/Cargo.lock generated

@ -2715,7 +2715,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers" name = "ethers"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"ethers-addressbook", "ethers-addressbook",
"ethers-contract", "ethers-contract",
@ -2729,7 +2729,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers-addressbook" name = "ethers-addressbook"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"ethers-core", "ethers-core",
"once_cell", "once_cell",
@ -2740,7 +2740,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers-contract" name = "ethers-contract"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"ethers-contract-abigen", "ethers-contract-abigen",
"ethers-contract-derive", "ethers-contract-derive",
@ -2758,7 +2758,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers-contract-abigen" name = "ethers-contract-abigen"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"Inflector", "Inflector",
"cfg-if", "cfg-if",
@ -2782,7 +2782,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers-contract-derive" name = "ethers-contract-derive"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"ethers-contract-abigen", "ethers-contract-abigen",
"ethers-core", "ethers-core",
@ -2796,7 +2796,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers-core" name = "ethers-core"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bytes", "bytes",
@ -2826,7 +2826,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers-etherscan" name = "ethers-etherscan"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"ethers-core", "ethers-core",
"getrandom 0.2.12", "getrandom 0.2.12",
@ -2842,7 +2842,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers-middleware" name = "ethers-middleware"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"auto_impl 0.5.0", "auto_impl 0.5.0",
@ -2851,6 +2851,7 @@ dependencies = [
"ethers-etherscan", "ethers-etherscan",
"ethers-providers", "ethers-providers",
"ethers-signers", "ethers-signers",
"futures-channel",
"futures-locks", "futures-locks",
"futures-util", "futures-util",
"instant", "instant",
@ -2890,7 +2891,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers-providers" name = "ethers-providers"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"auto_impl 1.1.0", "auto_impl 1.1.0",
@ -2926,7 +2927,7 @@ dependencies = [
[[package]] [[package]]
name = "ethers-signers" name = "ethers-signers"
version = "1.0.2" version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-05-27#950dd3480ce9c4aeca6ebcbb1eb0d735b9908676" source = "git+https://github.com/hyperlane-xyz/ethers-rs?branch=dan/gas-escalator-upstream-merge#35fd3c1f69142edfa3445b2e47a4b266af1b0418"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"coins-bip32", "coins-bip32",
@ -3908,6 +3909,12 @@ dependencies = [
"unicode-segmentation", "unicode-segmentation",
] ]
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]] [[package]]
name = "hermit-abi" name = "hermit-abi"
version = "0.1.19" version = "0.1.19"
@ -4244,7 +4251,8 @@ dependencies = [
"serde_json", "serde_json",
"sha3 0.10.8", "sha3 0.10.8",
"solana-sdk", "solana-sdk",
"strum 0.25.0", "strum 0.26.3",
"strum_macros 0.26.4",
"thiserror", "thiserror",
"tiny-keccak 2.0.2", "tiny-keccak 2.0.2",
"tokio", "tokio",
@ -7042,7 +7050,7 @@ dependencies = [
"reqwest", "reqwest",
"serde", "serde",
"serde_json", "serde_json",
"strum 0.25.0", "strum 0.26.3",
"thiserror", "thiserror",
"tokio", "tokio",
"tokio-metrics", "tokio-metrics",
@ -9518,11 +9526,11 @@ dependencies = [
[[package]] [[package]]
name = "strum" name = "strum"
version = "0.25.0" version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
dependencies = [ dependencies = [
"strum_macros 0.25.3", "strum_macros 0.26.4",
] ]
[[package]] [[package]]
@ -9552,11 +9560,11 @@ dependencies = [
[[package]] [[package]]
name = "strum_macros" name = "strum_macros"
version = "0.25.3" version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
dependencies = [ dependencies = [
"heck 0.4.1", "heck 0.5.0",
"proc-macro2 1.0.76", "proc-macro2 1.0.76",
"quote 1.0.35", "quote 1.0.35",
"rustversion", "rustversion",

@ -196,27 +196,27 @@ cosmwasm-schema = "1.2.7"
[workspace.dependencies.ethers] [workspace.dependencies.ethers]
features = [] features = []
git = "https://github.com/hyperlane-xyz/ethers-rs" git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-05-27" branch = "dan/gas-escalator-upstream-merge"
[workspace.dependencies.ethers-contract] [workspace.dependencies.ethers-contract]
features = ["legacy"] features = ["legacy"]
git = "https://github.com/hyperlane-xyz/ethers-rs" git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-05-27" branch = "dan/gas-escalator-upstream-merge"
[workspace.dependencies.ethers-core] [workspace.dependencies.ethers-core]
features = [] features = []
git = "https://github.com/hyperlane-xyz/ethers-rs" git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-05-27" branch = "dan/gas-escalator-upstream-merge"
[workspace.dependencies.ethers-providers] [workspace.dependencies.ethers-providers]
features = [] features = []
git = "https://github.com/hyperlane-xyz/ethers-rs" git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-05-27" branch = "dan/gas-escalator-upstream-merge"
[workspace.dependencies.ethers-signers] [workspace.dependencies.ethers-signers]
features = ["aws"] features = ["aws"]
git = "https://github.com/hyperlane-xyz/ethers-rs" git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-05-27" branch = "dan/gas-escalator-upstream-merge"
[patch.crates-io.curve25519-dalek] [patch.crates-io.curve25519-dalek]
branch = "v3.2.2-relax-zeroize" branch = "v3.2.2-relax-zeroize"

@ -221,6 +221,7 @@ pub trait BuildableWithProvider {
let signing_provider = wrap_with_signer(provider, signer.clone()).await; let signing_provider = wrap_with_signer(provider, signer.clone()).await;
let gas_escalator_provider = let gas_escalator_provider =
wrap_with_gas_escalator(signing_provider, &conn.transaction_overrides); wrap_with_gas_escalator(signing_provider, &conn.transaction_overrides);
// let signing_provider = wrap_with_signer(provider, signer.clone()).await;
// let nonce_manager_provider = wrap_with_nonce_manager(gas_escalator_provider, signer) // let nonce_manager_provider = wrap_with_nonce_manager(gas_escalator_provider, signer)
// .await // .await
// .map_err(ChainCommunicationError::from_other)?; // .map_err(ChainCommunicationError::from_other)?;
@ -298,7 +299,7 @@ where
fn wrap_with_gas_escalator<M>( fn wrap_with_gas_escalator<M>(
provider: M, provider: M,
tx_overrides: &TransactionOverrides, tx_overrides: &TransactionOverrides,
) -> GasEscalatorMiddleware<M, GeometricGasPrice> ) -> GasEscalatorMiddleware<M>
where where
M: Middleware + 'static, M: Middleware + 'static,
{ {

@ -77,7 +77,9 @@ pub fn termination_invariants_met(
// in which case more gas expenditure logs than messages are expected. // in which case more gas expenditure logs than messages are expected.
assert!( assert!(
gas_expenditure_log_count as u32 >= total_messages_expected, gas_expenditure_log_count as u32 >= total_messages_expected,
"Didn't record gas payment for all delivered messages" "Didn't record gas payment for all delivered messages. Got {} gas payment logs, expected at least {}",
gas_expenditure_log_count,
total_messages_expected
); );
let gas_payment_sealevel_events_count = fetch_metric( let gas_payment_sealevel_events_count = fetch_metric(

Loading…
Cancel
Save