client fix: filter buggy transaction not included in the ethereum block#3267
Merged
client fix: filter buggy transaction not included in the ethereum block#3267
Conversation
Contributor
WASM runtime size check:Compared to target branchMoonbase runtime: 2372 KB (-56 KB) ✅ Moonbeam runtime: 2356 KB (-56 KB) ✅ Moonriver runtime: 2348 KB (-60 KB) ✅ Compared to latest release (runtime-3600)Moonbase runtime: 2372 KB (+416 KB compared to latest release) Moonbeam runtime: 2356 KB (+412 KB compared to latest release) Moonriver runtime: 2348 KB (+408 KB compared to latest release) |
RomarQ
reviewed
Apr 23, 2025
Contributor
RomarQ
reviewed
Apr 23, 2025
RomarQ
reviewed
Apr 23, 2025
Contributor
There was a problem hiding this comment.
There are conditions where the traces from XCM calls will be at index 0. For example, when calling PolkadotXcm.transferAssets. For those situations, this fix will not work.
Sandwich scenario:
Trace 1 (XCM Originated) ◀️ `PolkadotXcm.transferAssets` call
Trace 2 (Standard ethereum call)
Trace 3 (XCM Originated) ◀️ XCM message processed by the `on_idle` hook in the `MessageQueue`.
02a4e0c to
1f73907
Compare
8e8ed9f to
f12fefc
Compare
RomarQ
reviewed
Apr 30, 2025
RomarQ
previously approved these changes
May 2, 2025
Contributor
RomarQ
left a comment
There was a problem hiding this comment.
pnpm check:fix should fix the CI
stiiifff
previously approved these changes
May 5, 2025
Contributor
|
This can be merged once the conflicts and |
RomarQ
reviewed
May 13, 2025
stiiifff
approved these changes
May 13, 2025
RomarQ
approved these changes
May 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ethereum-XCM transactions that revert are no longer included in block trace.
What does it do?
Filter out transactions generated in the trace but not included in the Ethereum block.
When an eth-xcm transaction reverts, it is not included in the Ethereum block.
Filtering out these buggy transactions ensures consistency between the
debug_traceBlock*andeth_getBlock*RPC methods.The implementation require to keep track of a
tx_position_offsetand increment it each time we encounter a trace taht doesn't match the expected status (from field are not equal).Theoretically, it's might be possible to have a buggy transaction and a successful eth-xcm transaction in a raw that have the same caller (=from field), but in practice it never happens and this fix is only for old blocks.
What important points should reviewers know?
This PR add a tracing test
test/suites/tracing-tests/test-trace-erc20-xcm-2.ts.Is there something left for follow-up PRs?
What alternative implementations were considered?
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
What value does it bring to the blockchain users?