From cedbf398e70181b6e8cde6fa8ec058a06fc23338 Mon Sep 17 00:00:00 2001 From: StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> Date: Sat, 28 Mar 2026 14:53:31 +0300 Subject: [PATCH 1/4] feat(ethexe): bump foundry toolchain, add configurable gas, use only EIP-7594 txs --- .github/workflows/build.yml | 2 +- .github/workflows/check.yml | 2 +- ethexe/cli/src/commands/tx.rs | 28 +++++++++++++++++++++++++--- ethexe/ethereum/src/router/mod.rs | 9 ++------- ethexe/service/src/tests/mod.rs | 1 + 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9589e47c2a2..2440d5582d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -283,7 +283,7 @@ jobs: - name: "Install: Foundry" uses: foundry-rs/foundry-toolchain@v1 with: - version: v1.5.1 + version: nightly-c07d504b4ae67754584f4e05ff0c547a43c50f7b - name: "Show: Versioning" run: | diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 6b9bad2ad79..12e7b66457f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -65,7 +65,7 @@ jobs: - name: "Install: Foundry" uses: foundry-rs/foundry-toolchain@v1 with: - version: v1.5.1 + version: nightly-c07d504b4ae67754584f4e05ff0c547a43c50f7b - name: "Install: Node.js" uses: actions/setup-node@v4 diff --git a/ethexe/cli/src/commands/tx.rs b/ethexe/cli/src/commands/tx.rs index 9165942298d..e249c882204 100644 --- a/ethexe/cli/src/commands/tx.rs +++ b/ethexe/cli/src/commands/tx.rs @@ -219,6 +219,14 @@ pub struct TxCommand { #[arg(long, alias = "eth-router")] pub ethereum_router: Option
, + /// Ethereum EIP-1559 fee increase percentage (from "medium"). + #[arg(long, alias = "eth-eip1559-fee-increase-percentage")] + pub eip1559_fee_increase_percentage: Option, + + /// Ethereum blob gas multiplier. + #[arg(long, alias = "eth-blob-gas-multiplier")] + pub blob_gas_multiplier: Option, + /// Sender address or public key to use. Must have a corresponding private key in the key store. #[arg(long)] pub sender: Option
, @@ -248,6 +256,19 @@ impl TxCommand { .take() .or_else(|| params.ethereum.as_ref().and_then(|p| p.ethereum_router)); + self.eip1559_fee_increase_percentage = + self.eip1559_fee_increase_percentage.take().or_else(|| { + params + .ethereum + .as_ref() + .and_then(|p| p.eip1559_fee_increase_percentage) + }); + + self.blob_gas_multiplier = self + .blob_gas_multiplier + .take() + .or_else(|| params.ethereum.as_ref().and_then(|p| p.blob_gas_multiplier)); + self } @@ -277,14 +298,15 @@ impl TxCommand { let sender = self.sender.ok_or_else(|| anyhow!("missing `sender`"))?; - // INCREASED_BLOB_GAS_MULTIPLIER (TODO: from config, default is increased) let ethereum = Ethereum::new( &rpc, router_addr, signer.clone(), sender, - NO_EIP1559_FEE_INCREASE_PERCENTAGE, - INCREASED_BLOB_GAS_MULTIPLIER, + self.eip1559_fee_increase_percentage + .unwrap_or(NO_EIP1559_FEE_INCREASE_PERCENTAGE), + self.blob_gas_multiplier + .unwrap_or(INCREASED_BLOB_GAS_MULTIPLIER), ) .await .with_context(|| "failed to create Ethereum client")?; diff --git a/ethexe/ethereum/src/router/mod.rs b/ethexe/ethereum/src/router/mod.rs index 7dbce7e866d..6ca6e0b28ce 100644 --- a/ethexe/ethereum/src/router/mod.rs +++ b/ethexe/ethereum/src/router/mod.rs @@ -143,16 +143,11 @@ impl Router { ) -> Result<(TransactionReceipt, CodeId)> { let code_id = CodeId::generate(code); - let chain_id = self.instance.provider().get_chain_id().await?; let builder = self .instance .requestCodeValidation(code_id.into_bytes().into()); - let builder = if chain_id == 31337 { - // TODO: remove when https://github.com/foundry-rs/foundry/pull/12404 is merged - builder.sidecar(SidecarBuilder::::from_slice(code).build()?) - } else { - builder.sidecar_7594(SidecarBuilder::::from_slice(code).build_7594()?) - }; + let builder = + builder.sidecar_7594(SidecarBuilder::::from_slice(code).build_7594()?); let receipt = builder .send() diff --git a/ethexe/service/src/tests/mod.rs b/ethexe/service/src/tests/mod.rs index 1d77ec25f80..a19c53ea51b 100644 --- a/ethexe/service/src/tests/mod.rs +++ b/ethexe/service/src/tests/mod.rs @@ -82,6 +82,7 @@ use tokio::sync::{ const ETHER: u128 = 1_000_000_000_000_000_000; +#[ignore = "until rpc fixed"] #[tokio::test] async fn basics() { init_logger(); From 642c8d1de92562f1a9b5b1af2787e45dbf5cb7a4 Mon Sep 17 00:00:00 2001 From: StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> Date: Sat, 28 Mar 2026 15:23:14 +0300 Subject: [PATCH 2/4] trigger CI From 73860078cccf1b537dd7d2a74e8a045e48480e77 Mon Sep 17 00:00:00 2001 From: StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> Date: Sat, 28 Mar 2026 17:44:05 +0300 Subject: [PATCH 3/4] fix merge --- ethexe/service/src/tests/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/ethexe/service/src/tests/mod.rs b/ethexe/service/src/tests/mod.rs index 7b80d33747e..d5137605e17 100644 --- a/ethexe/service/src/tests/mod.rs +++ b/ethexe/service/src/tests/mod.rs @@ -72,7 +72,6 @@ use tokio::sync::{ const ETHER: u128 = 1_000_000_000_000_000_000; -#[ignore = "until rpc fixed"] #[tokio::test] #[ntest::timeout(30_000)] async fn invalid_code() { From 0a62c1b6dd437f0df5f8a458a231138b1ea4f0de Mon Sep 17 00:00:00 2001 From: StackOverflowExcept1on <109800286+StackOverflowExcept1on@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:29:47 +0300 Subject: [PATCH 4/4] fix features for alloy_primitives --- ethexe/common/Cargo.toml | 2 +- ethexe/common/src/injected.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ethexe/common/Cargo.toml b/ethexe/common/Cargo.toml index 9e1fbcc8841..4a815e7db5d 100644 --- a/ethexe/common/Cargo.toml +++ b/ethexe/common/Cargo.toml @@ -8,7 +8,7 @@ homepage.workspace = true repository.workspace = true [dependencies] -alloy-primitives.workspace = true +alloy-primitives = { workspace = true, features = ["serde"] } gear-core.workspace = true sp-core.workspace = true gprimitives.workspace = true diff --git a/ethexe/common/src/injected.rs b/ethexe/common/src/injected.rs index 015c3c9213a..c6443831344 100644 --- a/ethexe/common/src/injected.rs +++ b/ethexe/common/src/injected.rs @@ -214,7 +214,7 @@ mod serde_hex { where S: serde::Serializer, { - alloy_primitives::hex::serialize(data.to_vec(), serializer) + alloy_primitives::serde_hex::serialize(data.to_vec(), serializer) } pub fn deserialize<'de, D, const N: usize>( @@ -223,7 +223,7 @@ mod serde_hex { where D: serde::Deserializer<'de>, { - let vec: Vec = alloy_primitives::hex::deserialize(deserializer)?; + let vec: Vec = alloy_primitives::serde_hex::deserialize(deserializer)?; super::LimitedVec::::try_from(vec) .map_err(|_| serde::de::Error::custom("LimitedVec deserialization overflow")) }