-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EIP-2681: Limit account nonce to 2^64-1
- Loading branch information
Showing
2 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
src/GeneralStateTestsFiller/stCreate2/CREATE2_HighNonceFiller.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# The test calls CREATE2 from an account with max allowed nonce. | ||
CREATE2_HighNonce: | ||
env: | ||
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba | ||
currentDifficulty: '0x020000' | ||
currentGasLimit: '89128960' | ||
currentBaseFee: '10' | ||
currentNumber: '1' | ||
currentTimestamp: '1000' | ||
previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6 | ||
|
||
pre: | ||
a94f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
balance: 1000000000 | ||
code: '' | ||
nonce: 0 | ||
storage: {} | ||
b94f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
balance: 0 | ||
code: | | ||
:yul | ||
{ | ||
// initcode: { return(0, 1) } | ||
mstore(0, 0x60016000f3000000000000000000000000000000000000000000000000000000) | ||
sstore(0, create2(0, 0, 5, 0)) | ||
sstore(1, 1) | ||
} | ||
nonce: '0xffffffffffffffff' | ||
storage: {} | ||
|
||
transaction: | ||
data: | ||
- '' | ||
gasLimit: | ||
- 70000000 | ||
gasPrice: 10 | ||
nonce: 0 | ||
secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8 | ||
to: 'b94f5374fce5edbc8e2a8697c15331677e6ebf0b' | ||
value: | ||
- 0 | ||
|
||
expect: | ||
- indexes: | ||
data: !!int -1 | ||
gas: !!int -1 | ||
value: !!int -1 | ||
network: | ||
- '>=Constantinople' | ||
result: | ||
a94f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
nonce: 1 | ||
b94f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
nonce: '0xffffffffffffffff' | ||
storage: | ||
'1': 1 |
56 changes: 56 additions & 0 deletions
56
src/GeneralStateTestsFiller/stCreateTest/CREATE_HighNonceFiller.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# The test calls CREATE from an account with max allowed nonce. | ||
CREATE_HighNonce: | ||
env: | ||
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba | ||
currentDifficulty: '0x020000' | ||
currentGasLimit: '89128960' | ||
currentBaseFee: '10' | ||
currentNumber: '1' | ||
currentTimestamp: '1000' | ||
previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6 | ||
|
||
pre: | ||
a94f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
balance: 1000000000 | ||
code: '' | ||
nonce: 0 | ||
storage: {} | ||
b94f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
balance: 0 | ||
code: | | ||
:yul | ||
{ | ||
// initcode: { return(0, 1) } | ||
mstore(0, 0x60016000f3000000000000000000000000000000000000000000000000000000) | ||
sstore(0, create(0, 0, 5)) | ||
sstore(1, 1) | ||
} | ||
nonce: '0xffffffffffffffff' | ||
storage: {} | ||
|
||
transaction: | ||
data: | ||
- '' | ||
gasLimit: | ||
- 70000000 | ||
gasPrice: 10 | ||
nonce: 0 | ||
secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8 | ||
to: 'b94f5374fce5edbc8e2a8697c15331677e6ebf0b' | ||
value: | ||
- 0 | ||
|
||
expect: | ||
- indexes: | ||
data: !!int -1 | ||
gas: !!int -1 | ||
value: !!int -1 | ||
network: | ||
- '>=Frontier' | ||
result: | ||
a94f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
nonce: 1 | ||
b94f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
nonce: '0xffffffffffffffff' | ||
storage: | ||
'1': 1 |