Skip to content

test_rjumpv_truncated()

Documentation for tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py::test_rjumpv_truncated@verkle@v0.0.6.

Generate fixtures for these test cases for Pragueeip7692 with:

Pragueeip7692 only:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py::test_rjumpv_truncated --fork=PragueEIP7692 --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Pragueeip7692:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py::test_rjumpv_truncated --until=PragueEIP7692

EOF1I4200_0028/29/30/31 (Invalid) EOF code containing truncated RJUMPV

Source code in tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
@pytest.mark.parametrize(
    "branches",
    [1, 2, 256],
)
@pytest.mark.parametrize(
    "byte_count_last_branch",
    [0, 1],
)
def test_rjumpv_truncated(
    eof_test: EOFTestFiller,
    branches: int,
    byte_count_last_branch: int,
):
    """EOF1I4200_0028/29/30/31 (Invalid) EOF code containing truncated RJUMPV"""
    rjumpv_bytes = int.to_bytes(branches - 1, 1, "big")
    rjumpv_bytes += b"\0" * ((2 * (branches - 1)) + byte_count_last_branch)

    eof_test(
        data=Container.Code(code=Op.PUSH1(1) + Op.RJUMPV[rjumpv_bytes]),
        expect_exception=EOFException.TRUNCATED_INSTRUCTION,
    )

Parametrized Test Cases

The interactive table below is also available as a standalone page.

Skipped Parameters

For more concise readability, the table below does not list the following parameter values: fork, blockchain_test, state_test, state_test_only, eof_test, eof_state_test.

Test ID byte_count_last_branch branches
byte_count_last_branch_0-branches_1 0 1
byte_count_last_branch_0-branches_2 0 2
byte_count_last_branch_0-branches_256 0 256
byte_count_last_branch_1-branches_1 1 1
byte_count_last_branch_1-branches_2 1 2
byte_count_last_branch_1-branches_256 1 256