Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

EIP-2028: Set tx data nonzero byte cost to 16 in Istanbul #5691

Merged
merged 1 commit into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libethcore/EVMSchedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ static const EVMSchedule ConstantinopleFixSchedule = [] {
static const EVMSchedule IstanbulSchedule = [] {
EVMSchedule schedule = ConstantinopleFixSchedule;
schedule.accountVersion = 1;
schedule.txDataNonZeroGas = 16;
return schedule;
}();

Expand Down
4 changes: 3 additions & 1 deletion test/unittests/libethereum/Transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ BOOST_FIXTURE_TEST_SUITE(libethereum, TestOutputHelperFixture)

BOOST_AUTO_TEST_CASE(TransactionGasRequired)
{
// Transaction data is 0358ac39584bc98a7c979f984b03, 14 bytes
Transaction tr(fromHex("0xf86d800182521c94095e7baea6a6c7c4c2dfeb977efac326af552d870a8e0358ac39584bc98a7c979f984b031ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"), CheckTransaction::None);
BOOST_CHECK_EQUAL(tr.baseGasRequired(FrontierSchedule), 21952);
BOOST_CHECK_EQUAL(tr.baseGasRequired(FrontierSchedule), 14 * 68 + 21000);
BOOST_CHECK_EQUAL(tr.baseGasRequired(IstanbulSchedule), 14 * 16 + 21000);
}

BOOST_AUTO_TEST_CASE(ExecutionResultOutput)
Expand Down