Skip to content

Commit d2028c3

Browse files
committed
reverted changes to tests that broke from the gaslimit adjustment
1 parent 8a054e2 commit d2028c3

File tree

10 files changed

+1636
-94
lines changed

10 files changed

+1636
-94
lines changed

tests/static/state_tests/VMTests/vmIOandFlowOperations/gasFiller.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ gas:
6767
- :label gas1 :abi f(uint) 0
6868
- :label gas2 :abi f(uint) 1
6969
gasLimit:
70-
- '1000000'
70+
- '80000000'
7171
gasPrice: '10'
7272
nonce: '0'
7373
to: cccccccccccccccccccccccccccccccccccccccc
@@ -93,7 +93,7 @@ gas:
9393
result:
9494
cccccccccccccccccccccccccccccccccccccccc:
9595
storage:
96-
0x00: 960898
96+
0x00: 0x04b1457b
9797

9898

9999

@@ -107,4 +107,4 @@ gas:
107107
result:
108108
cccccccccccccccccccccccccccccccccccccccc:
109109
storage:
110-
0x00: 960916
110+
0x00: 0x04b1458d
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
# Memory size tests
2+
3+
4+
msize:
5+
6+
env:
7+
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
8+
currentDifficulty: 0x20000
9+
currentGasLimit: 0x100000000
10+
currentNumber: 1
11+
currentTimestamp: 1000
12+
13+
_info:
14+
comment: Ori Pomerantz [email protected]
15+
16+
pre:
17+
18+
0000000000000000000000000000000000001000:
19+
balance: '0x0ba1a9ce0ba1a9ce'
20+
code: |
21+
{
22+
; Store an entire 32 byte value
23+
[0] 0xFF
24+
[[0]] (msize)
25+
}
26+
nonce: '0'
27+
storage: {}
28+
29+
30+
0000000000000000000000000000000000001001:
31+
balance: '0x0ba1a9ce0ba1a9ce'
32+
code: |
33+
{
34+
; Store an entire 32 byte value
35+
[0] 0xffffffffff
36+
[[0]] (msize)
37+
}
38+
nonce: '0'
39+
storage: {}
40+
41+
42+
43+
0000000000000000000000000000000000001002:
44+
balance: '0x0ba1a9ce0ba1a9ce'
45+
code: |
46+
{
47+
; Store two values
48+
[0] 0xffffffffff
49+
[0x20] 0xeeee
50+
[[0]] (msize)
51+
}
52+
nonce: '0'
53+
storage: {}
54+
55+
56+
57+
0000000000000000000000000000000000001003:
58+
balance: '0x0ba1a9ce0ba1a9ce'
59+
code: |
60+
{
61+
; Store two values
62+
[0] 0xffffffffff
63+
[0x5a] 0xeeee
64+
[[0]] (msize)
65+
66+
; The 0xEEEE value is stored 0x5a-0x79,
67+
; and memory is allocated in 0x20 byte chunks
68+
}
69+
nonce: '0'
70+
storage: {}
71+
72+
73+
# chunks
74+
0000000000000000000000000000000000001004:
75+
balance: '0x0ba1a9ce0ba1a9ce'
76+
code: |
77+
{
78+
; Store at the very end of the first chunk
79+
(mstore8 0x1F 1)
80+
[[0]] (msize)
81+
82+
; Store at the beginning of the second chuck
83+
(mstore8 0x20 1)
84+
[[1]] (msize)
85+
86+
; Does it matter if we reset the memory?
87+
; Spoiler alert, it doesn't
88+
(mstore8 0x20 0)
89+
[[2]] (msize)
90+
91+
}
92+
nonce: '0'
93+
storage: {}
94+
95+
96+
# farChunk
97+
0000000000000000000000000000000000001005:
98+
balance: '0x0ba1a9ce0ba1a9ce'
99+
code: |
100+
{
101+
; Does the chunk size change in very high offsets?
102+
;
103+
; Note: It doesn't
104+
(mstore8 0xB00000 1)
105+
[[0]] (msize)
106+
}
107+
nonce: '0'
108+
storage: {}
109+
110+
111+
112+
# Using DELEGATECALL lets us group results together, because everything
113+
# is written to the same storage.
114+
cccccccccccccccccccccccccccccccccccccccc:
115+
balance: '0x0ba1a9ce0ba1a9ce'
116+
code: |
117+
{
118+
(delegatecall (gas) (+ 0x1000 $4) 0 0 0 0)
119+
}
120+
nonce: '0'
121+
storage: {}
122+
123+
124+
a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
125+
balance: 0x100000000000
126+
code: '0x'
127+
nonce: '0'
128+
storage: {}
129+
130+
131+
132+
133+
transaction:
134+
data:
135+
- :label msize0 :abi f(uint) 0
136+
- :label msize1 :abi f(uint) 1
137+
- :label msize2 :abi f(uint) 2
138+
- :label msize3 :abi f(uint) 3
139+
- :label chunks :abi f(uint) 4
140+
141+
# Off in hyperspace, is the chunk size still 0x20?
142+
- :label farChunk :abi f(uint) 5
143+
gasLimit:
144+
- 0x10000000
145+
gasPrice: '10'
146+
nonce: '0'
147+
to: cccccccccccccccccccccccccccccccccccccccc
148+
value:
149+
- '1'
150+
secretKey: "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
151+
152+
153+
expect:
154+
- indexes:
155+
data:
156+
- :label msize0
157+
- :label msize1
158+
gas: !!int -1
159+
value: !!int -1
160+
network:
161+
- '>=Cancun'
162+
result:
163+
cccccccccccccccccccccccccccccccccccccccc:
164+
storage:
165+
0x00: 0x20
166+
167+
168+
169+
170+
- indexes:
171+
data:
172+
- :label msize2
173+
gas: !!int -1
174+
value: !!int -1
175+
network:
176+
- '>=Cancun'
177+
result:
178+
cccccccccccccccccccccccccccccccccccccccc:
179+
storage:
180+
0x00: 0x40
181+
182+
183+
184+
- indexes:
185+
data:
186+
- :label msize3
187+
gas: !!int -1
188+
value: !!int -1
189+
network:
190+
- '>=Cancun'
191+
result:
192+
cccccccccccccccccccccccccccccccccccccccc:
193+
storage:
194+
0x00: 0x80
195+
196+
197+
198+
- indexes:
199+
data:
200+
- :label chunks
201+
gas: !!int -1
202+
value: !!int -1
203+
network:
204+
- '>=Cancun'
205+
result:
206+
cccccccccccccccccccccccccccccccccccccccc:
207+
storage:
208+
0x00: 0x20
209+
0x01: 0x40
210+
0x02: 0x40
211+
212+
213+
214+
215+
- indexes:
216+
data:
217+
- :label farChunk
218+
gas: !!int -1
219+
value: !!int -1
220+
network:
221+
- '>=Cancun'
222+
result:
223+
cccccccccccccccccccccccccccccccccccccccc:
224+
storage:
225+
0x00: 0xb00020

tests/static/state_tests/stCreateTest/createLargeResultFiller.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ createLargeResult:
125125

126126

127127
gasLimit:
128-
- 6_000_000
128+
- 80000000
129129
gasPrice: 10
130130
nonce: 1
131131
to: cccccccccccccccccccccccccccccccccccccccc
@@ -276,7 +276,7 @@ createLargeResult:
276276
# Address (REVERT, so nothing)
277277
0: 0
278278
# Remaining gas
279-
1: 0x59e2ab
279+
1: 0x04b16491
280280
# Hash when there is no contract
281281
2: 0
282282

@@ -293,7 +293,7 @@ createLargeResult:
293293
# Address (REVERT, so nothing)
294294
0: 0
295295
# Remaining gas
296-
1: 0x59e2ac
296+
1: 0x04b16492
297297
# Hash when there is no contract
298298
2: 0
299299

@@ -343,7 +343,7 @@ createLargeResult:
343343
# Address (REVERT, so nothing)
344344
0: 0
345345
# Remaining gas
346-
1: 0x59e2b7
346+
1: 0x04b1649d
347347
# Hash when there is no contract
348348
2: 0
349349

@@ -360,7 +360,7 @@ createLargeResult:
360360
# Address (REVERT, so nothing)
361361
0: 0
362362
# Remaining gas
363-
1: 0x59e2b8
363+
1: 0x04b1649e
364364
# Hash when there is no contract
365365
2: 0
366366

0 commit comments

Comments
 (0)