Skip to content

Vote recorded before on_quorum runs — failed quorum strands the voter #185

@wmagev

Description

@wmagev

In smart-contracts/ink/lib.rs:230-233, record_vote writes at :230, then on_quorum runs at :232, and clear_request only runs at :233 on success.

If the closure returns Err, the vote is persisted on a request that won't be cleared until expiry, and the validator can't re-vote in the meantime (AlreadyVoted).

Low-frequency in practice — on_quorum closures mostly re-check state that was already checked — but real, and the window grows with any future closure that can fail on post-quorum invariants.

Direction: either run on_quorum before recording the vote, or clear the request on error as well as success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions