Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f74d1cb
feat: add retry mechanism for failed rewards messages via Snowbridge
stiiifff Feb 27, 2026
21d05f6
fix: use EitherOfDiverse<Root, GeneralAdmin> for GovernanceOrigin
stiiifff Feb 27, 2026
6b79d63
Merge branch 'main' into sde-retry-unset-rewards
stiiifff Feb 27, 2026
22f9fcd
chore: ♻ update metadata
stiiifff Feb 27, 2026
8053eff
chore: ♻ cargo fmt
stiiifff Feb 27, 2026
045bd90
Merge branch 'main' into sde-retry-unset-rewards
gonzamontiel Mar 2, 2026
08ef78c
Merge branch 'main' into sde-retry-unset-rewards
stiiifff Mar 3, 2026
e680632
feat: ✨ Bump client version to v0.26.0 and runtime to RT1400 (#465)
stiiifff Mar 3, 2026
0f6b83e
refactor: remove the unused pallet-staking from dependencies (#466)
undercover-cactus Mar 4, 2026
38e9293
build: ⬆️ upgrade to StorageHub v0.4.3 (#468)
TDemeco Mar 4, 2026
5b26088
feat(slashes): typed offence kinds, Perbill-to-WAD conversion, histor…
stiiifff Mar 4, 2026
6a2eb38
fix(e2e): stabilize submitter CI and local relayer startup (#470)
ahmadkaouk Mar 6, 2026
fe8d65a
fix: Register the snowbridge agent in the Dathaven Service instead of…
undercover-cactus Mar 9, 2026
a484f93
chore: ♻ update metadata
stiiifff Mar 11, 2026
57c148e
Merge branch 'main' into sde-retry-unset-rewards
stiiifff Mar 11, 2026
450c172
chore: ♻ update metadata
stiiifff Mar 11, 2026
8c443be
fix: include PoC base cost estimation in create()
gonzamontiel Mar 11, 2026
639e407
Merge branch 'main' into fix/frontier-add-pov-to-create
gonzamontiel Mar 11, 2026
cfda13d
fix: include PoC base cost estimation in create()
gonzamontiel Mar 11, 2026
b3c95f9
style: format
gonzamontiel Mar 12, 2026
ed005a3
Merge branch 'main' into fix/frontier-add-pov-to-create
gonzamontiel Mar 12, 2026
cdf438d
test: fix gas expectation
gonzamontiel Mar 16, 2026
201ebbe
fix(tests): update gas estimation expectations after PoV base cost
gonzamontiel Mar 16, 2026
ebc0b56
Merge branch 'main' into fix/frontier-add-pov-to-create
gonzamontiel Mar 16, 2026
59a6814
Merge branch 'main' into fix/frontier-add-pov-to-create
gonzamontiel Mar 26, 2026
b6c8096
Merge branch 'main' into fix/frontier-add-pov-to-create
gonzamontiel Mar 30, 2026
a6d84a9
Merge branch 'main' into fix/frontier-add-pov-to-create
gonzamontiel Apr 14, 2026
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
27 changes: 23 additions & 4 deletions operator/runtime/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,8 @@ impl_runtime_apis! {
access_list: Option<Vec<(H160, Vec<H256>)>>,
authorization_list: Option<AuthorizationList>,
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
use pallet_evm::GasWeightMapping as _;

let config = if estimate {
let mut config = <Runtime as pallet_evm::Config>::config().clone();
config.estimate = true;
Expand All @@ -1132,6 +1134,16 @@ impl_runtime_apis! {
let is_transactional = false;
let validate = true;

// Estimated encoded transaction size for create (EIP1559-style) for PoV validation.
// Base: from 20 + value 32 + gas_limit 32 + nonce 32 + action variant 1 + chain_id 8 + signature 65 = 190.
let mut estimated_transaction_len = data.len()
+ 190
+ if max_fee_per_gas.is_some() { 32 } else { 0 }
+ if max_priority_fee_per_gas.is_some() { 32 } else { 0 };
if let Some(ref list) = access_list {
estimated_transaction_len += list.encode().len();
}

let gas_limit = if gas_limit > U256::from(u64::MAX) {
u64::MAX
} else {
Expand All @@ -1141,8 +1153,14 @@ impl_runtime_apis! {
let without_base_extrinsic_weight = true;
let weight_limit = <Runtime as pallet_evm::Config>::GasWeightMapping::gas_to_weight(
gas_limit,
without_base_extrinsic_weight
without_base_extrinsic_weight,
);
let (weight_limit, proof_size_base_cost) =
if weight_limit.proof_size() > 0 {
(Some(weight_limit), Some(estimated_transaction_len as u64))
} else {
(None, None)
};

#[allow(clippy::or_fun_call)]
<Runtime as pallet_evm::Config>::Runner::create(
Expand All @@ -1157,10 +1175,11 @@ impl_runtime_apis! {
authorization_list.unwrap_or_default(),
is_transactional,
validate,
Some(weight_limit),
None,
weight_limit,
proof_size_base_cost,
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
).map_err(|err| err.error.into())
)
.map_err(|err| err.error.into())
}

fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
Expand Down
27 changes: 23 additions & 4 deletions operator/runtime/stagenet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,8 @@ impl_runtime_apis! {
access_list: Option<Vec<(H160, Vec<H256>)>>,
authorization_list: Option<AuthorizationList>,
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
use pallet_evm::GasWeightMapping as _;

let config = if estimate {
let mut config = <Runtime as pallet_evm::Config>::config().clone();
config.estimate = true;
Expand All @@ -1134,6 +1136,16 @@ impl_runtime_apis! {
let is_transactional = false;
let validate = true;

// Estimated encoded transaction size for create (EIP1559-style) for PoV validation.
// Base: from 20 + value 32 + gas_limit 32 + nonce 32 + action variant 1 + chain_id 8 + signature 65 = 190.
let mut estimated_transaction_len = data.len()
+ 190
+ if max_fee_per_gas.is_some() { 32 } else { 0 }
+ if max_priority_fee_per_gas.is_some() { 32 } else { 0 };
if let Some(ref list) = access_list {
estimated_transaction_len += list.encode().len();
}

let gas_limit = if gas_limit > U256::from(u64::MAX) {
u64::MAX
} else {
Expand All @@ -1143,8 +1155,14 @@ impl_runtime_apis! {
let without_base_extrinsic_weight = true;
let weight_limit = <Runtime as pallet_evm::Config>::GasWeightMapping::gas_to_weight(
gas_limit,
without_base_extrinsic_weight
without_base_extrinsic_weight,
);
let (weight_limit, proof_size_base_cost) =
if weight_limit.proof_size() > 0 {
(Some(weight_limit), Some(estimated_transaction_len as u64))
} else {
(None, None)
};

#[allow(clippy::or_fun_call)]
<Runtime as pallet_evm::Config>::Runner::create(
Expand All @@ -1159,10 +1177,11 @@ impl_runtime_apis! {
authorization_list.unwrap_or_default(),
is_transactional,
validate,
Some(weight_limit),
None,
weight_limit,
proof_size_base_cost,
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
).map_err(|err| err.error.into())
)
.map_err(|err| err.error.into())
}

fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
Expand Down
13 changes: 13 additions & 0 deletions operator/runtime/stagenet/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,16 @@ fn validate_transaction_fails_on_filtered_call() {
);
});
}

/// Sanity-check for the create transaction size estimation used in EthereumRuntimeRPCApi::create
/// for proof_size_base_cost (see Frontier template). Ensures the base constant stays correct.
#[test]
fn ethereum_create_proof_size_base_cost_estimation_constants() {
// Base size for create tx (EIP1559-style): from 20 + value 32 + gas_limit 32 + nonce 32
// + action variant 1 + chain_id 8 + signature 65 = 190. Optional: +32 per max_fee/max_priority_fee.
const BASE: usize = 20 + 32 + 32 + 32 + 1 + 8 + 65;
assert_eq!(
BASE, 190,
"create proof_size_base_cost base must match Frontier template"
);
}
27 changes: 23 additions & 4 deletions operator/runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,8 @@ impl_runtime_apis! {
access_list: Option<Vec<(H160, Vec<H256>)>>,
authorization_list: Option<AuthorizationList>,
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
use pallet_evm::GasWeightMapping as _;

let config = if estimate {
let mut config = <Runtime as pallet_evm::Config>::config().clone();
config.estimate = true;
Expand All @@ -1132,6 +1134,16 @@ impl_runtime_apis! {
let is_transactional = false;
let validate = true;

// Estimated encoded transaction size for create (EIP1559-style) for PoV validation.
// Base: from 20 + value 32 + gas_limit 32 + nonce 32 + action variant 1 + chain_id 8 + signature 65 = 190.
let mut estimated_transaction_len = data.len()
+ 190
+ if max_fee_per_gas.is_some() { 32 } else { 0 }
+ if max_priority_fee_per_gas.is_some() { 32 } else { 0 };
if let Some(ref list) = access_list {
estimated_transaction_len += list.encode().len();
}

let gas_limit = if gas_limit > U256::from(u64::MAX) {
u64::MAX
} else {
Expand All @@ -1141,8 +1153,14 @@ impl_runtime_apis! {
let without_base_extrinsic_weight = true;
let weight_limit = <Runtime as pallet_evm::Config>::GasWeightMapping::gas_to_weight(
gas_limit,
without_base_extrinsic_weight
without_base_extrinsic_weight,
);
let (weight_limit, proof_size_base_cost) =
if weight_limit.proof_size() > 0 {
(Some(weight_limit), Some(estimated_transaction_len as u64))
} else {
(None, None)
};

#[allow(clippy::or_fun_call)]
<Runtime as pallet_evm::Config>::Runner::create(
Expand All @@ -1157,10 +1175,11 @@ impl_runtime_apis! {
authorization_list.unwrap_or_default(),
is_transactional,
validate,
Some(weight_limit),
None,
weight_limit,
proof_size_base_cost,
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
).map_err(|err| err.error.into())
)
.map_err(|err| err.error.into())
}

fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describeSuite({
account: ALITH_ADDRESS,
data: bytecode
})
).to.equal(210541n);
).to.equal(156082n);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ describeSuite({
data: bytecode,
gasPrice: 0n
});
expect(result).to.equal(255341n);
expect(result).to.equal(172902n);

const result2 = await context.viem().estimateGas({
account: ALITH_ADDRESS,
data: bytecode
});
expect(result2).to.equal(255341n);
expect(result2).to.equal(172902n);
}
});

Expand Down Expand Up @@ -129,7 +129,7 @@ describeSuite({
account: PRECOMPILE_BATCH_ADDRESS,
data: bytecode
})
).toBe(210541n);
).toBe(156082n);
}
});

Expand Down
Loading