t8n: Emit the real receipt status, root and logs - #1667
Merged
Conversation
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1667 +/- ##
=======================================
Coverage 97.72% 97.72%
=======================================
Files 171 171
Lines 15636 15666 +30
Branches 3616 3625 +9
=======================================
+ Hits 15280 15310 +30
Misses 269 269
Partials 87 87
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The receipts JSON hard-coded the status to "0x1" and the logs to [], while the t8n's own receiptsRoot was built from the real receipt status and logs, so the JSON and the trie hash agreed only for successful zero-log transactions. Emit the EIP-658 status, the log list, and the post-state root for pre-Byzantium receipts.
chfast
force-pushed
the
tooling/t8n-real-receipts
branch
from
August 20, 2026 05:53
bc2d8f9 to
8a1cbdc
Compare
There was a problem hiding this comment.
Pull request overview
Aligns t8n receipt JSON with the data used to calculate receiptsRoot.
Changes:
- Serializes actual receipt logs and execution status.
- Emits pre-Byzantium post-state roots.
- Adds receipt log/status regression tests and shared test helpers.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
test/utils/t8n.cpp |
Emits real logs, status, and post-state root. |
test/utils/statetest.hpp |
Declares log JSON serialization. |
test/utils/statetest_export.cpp |
Implements log JSON serialization. |
test/unittests/tooling_t8n_test.cpp |
Tests logs, failure status, and pre-Byzantium roots. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The receipts JSON hard-coded the status to
"0x1"and the logs to[], while the t8n's ownreceiptsRootwas built from the real receipt status and logs. The JSON and the trie hash therefore agreed only for successful zero-log transactions.This breaks filling.
execution-specsasserts the two against each other for every single-transaction state test —specs/state.pyrebuilds aFixtureTransactionReceiptfrom the receipt JSON (its RLP covers logs and status) and compares its root with thereceiptsRootthe tool reported:That receipt's RLP ends in
c0, an empty logs list, while its bloom filter has bits set.Filling
tests/frontier/opcodes/test_log.pyat Shanghai with--evm-binpointing at each build:A pre-Byzantium receipt is keyed on the post-state root rather than the EIP-658 status, so both fields are emitted, as go-ethereum does; the consumer gives a non-empty root precedence.
Extracted from the Amsterdam branch's t8n work, where filling against the devnet releases exercised it. The fix itself is fork-independent.