@@ -160,12 +160,12 @@ def test_clz_fork_transition(blockchain_test: BlockchainTestFiller, pre: Alloc):
160160 """Test CLZ opcode behavior at fork transition."""
161161 sender = pre .fund_eoa ()
162162 callee_address = pre .deploy_contract (
163- code = Op .SSTORE (Op .NUMBER , Op .CLZ (1 << 100 )) + Op .STOP ,
164- storage = {"0x00" : "0xdeadbeef" },
163+ code = Op .SSTORE (Op .TIMESTAMP , Op .CLZ (1 << 100 )) + Op .STOP ,
164+ storage = {14_999 : "0xdeadbeef" },
165165 )
166166 caller_address = pre .deploy_contract (
167- code = Op .SSTORE (Op .NUMBER , Op .CALL (gas = 0xFFFF , address = callee_address )),
168- storage = {"0x00" : "0xdeadbeef" },
167+ code = Op .SSTORE (Op .TIMESTAMP , Op .CALL (gas = 0xFFFF , address = callee_address )),
168+ storage = {14_999 : "0xdeadbeef" },
169169 )
170170 blocks = [
171171 Block (
@@ -208,16 +208,16 @@ def test_clz_fork_transition(blockchain_test: BlockchainTestFiller, pre: Alloc):
208208 post = {
209209 caller_address : Account (
210210 storage = {
211- 14_999 : 0 ,
212- 15_000 : 1 ,
213- 15_001 : 1 ,
211+ 14_999 : 0 , # Call fails as opcode not valid before Osaka
212+ 15_000 : 1 , # Call succeeds on fork transition block
213+ 15_001 : 1 , # Call continues to succeed after transition
214214 }
215215 ),
216216 callee_address : Account (
217217 storage = {
218- 14_999 : 155 ,
219- 15_000 : 155 ,
220- 15_001 : 155 ,
218+ 14_999 : "0xdeadbeef" , # CLZ not valid before fork, storage unchanged
219+ 15_000 : 155 , # CLZ valid on transition block, CLZ(1 << 100) = 155
220+ 15_001 : 155 , # CLZ continues to be valid after transition
221221 }
222222 ),
223223 },
0 commit comments