-
Notifications
You must be signed in to change notification settings - Fork 883
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
Implementation of EIP-2929 #1387
Conversation
Legacy State tests before constantinople were moved to a child directory. We still need to validate against those. Generate and execute those tests under a "LegacyX" class series. Signed-off-by: Danno Ferrin <[email protected]>
* deprecate old yoloV1 options * replace with yoloV2 options * clear the yolo bootnode * expose experimental EIPs flag to EVM Tool Signed-off-by: Danno Ferrin <[email protected]>
* store warmed addresses and slots in the MessageFrame * probably need to do a gas calculator refactor at some point Signed-off-by: Danno Ferrin <[email protected]>
Recipient and sender are (almost) always the same. We want sender and contract (which should be recipient, unless it's a create, when we do want the contract) Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
* 0x0 is not a precompile. * Call operations need to check against to, not value recipient (which can be null) Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
* keep order of test cases * show all memory Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Dear mocking frameworks, I hate you. Also, reference tests: chillax on the memory load. Signed-off-by: Danno Ferrin <[email protected]>
Filled from hyperledger/besu#1387 Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
It seems that there are also the modifications of this PR #1386. Otherwise it's ok
Should this have a changelog entry? |
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/BerlinGasCalculator.java
Show resolved
Hide resolved
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/BerlinGasCalculator.java
Show resolved
Hide resolved
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Changelog entry added. |
final Address address = account.getAddress(); | ||
final Bytes32 key = frame.popStackItem(); | ||
final boolean slotIsWarm = frame.warmUpStorage(address, key); | ||
final Optional<Gas> optionalCost = slotIsWarm ? warmCost : coldCost; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be related to a question I asked in a previous pr but I can't remember. Do these need to be optional everywhere? For example, isn't the warmCost and coldCost always present here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a mix. We need the optional for the return value but we need the value during gas calculations. The gas cost is not optional within the method but on the return, for some errors we return an empty cost (such as when we can't know because of a stack underflow).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, could we push the optional wrapping to as late as possible? I think it makes it clearer for which sections it is guaranteed to be defined. The intent is a bit unclear when the warmCost and coldCost fields are Optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The optionals are re-used across requests. If we wrapped in the execute method it would result in object churn.
Signed-off-by: Danno Ferrin <[email protected]>
PR description
Signed-off-by: Danno Ferrin [email protected]
builds off of #1386
Changelog