Skip to content

Commit 10932c7

Browse files
committed
EIP-2681: Limit account nonce to 2^64-1
1 parent 6f41f7b commit 10932c7

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# The test calls CREATE2 from an account with max allowed nonce.
2+
CREATE2_HighNonce:
3+
env:
4+
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
5+
currentDifficulty: '0x020000'
6+
currentGasLimit: '89128960'
7+
currentBaseFee: '10'
8+
currentNumber: '1'
9+
currentTimestamp: '1000'
10+
previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
11+
12+
pre:
13+
a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
14+
balance: 1000000000
15+
code: ''
16+
nonce: 0
17+
storage: {}
18+
b94f5374fce5edbc8e2a8697c15331677e6ebf0b:
19+
balance: 0
20+
code: |
21+
:yul
22+
{
23+
// initcode: { return(0, 1) }
24+
mstore(0, 0x60016000f3000000000000000000000000000000000000000000000000000000)
25+
sstore(0, create2(0, 0, 5, 0))
26+
sstore(1, 1)
27+
}
28+
nonce: '0xffffffffffffffff'
29+
storage: {}
30+
31+
transaction:
32+
data:
33+
- ''
34+
gasLimit:
35+
- 70000000
36+
gasPrice: 10
37+
nonce: 0
38+
secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
39+
to: 'b94f5374fce5edbc8e2a8697c15331677e6ebf0b'
40+
value:
41+
- 0
42+
43+
expect:
44+
- indexes:
45+
data: !!int -1
46+
gas: !!int -1
47+
value: !!int -1
48+
network:
49+
- '>=Constantinople'
50+
result:
51+
a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
52+
nonce: 1
53+
b94f5374fce5edbc8e2a8697c15331677e6ebf0b:
54+
nonce: '0xffffffffffffffff'
55+
storage:
56+
'1': 1
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# The test calls CREATE from an account with max allowed nonce.
2+
CREATE_HighNonce:
3+
env:
4+
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
5+
currentDifficulty: '0x020000'
6+
currentGasLimit: '89128960'
7+
currentBaseFee: '10'
8+
currentNumber: '1'
9+
currentTimestamp: '1000'
10+
previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
11+
12+
pre:
13+
a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
14+
balance: 1000000000
15+
code: ''
16+
nonce: 0
17+
storage: {}
18+
b94f5374fce5edbc8e2a8697c15331677e6ebf0b:
19+
balance: 0
20+
code: |
21+
:yul
22+
{
23+
// initcode: { return(0, 1) }
24+
mstore(0, 0x60016000f3000000000000000000000000000000000000000000000000000000)
25+
sstore(0, create(0, 0, 5))
26+
sstore(1, 1)
27+
}
28+
nonce: '0xffffffffffffffff'
29+
storage: {}
30+
31+
transaction:
32+
data:
33+
- ''
34+
gasLimit:
35+
- 70000000
36+
gasPrice: 10
37+
nonce: 0
38+
secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
39+
to: 'b94f5374fce5edbc8e2a8697c15331677e6ebf0b'
40+
value:
41+
- 0
42+
43+
expect:
44+
- indexes:
45+
data: !!int -1
46+
gas: !!int -1
47+
value: !!int -1
48+
network:
49+
- '>=Frontier'
50+
result:
51+
a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
52+
nonce: 1
53+
b94f5374fce5edbc8e2a8697c15331677e6ebf0b:
54+
nonce: '0xffffffffffffffff'
55+
storage:
56+
'1': 1

0 commit comments

Comments
 (0)