Skip to content

Commit 9958457

Browse files
author
Michał Mrożek
authored
Merge pull request #647 from input-output-hk/etcm-21-transaction-data-gas-cost-reduction
[ETCM-21] EIP-2028: Transaction data gas cost reduction
2 parents 362b99c + d2626ae commit 9958457

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/scala/io/iohk/ethereum/vm/EvmConfig.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ object FeeSchedule {
267267
class PhoenixFeeSchedule extends AghartaFeeSchedule{
268268
override val G_sload: BigInt = 800
269269
override val G_balance: BigInt = 700
270+
override val G_txdatanonzero = 16
270271
}
271272

272273
}

src/test/scala/io/iohk/ethereum/ledger/StxLedgerSpec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class StxLedgerSpec extends FlatSpec with Matchers with Logger {
1414

1515
"StxLedger" should "correctly estimate minimum gasLimit to run transaction which throws" in new ScenarioSetup {
1616
/**
17-
* Transaction requires gasLimit equal to 122397, but actual gas used due to refund is equal 42907.
18-
* Our simulateTransaction properly estimates gas usage to 42907, but requires at least 122397 gas to
17+
* Transaction requires gasLimit equal to 121825, but actual gas used due to refund is equal 42907.
18+
* Our simulateTransaction properly estimates gas usage to 42907, but requires at least 121825 gas to
1919
* make that simulation
2020
*
2121
* After some investigation it seems that semantics required from estimateGas is that it should return
@@ -174,7 +174,7 @@ trait ScenarioSetup extends EphemBlockchainTestSetup {
174174
val someGenesisBlock: Array[Byte] =
175175
Hex.decode("f901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421880102030405060708c0c0")
176176

177-
val minGasLimitRequiredForFailingTransaction: BigInt = 122397
177+
val minGasLimitRequiredForFailingTransaction: BigInt = 121825
178178

179179
val block: Block = someGenesisBlock.toBlock
180180
val genesisBlock: Block =

0 commit comments

Comments
 (0)