Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Commit ab2c7a8

Browse files
committed
Add Constantinople SSTORE gas/refund prices (EIP1283)
1 parent c8b5f1e commit ab2c7a8

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

hardforks/constantinople.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,36 @@
66
"status": "Draft"
77
},
88
"gasConfig": {},
9-
"gasPrices": {},
9+
"gasPrices": {
10+
"netSstoreNoopGas": {
11+
"v": 200,
12+
"d": "Once per SSTORE operation if the value doesn't change"
13+
},
14+
"netSstoreInitGas": {
15+
"v": 20000,
16+
"d": "Once per SSTORE operation from clean zero"
17+
},
18+
"netSstoreCleanGas": {
19+
"v": 5000,
20+
"d": "Once per SSTORE operation from clean non-zero"
21+
},
22+
"netSstoreDirtyGas": {
23+
"v": 200,
24+
"d": "Once per SSTORE operation from dirty"
25+
},
26+
"netSstoreClearRefund": {
27+
"v": 15000,
28+
"d": "Once per SSTORE operation for clearing an originally existing storage slot"
29+
},
30+
"netSstoreResetRefund": {
31+
"v": 4800,
32+
"d": "Once per SSTORE operation for resetting to the original non-zero value"
33+
},
34+
"netSstoreResetClearRefund": {
35+
"v": 19800,
36+
"d": "Once per SSTORE operation for resetting to the original zero value"
37+
}
38+
},
1039
"vm": {},
1140
"pow": {
1241
"minerReward": {

tests/params.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ tape('[Common]: Parameter access', function (t) {
3434

3535
st.equal(c.param('pow', 'minerReward', 'chainstart'), '5000000000000000000', 'Should return correct value for chain start')
3636
st.equal(c.param('pow', 'minerReward', 'byzantium'), '3000000000000000000', 'Should reflect HF update changes')
37+
st.equal(c.param('gasPrices', 'netSstoreNoopGas', 'constantinople'), 200, 'Should return updated sstore gas prices for constantinople')
3738

3839
st.end()
3940
})

0 commit comments

Comments
 (0)