Skip to content

Test RJUMPV

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py@0ed27a0e.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py --fork Osaka

EOF JUMPF tests covering stack and code validation rules.

Test Functions Overview

Name Type Cases (Osaka) Description
test_rjumpv_condition eof_state_test 0 Test RJUMPV contract switching based on external input
test_rjumpv_forwards eof_state_test 0 EOF1V4200_0008 (Valid) EOF with RJUMPV table size 1 (Positive)
test_rjumpv_backwards eof_state_test 0 EOF1V4200_0009 (Valid) EOF with RJUMPV table size 1 (Negative)
test_rjumpv_backwards_onto_dup eof_test 1 Backwards jump vector onto a dup
test_rjumpv_backwards_large_table eof_test 2 Backwards jump vector with a large table
test_rjumpv_zero eof_state_test 0 EOF1V4200_0010 (Valid) EOF with RJUMPV table size 1 (Zero)
test_rjumpv_size_3 eof_state_test 0 EOF1V4200_0011 (Valid) EOF with RJUMPV table size 3
test_rjumpv_full_table eof_state_test 0 EOF1V4200_0012 (Valid) EOF with RJUMPV table size 256 (Target 0)
test_rjumpv_full_table_mid eof_state_test 0 EOF1V4200_0013 (Valid) EOF with RJUMPV table size 256 (Target 100)
test_rjumpv_full_table_end eof_state_test 0 EOF1V4200_0014 (Valid) EOF with RJUMPV table size 256 (Target 254)
test_rjumpv_full_table_last eof_state_test 0 EOF1V4200_0015 (Valid) EOF with RJUMPV table size 256 (Target 256)
test_rjumpv_max_forwards eof_state_test 0 EOF1V4200_0016 (Valid) EOF with RJUMPV containing the maximum offset (32767)
test_rjumpv_truncated_empty eof_test 1 EOF1I4200_0027 (Invalid) EOF code containing RJUMPV with max_index 0 but no immediates
test_rjumpv_truncated eof_test 6 EOF1I4200_0028/29/30/31 (Invalid) EOF code containing truncated RJUMPV
test_rjumpv_into_header eof_test 3 EOF1I4200_0031 (Invalid) EOF code containing RJUMPV with target outside code bounds
test_rjumpv_before_container eof_test 3 EOF1I4200_0032 (Invalid) EOF code containing RJUMPV with target outside code bounds
test_rjumpv_into_data eof_test 3 EOF1I4200_0033 (Invalid) EOF code containing RJUMPV with target outside code bounds
test_rjumpv_after_container eof_test 3 EOF1I4200_0034 (Invalid) EOF code containing RJUMPV with target outside code bounds
test_rjumpv_at_end eof_test 3 EOF1I4200_0035 (Invalid) EOF code containing RJUMPV with target outside code bounds
test_rjumpv_into_self_data_portion eof_test 6 EOF1I4200_0036 (Invalid) EOF code containing RJUMPV with target same RJUMPV immediate
test_rjumpv_into_self eof_test 3 EOF code containing RJUMPV with target same RJUMPV immediate
test_rjumpv_into_stack_height_diff eof_test 3 EOF code containing RJUMPV with target instruction that causes stack height difference
test_rjumpv_into_stack_underflow eof_test 3 EOF code containing RJUMPV with target instruction that cause stack underflow
test_rjumpv_skips_stack_underflow eof_test 2 EOF code containing RJUMPV where the default path produces a stack underflow
test_rjumpv_into_rjump eof_test 6 EOF1I4200_0037 (Invalid) EOF code containing RJUMPV with target RJUMP immediate
test_rjumpv_into_rjumpi eof_test 6 EOF1I4200_0038 (Invalid) EOF code containing RJUMPV with target RJUMPI immediate
test_rjumpv_into_push_1 eof_test 6 EOF1I4200_0039 (Invalid) EOF code containing RJUMPV with target PUSH1 immediate
test_rjumpv_into_push_n eof_test 372 EOF1I4200_0039 (Invalid) EOF code containing RJUMPV with target PUSH1 immediate
test_rjumpv_into_rjumpv eof_test 12 EOF1I4200_0040 (Invalid) EOF code containing RJUMPV with target other RJUMPV immediate
test_rjumpv_into_callf eof_test 6 EOF1I4200_0041 (Invalid) EOF code containing RJUMPV with target CALLF immediate
test_rjumpv_into_dupn eof_test 3 EOF code containing RJUMP with target DUPN immediate
test_rjumpv_into_swapn eof_test 3 EOF code containing RJUMP with target SWAPN immediate
test_rjumpv_into_exchange eof_test 3 EOF code containing RJUMP with target EXCHANGE immediate
test_rjumpv_into_eofcreate eof_test 3 EOF code containing RJUMP with target EOFCREATE immediate
test_rjumpv_into_returncontract eof_test 3 EOF code containing RJUMP with target RETURNCONTRACT immediate
test_rjumpv_backwards_reference_only eof_test 1 EOF code containing instructions only reachable by backwards RJUMPV
test_rjumpv_at_the_end eof_test 1 https://github.com/ipsilon/eof/blob/main/spec/eof.md#stack-validation 4.i:(📖🐛?)
test_rjumpv_backwards_min_stack_wrong eof_test 1 Backwards rjumpv where min_stack does not match
test_rjumpv_rjumpi_backwards_min_stack_wrong eof_test 1 Backwards rjumpv where min_stack does not match
test_double_rjumpv eof_test 1 Two RJUMPVs, causing the min stack to underflow