Skip to content

tests: add test_block_with_wrong_slot test vector #120

@tcoratger

Description

@tcoratger

After #118 is merged, we should add a test like this (I think for now we don't have enough testing tools so that we need to build new tools as well in the meantime, not exactly sure):

def test_block_with_wrong_slot(
    state_transition_test: StateTransitionTestFiller,
) -> None:
    """
    Test that blocks with mismatched slot are rejected.

    Scenario
    --------
    Attempt to process a block at slot 1, but the block claims to be
    at slot 2.

    Expected Behavior
    -----------------
    Block processing fails with AssertionError: "Block slot mismatch"

    Why This Matters
    ----------------
    Ensures temporal consistency:
    - Blocks can't lie about their slot
    - Prevents time manipulation attacks
    - Maintains protocol timing integrity
    - Essential for slot-based consensus
    """

Metadata

Metadata

Assignees

Labels

testsScope: Changes to the spec tests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions