Skip to content

Commit

Permalink
[VM/Common] Add right fork base fees, remove STATICCALL from base opc…
Browse files Browse the repository at this point in the history
…odes
  • Loading branch information
jochem-brouwer committed Jul 3, 2020
1 parent a44f7f0 commit 1a23f44
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
14 changes: 7 additions & 7 deletions packages/common/src/hardforks/chainstart.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"d": "Once per word of the SHA3 operation's data"
},
"sload": {
"v": 200,
"v": 50,
"d": "Base fee of the SLOAD opcode"
},
"sstoreSet": {
Expand Down Expand Up @@ -86,7 +86,7 @@
"d": "Base fee of the CREATE opcode"
},
"call": {
"v": 700,
"v": 40,
"d": "Base fee of the CALL opcode"
},
"callStipend": {
Expand Down Expand Up @@ -258,7 +258,7 @@
"d": "Base fee of the ADDRESS opcode"
},
"balance": {
"v": 400,
"v": 20,
"d": "Base fee of the BALANCE opcode"
},
"origin": {
Expand Down Expand Up @@ -298,11 +298,11 @@
"d": "Base fee of the GASPRICE opcode"
},
"extcodesize": {
"v": 700,
"v": 20,
"d": "Base fee of the EXTCODESIZE opcode"
},
"extcodecopy": {
"v": 700,
"v": 20,
"d": "Base fee of the EXTCODECOPY opcode"
},
"blockhash": {
Expand Down Expand Up @@ -382,7 +382,7 @@
"d": "Base fee of the SWAP opcode"
},
"callcode": {
"v": 700,
"v": 40,
"d": "Base fee of the CALLCODE opcode"
},
"return": {
Expand All @@ -398,7 +398,7 @@
"d": "Base fee of the INVALID opcode"
},
"selfdestruct": {
"v": 5000,
"v": 0,
"d": "Base fee of the SELFDESTRUCT opcode"
}
},
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/hardforks/homestead.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
"gasConfig": {},
"gasPrices": {
"delegatecall": {
"v": 700,
"v": 40,
"d": "Base fee of the DELEGATECALL opcode"
}

},
"vm": {},
"pow": {}
Expand Down
24 changes: 24 additions & 0 deletions packages/common/src/hardforks/tangerineWhistle.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,30 @@
"call": {
"v": 700,
"d": "Once per CALL operation & message call transaction"
},
"extcodesize": {
"v": 700,
"d": "Base fee of the EXTCODESIZE opcode"
},
"extcodecopy": {
"v": 700,
"d": "Base fee of the EXTCODECOPY opcode"
},
"balance": {
"v": 400,
"d": "Base fee of the BALANCE opcode"
},
"delegatecall": {
"v": 700,
"d": "Base fee of the DELEGATECALL opcode"
},
"callcode": {
"v": 700,
"d": "Base fee of the CALLCODE opcode"
},
"selfdestruct": {
"v": 5000,
"d": "Base fee of the SELFDESTRUCT opcode"
}
},
"vm": {},
Expand Down
1 change: 0 additions & 1 deletion packages/vm/lib/evm/opcodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ const opcodes = {
0xf1: { name: 'CALL', isAsync: true },
0xf2: { name: 'CALLCODE', isAsync: true },
0xf3: { name: 'RETURN', isAsync: false },
0xfa: { name: 'STATICCALL', isAsync: true },

// '0x70', range - other
0xfe: { name: 'INVALID', isAsync: false },
Expand Down

0 comments on commit 1a23f44

Please sign in to comment.