-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update Amsterdam to bal@v5.4.0 spec #10075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
daniellehrner
merged 6 commits into
besu-eth:main
from
daniellehrner:feat/bal_devenet_test_5.4
Mar 23, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6ac21e5
update devnet test
daniellehrner 41130cd
oversized code no longer charges state gas
daniellehrner d6d3202
do not force-charge state gas when code deposit state gas is insuffic…
daniellehrner 8d4bfc4
Track collision-burned gas in regular_gas_used so 2D block gas
daniellehrner 123d536
addressed pr comments
daniellehrner 5f61752
Merge branch 'main' into feat/bal_devenet_test_5.4
daniellehrner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,15 +15,14 @@ | |
| package org.hyperledger.besu.evm.processor; | ||
|
|
||
| import static org.assertj.core.api.Assertions.assertThat; | ||
| import static org.hyperledger.besu.evm.frame.MessageFrame.State.COMPLETED_FAILED; | ||
| import static org.hyperledger.besu.evm.frame.MessageFrame.State.COMPLETED_SUCCESS; | ||
| import static org.hyperledger.besu.evm.frame.MessageFrame.State.EXCEPTIONAL_HALT; | ||
|
|
||
| import org.hyperledger.besu.evm.EVM; | ||
| import org.hyperledger.besu.evm.EvmSpecVersion; | ||
| import org.hyperledger.besu.evm.MainnetEVMs; | ||
| import org.hyperledger.besu.evm.contractvalidation.MaxCodeSizeRule; | ||
| import org.hyperledger.besu.evm.contractvalidation.PrefixCodeRule; | ||
| import org.hyperledger.besu.evm.frame.ExceptionalHaltReason; | ||
| import org.hyperledger.besu.evm.frame.MessageFrame; | ||
| import org.hyperledger.besu.evm.internal.EvmConfiguration; | ||
| import org.hyperledger.besu.evm.testutils.TestMessageFrameBuilder; | ||
|
|
@@ -56,9 +55,10 @@ void shouldThrowAnExceptionWhenCodeContractFormatInvalidPreEOF() { | |
| messageFrame.setGasRemaining(10600L); | ||
|
|
||
| processor.codeSuccess(messageFrame, OperationTracer.NO_TRACING); | ||
| assertThat(messageFrame.getState()).isEqualTo(EXCEPTIONAL_HALT); | ||
| assertThat(messageFrame.getExceptionalHaltReason()) | ||
| .contains(ExceptionalHaltReason.INVALID_CODE); | ||
| // At depth 0, validation failures use COMPLETED_FAILED to preserve state gas reservoir | ||
| assertThat(messageFrame.getState()).isEqualTo(COMPLETED_FAILED); | ||
|
Comment on lines
+58
to
+59
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @daniellehrner maybe this comment is worth addressing? |
||
| // Gas should be cleared — failCodeDepositWithoutRollback burns all remaining gas | ||
| assertThat(messageFrame.getRemainingGas()).isEqualTo(0L); | ||
| } | ||
|
|
||
| @Test | ||
|
|
@@ -102,9 +102,10 @@ void shouldThrowAnExceptionWhenCodeContractTooLarge() { | |
| messageFrame.setGasRemaining(10_000_000L); | ||
|
|
||
| processor.codeSuccess(messageFrame, OperationTracer.NO_TRACING); | ||
| assertThat(messageFrame.getState()).isEqualTo(EXCEPTIONAL_HALT); | ||
| assertThat(messageFrame.getExceptionalHaltReason()) | ||
| .contains(ExceptionalHaltReason.CODE_TOO_LARGE); | ||
| // At depth 0, validation failures use COMPLETED_FAILED to preserve state gas reservoir | ||
| assertThat(messageFrame.getState()).isEqualTo(COMPLETED_FAILED); | ||
| // Gas should be cleared — failCodeDepositWithoutRollback burns all remaining gas | ||
| assertThat(messageFrame.getRemainingGas()).isEqualTo(0L); | ||
| } | ||
|
|
||
| @Test | ||
|
|
@@ -142,9 +143,10 @@ void shouldRejectDeployedCodeAboveAmsterdamLimit() { | |
| messageFrame.setGasRemaining(10_000_000L); | ||
|
|
||
| processor.codeSuccess(messageFrame, OperationTracer.NO_TRACING); | ||
| assertThat(messageFrame.getState()).isEqualTo(EXCEPTIONAL_HALT); | ||
| assertThat(messageFrame.getExceptionalHaltReason()) | ||
| .contains(ExceptionalHaltReason.CODE_TOO_LARGE); | ||
| // At depth 0, validation failures use COMPLETED_FAILED to preserve state gas reservoir | ||
| assertThat(messageFrame.getState()).isEqualTo(COMPLETED_FAILED); | ||
| // Gas should be cleared — failCodeDepositWithoutRollback burns all remaining gas | ||
| assertThat(messageFrame.getRemainingGas()).isEqualTo(0L); | ||
| } | ||
|
|
||
| @Test | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.