Update SLOAD_GAS cost to 200 in Aztlan Gas Calculator (#23) (#382)

* Update SLOAD_GAS cost to 200 in Aztlan Gas Calculator

Change SLOAD_GAS cost in Aztlan Gas Calculator from 800 to 200 and
update functions that use SLOAD_GAS.

Signed-off-by: edwardmack <ed@edwardmack.com>

* Update SLOAD_GAS cost to 200 in Aztlan Gas Calculator

Change SLOAD_GAS cost in Aztlan Gas Calculator from 800 to 200 and
update functions that use SLOAD_GAS.

Signed-off-by: edwardmack <ed@edwardmack.com>
Signed-off-by: Edward Mack <ed@edwardmack.com>

* remove overrides

removed overrides of calculateStorageCost and
calculateStorageRefundAmount in AztlanGasCalculator because these were
causing aztlan fork not to sync with kotti testnet.

Signed-off-by: Edward Mack <ed@edwardmack.com>

* merge

Signed-off-by: Edward Mack <ed@edwardmack.com>
pull/425/head
Edward Mack 5 years ago committed by GitHub
parent 145710abf8
commit 3603f8d14d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AztlanGasCalculator.java

@ -23,6 +23,13 @@ import org.hyperledger.besu.ethereum.core.Gas;
public class AztlanGasCalculator extends IstanbulGasCalculator { public class AztlanGasCalculator extends IstanbulGasCalculator {
private static final Gas BALANCE_OPERATION_GAS_COST = Gas.of(400); private static final Gas BALANCE_OPERATION_GAS_COST = Gas.of(400);
private static final Gas EXTCODE_HASH_COST = Gas.of(400); private static final Gas EXTCODE_HASH_COST = Gas.of(400);
private static final Gas SLOAD_GAS = Gas.of(200);
@Override
// As per https://eips.ethereum.org/EIPS/eip-1884
public Gas getSloadOperationGasCost() {
return SLOAD_GAS;
}
@Override @Override
public Gas getBalanceOperationGasCost() { public Gas getBalanceOperationGasCost() {

Loading…
Cancel
Save