-
Notifications
You must be signed in to change notification settings - Fork 130
[PAN-2905] EIP-1706 - Disable SSTORE with gasleft lt call stipend #1706
Conversation
…pend Add minimum remaining gas check to exceptional halt reasons. Configure it to zero pre-istanbul and 2300 for istanbul.
@@ -27,8 +27,14 @@ | |||
|
|||
public class SStoreOperation extends AbstractOperation { | |||
|
|||
public SStoreOperation(final GasCalculator gasCalculator) { | |||
public static final Gas FRONTIER_MINIMUM = Gas.ZERO; | |||
public static final Gas EIP_1706_MINIMUM = Gas.of(2300); |
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.
If we follow the existing pattern, I think these gas values belong on the GasCalculator
?
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.
see #1704 (comment)
|
||
private final Gas minumumGasRemaining; | ||
|
||
public SStoreOperation(final GasCalculator gasCalculator, final Gas minumumGasRemaining) { |
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.
(discussion) Since this new minimum gas check is backwards-compatible, should we just always apply it? Rather than having separate minima for frontier vs istanbul?
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 is not backwards compatible. Over 100 reference tests have broken so far in my test run and the build is not done yet.
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.
169 to be exact. Across a broad set of tests.
# Conflicts: # ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/MainnetEvmRegistries.java # ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/MainnetProtocolSpecs.java
PR description
Add minimum remaining gas check to exceptional halt reasons. Configure it
to zero pre-istanbul and 2300 for istanbul.