Add EIP 7778 to Amsterdam#9664
Merged
daniellehrner merged 19 commits intobesu-eth:mainfrom Jan 26, 2026
Merged
Conversation
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
…ng and after correcting it, it is not needed anymore Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
…ecoding to know if gas_spent must be present or not Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
daniellehrner
commented
Jan 21, 2026
| return RLP.input(bytes) | ||
| .readList( | ||
| in -> | ||
| isAmsterdamOrLater |
Contributor
Author
There was a problem hiding this comment.
Transaction receipts have already one optional field, revert reason. Simply extending tx receipts with another optional field, gas_spent from EIP-7778, makes decoding ambiguous, because it is not clear which of the 2 optional fields has to be decoded after the mandatory ones.
This is solved by checking the hardfork first and then using the legacy decoder, or the amsterdam one which has gas_spent as a mandatory field.
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
fab-10
reviewed
Jan 22, 2026
Contributor
fab-10
left a comment
There was a problem hiding this comment.
Looks good, some minor suggestion and one invite to find a better way to find how to store receipts
.../java/org/hyperledger/besu/tests/acceptance/ethereum/EIP7778GasAccountingAcceptanceTest.java
Outdated
Show resolved
Hide resolved
.../org/hyperledger/besu/ethereum/core/encoding/receipt/AmsterdamTransactionReceiptDecoder.java
Show resolved
Hide resolved
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/TransactionReceipt.java
Outdated
Show resolved
Hide resolved
.../hyperledger/besu/ethereum/storage/keyvalue/KeyValueStoragePrefixedKeyBlockchainStorage.java
Outdated
Show resolved
Hide resolved
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
… and remove gasSpent logic from base decoder, use ProtocolSpec to decide which transaction receipt decoder to use Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
fab-10
approved these changes
Jan 26, 2026
macfarla
pushed a commit
to CPerezz/besu
that referenced
this pull request
Feb 6, 2026
* EIP-7708 implementation Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * fix acceptance tests Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * undo modification for debugging Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * properly check empty requests hash Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * adapt unit tests to new changes Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * undo AbstractEngineNewPayload changes, because the test setup was wrong and after correcting it, it is not needed anymore Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * revert change as the acceptance tests have been fixed Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * first draft Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * add acceptance and unit tests, add 7778 changes to block building Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * update plugin hash, add changelog entry Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * fixed ambiguous tx receipt decoding by checking the hardfork before decoding to know if gas_spent must be present or not Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * remove gas spent parsing from pre amsterdam tx receipt decoding Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * fixed merging issues Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> * Rename TransactionReceiptDecoder to FrontierTransactionReceiptDecoder and remove gasSpent logic from base decoder, use ProtocolSpec to decide which transaction receipt decoder to use Signed-off-by: daniellehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Matilda-Clerke
added a commit
to Matilda-Clerke/besu
that referenced
this pull request
Feb 17, 2026
This reverts commit efb004f Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
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.
PR description
Implement EIP-7778 for Amsterdam. It changes how the block gas limit is calculated. With this EIP the refunds are not deductible for the block gas limit only for the gas spent on the transaction. Because of that a new
gas_spentfield is added to transactions receiptFixed Issue(s)
fixes #9539
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests