Skip to content

Fix: Ethereum extrinsic size is accounted twice for proof size#1568

Open
pLabarta wants to merge 1 commit intopolkadot-evm:masterfrom
moonbeam-foundation:pablo/cp-deduplicate-eth-ext-size-in-proof
Open

Fix: Ethereum extrinsic size is accounted twice for proof size#1568
pLabarta wants to merge 1 commit intopolkadot-evm:masterfrom
moonbeam-foundation:pablo/cp-deduplicate-eth-ext-size-in-proof

Conversation

@pLabarta
Copy link
Copy Markdown
Contributor

Ethereum extrinsic size is accounted twice for proof size, this PR substracts that cost once.

@pLabarta pLabarta marked this pull request as ready for review December 20, 2024 13:14
@pLabarta pLabarta requested a review from sorpaas as a code owner December 20, 2024 13:14
@conr2d
Copy link
Copy Markdown
Contributor

conr2d commented Dec 25, 2024

IIUC, the Ethereum extrinsic size is accounted for twice:

  • Additional Gas is applied based on the Ethereum transaction size, which is then converted through GasWeightMapping.
  • The size is also accounted for in SelfContainedCall's CheckWeight.

Is my understanding correct? Since SelfContainedCall isn’t designed to be used exclusively with pallet-ethereum, unconditionally subtracting it from actual_weight could result in unexpected behavior. Should we consider adding conditions or refining the logic here?

@boundless-forest
Copy link
Copy Markdown
Collaborator

#1490 (comment) Check this for some deep thought behind this change. I need more time to figure out if this is the best solution.

@RomarQ
Copy link
Copy Markdown
Collaborator

RomarQ commented May 9, 2025

This could possibly be solved in this PR: #1633

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants