Skip to content

Conversation

@pgherveou
Copy link
Contributor

@pgherveou pgherveou commented Jan 26, 2026

Summary

  • Makes the weight_limit field in TransactionLimits::EthereumGas non-optional, enforcing bounded execution on all Ethereum-style calls
  • Updates dry_run_eth_transact to use evm_max_extrinsic_weight() as the weight limit, preventing unbounded computation during dry-run RPC calls
  • Simplifies metering code by removing Option handling for weight limits in Ethereum execution mode

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Jan 26, 2026

User @claude, please sign the CLA here.

@0xRVE 0xRVE added the T7-smart_contracts This PR/Issue is related to smart contracts. label Jan 26, 2026
@0xRVE
Copy link
Contributor

0xRVE commented Jan 26, 2026

/cmd prdoc --audience runtime_dev --bump patch

Copy link
Contributor

@0xRVE 0xRVE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI needs to be fixed

// no need to limit weight here, we will check later whether it exceeds
// evm_max_extrinsic_weight
maybe_weight_limit: None,
weight_limit: Self::evm_max_extrinsic_weight(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only crucial change in this PR, the other changes are all logically implied when changing from optional weight to weight.

This change looks good to me but I was not sure for a second whether this also needs to cover the deposit cost. But I remember it doesn't (please confirm).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Away from keyboard will check in a bit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes in Substrate mode weight and deposit are tracked separetly

@pgherveou pgherveou enabled auto-merge January 30, 2026 13:05
@pgherveou
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump patch

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/21517076337
Failed job name: cargo-clippy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T7-smart_contracts This PR/Issue is related to smart contracts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants