feat(exec): skip recoverable invalid transactions via fallback - #111
Merged
Conversation
AshinGau
force-pushed
the
feat/skipped-transaction-fallback
branch
3 times, most recently
from
July 16, 2026 03:41
876f9c5 to
97888e1
Compare
AshinGau
force-pushed
the
feat/skipped-transaction-fallback
branch
from
July 20, 2026 01:57
97888e1 to
60678c7
Compare
AshinGau
force-pushed
the
feat/skipped-transaction-fallback
branch
from
July 20, 2026 03:12
60678c7 to
dedf9cc
Compare
nekomoto911
approved these changes
Jul 21, 2026
nekomoto911
pushed a commit
to Galxe/gravity-reth
that referenced
this pull request
Jul 28, 2026
## Background follow Galxe/grevm#111, resolve Galxe/gravity-audit#838 Gravity uses pipeline execution: consensus may build the next block before the previous block has been committed by the execution layer. A transaction that passed the consensus-side filter can therefore become invalid against the final execution state—for example, an EIP-7702 delegated call may change another account's nonce before that account's transaction is executed. Previously, recoverable errors such as nonce mismatch or insufficient balance were returned as block-level execution errors. This could stop block execution and leave the validator without a safe way to handle a transaction that consensus had already included. ## Design This PR adds a last-resort execution-layer safeguard for recoverable invalid transactions: - grevm classifies a fixed set of recoverable transaction errors and returns `TxExecutionOutcome::Skipped(reason)`. - If parallel execution encounters one of these errors, grevm rolls back the speculative execution and re-executes the block through its sequential fallback. - gravity-reth keeps the transaction in the block but applies it as a no-op: no state changes and no gas charged. - A skipped transaction receives a failed receipt with unchanged cumulative gas and one versioned `GravityTxSkipped(uint16,uint16)` log. - The log uses a protocol-reserved emitter address so indexers and operators can reliably identify the transaction and decode its skip reason. - Unknown transaction errors, database errors, and commit errors remain fatal instead of being silently skipped. - The `disable_grevm` path uses the same grevm sequential executor, keeping skipped-transaction semantics identical across both execution modes. Skipped transactions remain persisted and queryable through Ethereum RPC by transaction hash and receipt. Execution continues with subsequent transactions in the block. ## Validation - Added receipt encoding and decoding tests. - Added executor tests covering skipped transactions, zero gas usage, unchanged state, and continued execution. - Added EIP-7702 pipeline end-to-end tests for both parallel grevm and `disable_grevm` modes. - Upgraded grevm to the revision that provides recoverable-error classification and sequential fallback behavior.
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.
Summary
Validation