Skip to content

Add a deterministic regression test for the proposal-rejection fallback sync #6453

Description

@ma2bd

ChainClient::process_pending_block_without_prepare now falls back to an explicit synchronize_chain_state when a rejected proposal didn't advance local consensus state, to reliably absorb a locking block that the lazy per-validator pull (Updater::send_block_proposal) missed.

That lazy-pull miss is a timing race: communicate_with_quorum breaks as soon as a quorum is impossible (after f+1 rejections) and drops the still-in-flight synchronize_chain_state_from calls, so a lock held only by the slower-to-respond validators isn't absorbed. The race can't be forced deterministically with the current fault-injection harness (no fault type makes a lock-holder skip the rejection while staying reachable for the sync).

A deterministic test needs a clock-driven per-validator response delay in LocalValidatorClient, building on the client clock seam from #6448, so 0/1 can be made to respond ahead of 2/3 reproducibly. Until then the path is only covered indirectly by the (now non-flaky) test_lazy_pull_absorbs_locking_block_on_proposal_rejection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions