Test RJUMPI¶
Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py@206854b5
.
Generate fixtures for these test cases for Osaka with:
fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py --fork Osaka
Test Functions Overview¶
Name | Type | Cases (Osaka) | Description |
---|---|---|---|
test_rjumpi_condition_forwards |
state_test | 2 | Test RJUMPI contract switching based on external input |
test_rjumpi_condition_backwards |
state_test | 2 | Test RJUMPI contract switching based on external input |
test_rjumpi_condition_zero |
state_test | 2 | Test RJUMPI contract switching based on external input |
test_rjumpi_forwards |
eof_state_test | 0 | EOF1V4200_0004 (Valid) EOF code containing RJUMPI (Positive) |
test_rjumpi_backwards |
eof_state_test | 0 | EOF1V4200_0005 (Valid) EOF code containing RJUMPI (Negative) |
test_rjumpi_zero |
eof_state_test | 0 | EOF1V4200_0006 (Valid) EOF code containing RJUMPI (Zero) |
test_rjumpi_max_forward |
eof_state_test | 0 | EOF1V4200_0007 (Valid) EOF with RJUMPI containing the maximum offset (32767) |
test_rjumpi_max_backward |
eof_state_test | 0 | EOF with RJUMPI containing the maximum negative offset (-32768) |
test_rjumpi_max_bytecode_size |
eof_test | 1 | EOF1V4200_0003 EOF with RJUMPI containing the maximum offset that does not exceed the maximum |
test_rjumpi_truncated |
eof_test | 1 | EOF1I4200_0014 (Invalid) EOF code containing truncated RJUMPI |
test_rjumpi_truncated_2 |
eof_test | 1 | EOF1I4200_0015 (Invalid) EOF code containing truncated RJUMPI |
test_rjumpi_into_header |
eof_test | 1 | EOF1I4200_0016 (Invalid) EOF code containing RJUMPI with target outside code bounds |
test_rjumpi_jump_before_header |
eof_test | 1 | EOF1I4200_0017 (Invalid) EOF code containing RJUMPI with target outside code bounds |
test_rjumpi_into_data |
eof_test | 1 | EOF1I4200_0018 (Invalid) EOF code containing RJUMPI with target outside code bounds |
test_rjumpi_after_container |
eof_test | 1 | EOF1I4200_0019 (Invalid) EOF code containing RJUMPI with target outside code bounds |
test_rjumpi_to_code_end |
eof_test | 1 | EOF1I4200_0020 (Invalid) EOF code containing RJUMPI with target outside code bounds |
test_rjumpi_into_self_data_portion |
eof_test | 2 | EOF1I4200_0021 (Invalid) EOF code containing RJUMPI with target same RJUMPI immediate |
test_rjumpi_into_self |
eof_test | 1 | EOF1I4200_0021 (Invalid) EOF code containing RJUMPI with target same RJUMPI immediate |
test_rjumpi_into_stack_height_diff |
eof_test | 1 | EOF code containing RJUMPI with target instruction that causes stack height difference |
test_rjumpi_into_stack_underflow |
eof_test | 1 | EOF code containing RJUMPI with target instruction that cause stack underflow |
test_rjumpi_skips_stack_underflow |
eof_test | 1 | EOF code containing RJUMPI where the default path produces a stack underflow |
test_rjumpi_into_rjump |
eof_test | 1 | EOF1I4200_0023 (Invalid) EOF code containing RJUMPI with target RJUMP immediate |
test_rjumpi_into_rjumpi |
eof_test | 1 | EOF1I4200_0022 (Invalid) EOF code containing RJUMPI with target other RJUMPI immediate |
test_rjumpi_into_push_1 |
eof_test | 2 | EOF1I4200_0024 (Invalid) EOF code containing RJUMPI with target PUSH1 immediate |
test_rjumpi_into_push_n |
eof_test | 124 | EOF1I4200_0024 (Invalid) EOF code containing RJUMPI with target PUSH2+ immediate |
test_rjumpi_into_rjumpv |
eof_test | 4 | EOF1I4200_0025 (Invalid) EOF code containing RJUMPI with target RJUMPV immediate |
test_rjumpi_into_callf |
eof_test | 2 | EOF1I4200_0026 (Invalid) EOF code containing RJUMPI with target CALLF immediate |
test_rjumpi_into_dupn |
eof_test | 1 | EOF code containing RJUMP with target DUPN immediate |
test_rjumpi_into_swapn |
eof_test | 1 | EOF code containing RJUMP with target SWAPN immediate |
test_rjumpi_into_exchange |
eof_test | 1 | EOF code containing RJUMP with target EXCHANGE immediate |
test_rjumpi_into_eofcreate |
eof_test | 1 | EOF code containing RJUMP with target EOFCREATE immediate |
test_rjumpi_into_returncontract |
eof_test | 1 | EOF code containing RJUMP with target RETURNCONTRACT immediate |
test_rjumpi_backwards_reference_only |
eof_test | 1 | EOF code containing instructions only reachable by backwards RJUMPI |
test_rjumpi_stack_validation |
eof_test | 1 | Check that you can get to the same opcode with two different stack heights |
test_rjumpi_at_the_end |
eof_test | 1 | https://github.com/ipsilon/eof/blob/main/spec/eof.md#stack-validation 4.i:(📖🐛?) |
test_tangled_rjumpi |
eof_test | 1 | EOF code containing tangled RJUMPI paths |
test_rjumpi_backwards_onto_dup |
eof_test | 1 | Backwards jumpi onto a dup |
test_rjumpi_backwards_min_stack_wrong |
eof_test | 1 | Backwards rjumpi where min_stack does not match |
test_rjumpi_rjumpv_backwards_min_stack_wrong |
eof_test | 1 | Backwards rjumpv where min_stack does not match |
test_double_rjumpi_stack_underflow |
eof_test | 1 | Two RJUMPIs, causing the min stack to underflow. |
test_double_rjumpi_stack_height_mismatch |
eof_test | 1 | Test stack height check of the backward RJUMP |
test_double_rjumpi_invalid_max_stack_height |
eof_test | 1 | Test max stack height of the final block |