Implement BaseFee, blobBaseFee, CallValue, GasPrice, Balance and SelfBalance for EVM v2#10229
Draft
ahamlat wants to merge 3 commits intobesu-eth:mainfrom
Draft
Implement BaseFee, blobBaseFee, CallValue, GasPrice, Balance and SelfBalance for EVM v2#10229ahamlat wants to merge 3 commits intobesu-eth:mainfrom
ahamlat wants to merge 3 commits intobesu-eth:mainfrom
Conversation
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
siladu
reviewed
Apr 14, 2026
| // significant) | ||
| private final long[] stackDataV2; | ||
| private int stackTopV2; | ||
| private final int stackMaxSize; |
Contributor
There was a problem hiding this comment.
Wonder if there's any advantage to this field over referring to txValues.maxStackSize in line?
Contributor
There was a problem hiding this comment.
Suggested change
| private final int stackMaxSize; | |
| private final int stackMaxSizeV2; |
| @@ -29,6 +35,19 @@ | |||
| */ | |||
| public abstract class AbstractOperation implements Operation { | |||
Contributor
There was a problem hiding this comment.
I thought we discussed and agreed to introduce AbstractOperationV2 as duplicate of AbstractOperation - has your thinking changed on that?
If we prefer mixing V1 and V2 code together, then perhaps we should mix AbstractFixCostOperationV2 as well so we're sticking to a single convention for V2.
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
Continues the EVM v2 implementation started in #10105.
Implement V2 versions of five Wei-related opcodes operating directly on the long[] stack: BALANCE (0x31), SELFBALANCE (0x47), BASEFEE (0x48), BLOBBASEFEE (0x4a), CALLVALUE (0x34), and GASPRICE (0x3a).
The stack long[] array is not exposed beyond the operation boundary. Each operation is solely responsible for manipulating the stack: reading inputs, writing results, and updating the stack top pointer. The shared helper methods (
pushWei,pushZero,toAddressAt) are deliberately simple write/read primitives that operate on a given slot index -- they have no knowledge of the stack top and do not return or update it. The caller (the operation's execute method) is responsible for computing the correct slot indices and deciding whether/how to update the stack top based on its own pop/push semantics.Fixed Issue(s)
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