From 3603f8d14df04434e4477314f51c343d662cc32b Mon Sep 17 00:00:00 2001 From: Edward Mack Date: Thu, 20 Feb 2020 11:09:32 -0500 Subject: [PATCH] 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 * 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 Signed-off-by: Edward Mack * 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 * merge Signed-off-by: Edward Mack --- .../besu/ethereum/mainnet/AztlanGasCalculator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AztlanGasCalculator.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AztlanGasCalculator.java index d5690d4ab2..0c7db03a9d 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AztlanGasCalculator.java +++ b/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 { 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 SLOAD_GAS = Gas.of(200); + + @Override + // As per https://eips.ethereum.org/EIPS/eip-1884 + public Gas getSloadOperationGasCost() { + return SLOAD_GAS; + } @Override public Gas getBalanceOperationGasCost() {