Repository navigation
Trace EIP-8130 transactions (type 0x79) - #35
Merged
Merged
Conversation
Temporary until streamingfast/evm-firehose-tracer-rs#38 and streamingfast/reth#74 are released.
Fill aa_trx_input from the envelope, record the payer's fees and the protocol writes from the journal around the root call, and record the committed phase count on the receipt.
sduchesneau
added this pull request to stack #38
October 20, 2026 20:09
sduchesneau
marked this pull request as ready for review
October 20, 2026 20:14
sduchesneau
requested review from
maoueh
and removed request for
UlysseCorbeil
October 20, 2026 21:06
maoueh
approved these changes
Oct 21, 2026
maoueh
left a comment
There was a problem hiding this comment.
Approving with small things to check.
Comment on lines
+102
to
+119
| /// Number of phases that committed in the statuses recorded by the most recent | ||
| /// [`Self::set`] on this thread, leaving them in place for [`Self::take`]. Phases stop at | ||
| /// the first revert, so this is the count of leading `0x01` statuses. Returns 0 in `no_std` | ||
| /// builds. | ||
| #[cfg(feature = "std")] | ||
| pub fn committed_phases() -> u64 { | ||
| PHASE_STATUSES | ||
| .with(|cell| cell.borrow().iter().take_while(|status| **status == 0x01).count() as u64) | ||
| } | ||
|
|
||
| /// Number of phases that committed in the statuses recorded by the most recent | ||
| /// [`Self::set`] on this thread, leaving them in place for [`Self::take`]. Phases stop at | ||
| /// the first revert, so this is the count of leading `0x01` statuses. Returns 0 in `no_std` | ||
| /// builds. | ||
| #[cfg(not(feature = "std"))] | ||
| pub const fn committed_phases() -> u64 { | ||
| 0 | ||
| } |
There was a problem hiding this comment.
We could think of upstreaming that, also they seem to use "short" name for everything take, push, etc so I would say that count seems more appropriate if we suggest an upstream modification.
There was a problem hiding this comment.
Or a plain borrow and we count outside of it, also count is indeed "wrong", would need to be committed_count or something like
Comment on lines
+239
to
+243
| panic!( | ||
| "Firehose cannot trace transaction {}: an EIP-8130 transaction reached the EVM \ | ||
| without its envelope", | ||
| tx_event.hash | ||
| ); |
There was a problem hiding this comment.
The trace has specialized "panic" which logs block number/trx hash/tracer state in general, can you look to check if they could be used here instead of plain panics (it's not clear but probably it reachable)
The executor rejects such a transaction and the block is discarded. Also counts the committed phases in the hook from a copy of the statuses.
…nsaction-type # Conflicts: # CHANGELOG.sf.md # Cargo.lock # Cargo.toml
Picks up the fix for an account whose balance changes twice in one journal read.
Lists the fee credits in settlement order, makes the hook public, moves the harness imports to the top and drops formatting changes to untouched lines.
A payer that is also the beneficiary, nonce-free mode, a failure in the first phase and a call refused for lack of new-account gas.
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.
Implements the plan in #24 on top of streamingfast/evm-firehose-tracer-rs#38 and streamingfast/reth#74, using the block model from streamingfast/firehose-ethereum#262.
OpPreTxAdjustfillsaccount_abstraction_trx_inputfrom the envelope (nonce key, resolved payer, validity window, metadata, delegation, phases), setsv/r/sfromsender_authandtoto empty, and installsRootJournalReasons: payerGasBuy/GasRefund, then the fee vaults and the beneficiaryRewardTransactionFee, in the ordersettle_feescredits them. Keystore account changes (Zenith only) stop the node with a clear error; Trace the Keystore account changes #37 records them.OpPostTxExtrasrecordscommitted_phases, counted fromEip8130PhaseStatuses::peek()(a copy of the statuses, read before the receipt builder takes them), and skips the OP vault emissions, which the journal already carries for this type.base-firehose-tests:run_blockruns signed transactions on an in-code genesis. Theeip8130tests on an Everest genesis cover a failed middle phase, a failure in the first phase, a named payer with a nonce channel, nonce-free mode, a delegation, a call refused for lack of new-account gas, a payer that is also the beneficiary, and an open payer signature that does not recover, withBlockInvariantson each block.Uses
firehose-tracer5.7.0 from crates.io and thestreamingfast/rethtagbase-v2.5.2.8-fh3.1-2(streamingfast/reth#74, base#75 and base#79).Not covered yet: the Docker
firehose_everestsystem test and the in-process Everest action tests.