Add EIP-8130 firehose tracing preparation notes - #24
Conversation
| ## Impact on the Firehose block model (`sf/ethereum/type/v2/type.proto`) | ||
|
|
||
| 1. **New `Type` enum value.** Nothing maps 0x79. Suggest | ||
| `TRX_TYPE_BASE_EIP8130 = 121`, following the convention of matching the |
There was a problem hiding this comment.
Question would be if likely this transaction is going to be the same ultimately on Mainnet. Knowning that in advance we could make an inform decision by using a type shared across all Ethereum, like we have for DynamicFee and AccessList tx, etc.
This is unsure to me if the format stay the same, maybe we make the bet that mostly all elements will be similar on each network.
| 2. **Transaction fields that don't fit the current message.** | ||
| `TransactionTrace.nonce` is `uint64`, but 8130 has a 256-bit `nonce_key` | ||
| plus `nonce_sequence`. There is no `to` (a phase/call list instead), no | ||
| `value`, no v/r/s (opaque auth blobs), and new concepts: `payer`, validity | ||
| window, `metadata`, `account_changes` (create / config change / delegation | ||
| entries — structurally similar to how `set_code_authorizations` was added | ||
| for EIP-7702). This needs a new set of fields or a sub-message, populated | ||
| only for this type, like the blob and set-code precedents. |
There was a problem hiding this comment.
Question is how much of current fields are retained?
If the majority of fields are re-used and that some are no empty/zero in the new type, I vote that we introduce new fields like we did over time.
Feel those should not be named base_ because most probably they will keep same semantic.
| entries — structurally similar to how `set_code_authorizations` was added | ||
| for EIP-7702). This needs a new set of fields or a sub-message, populated | ||
| only for this type, like the blob and set-code precedents. | ||
| 3. **Receipt.** `phaseStatuses` is not part of the consensus receipt, but the |
There was a problem hiding this comment.
Document states that phaseStatuses is for inflight receipt exchanged between components, Firehose indexer only ever technically run executed transaction in a block, so probably means we should ignore.
If it has execution impact, happy to revisit.
| transaction produces *multiple top-level frames* (one per call, grouped | ||
| into phases), and a transaction can be `SUCCEEDED` while individual phases | ||
| reverted (cross-phase durability). `state_reverted` per call can express | ||
| the reverted phases, but consumers' "root call #0" processing rules break; |
There was a problem hiding this comment.
Yeah a multi root call would be the ideal solution.
In EIP 8320, two questions:
- If a transaction receipt is a failure, does this means all its inner call should be reverted?
- What about fees paid?
- If all calls are failure, can a transaction be in success?
Generally speaking, with a EIP 8320 feature, what is the relation between the transaction success and its root calls.
| 5. **Logs.** The `ActorAuthorized` / `ActorRevoked` / `AccountCreated` / | ||
| `DelegationApplied` logs are pushed straight into the revm journal | ||
| (`emit_event` → `internals.log(...)`) outside any call frame, and appear in | ||
| the receipt **ahead of** the calls' logs. No LOG opcode executes, so | ||
| inspector log hooks never fire. This is the same mechanism as the B20 | ||
| precompile logs already handled by the tracer — good precedent — but it is | ||
| precisely the shape that caused the fh-5 panic | ||
| ("N call logs but N+1 receipt logs"). |
There was a problem hiding this comment.
Yeah the inspector is not tracing low enough to be aware of this which is a bummer. We can always simulate of the logic is not too intense.
We should investigate about how we can better collaborate on reth to never "miss" those.
| 6. **State changes outside frames.** Payer precharge/settlement means | ||
| `REASON_GAS_BUY` / `REASON_GAS_REFUND` balance changes land on the | ||
| **payer**, not `from`. 2D nonces are `StorageChange`s on the NonceManager | ||
| precompile, not `NonceChange`s. Auto-delegation writes `0xef0100‖target` | ||
| code, and account creation sets code directly at a CREATE2 address — | ||
| `CodeChange`s from the pre-call pipeline, not from a CREATE frame. |
There was a problem hiding this comment.
We follow semantics of the chain about changes happening to whom for which reason. Make sense anyway since REASON_GAS_BUY/REASON_GAS_REFUND are a bit special since they are never "reverted".
My understanding here is that we keep 1 max of each (maybe 0 if no refund), still valid with new trx type?
| 4. **Add a `firehose_8130` system test** alongside `firehose_b20` in | ||
| `base-firehose-tests`, with JSON-projection goldens (not full-protobuf, | ||
| per the `nop_transfer` lesson). |
There was a problem hiding this comment.
This should be done in position 3 for those reasons:
- Base probably already have EIP 8320 system tests that we can copy and put Firehose tracer on top of such block
- Feedback loop is much faster in this setup, a devnet is harder for the agent to work on, preferable to start with code only tests first.
| 4. **Add a `firehose_8130` system test** alongside `firehose_b20` in | ||
| `base-firehose-tests`, with JSON-projection goldens (not full-protobuf, | ||
| per the `nop_transfer` lesson). | ||
| 5. **Track two upstream signals**: `cobalt_timestamp` appearing in |
There was a problem hiding this comment.
Not sure of which tracking we talk about.
Something though, maybe evm-firehose-tracer-rs might require some changes to handle this new unknown fork.
|
Note This reply was written by Claude — treat it as Claude's opinion, reviewed but not independently verified by @sduchesneau. Addressing each review comment: 1. Base-specific vs shared enum value ( 2. How many current fields are retained 3. 4. Relation between transaction status and root calls
5. Injected logs invisible to the inspector 6. GAS_BUY / GAS_REFUND cardinality 7. Devnet ordering 8. "Track two upstream signals" Happy to fold 3, 4, 7 and 8 back into the doc. |
Adds
docs/prepare_EIP-8130.md: analysis of what EIP-8130 (tx type 0x79, Cobalt hardfork, mainnet target Sept 2026) changes for the Firehose block model and tracer, what breaks today, and the preparation plan.Doc only, no code changes.