Skip to content

Dispute Kit bug: do not push address(0) in round.votes when there are no juror staked on the requested court #2059

@jaybuidl

Description

@jaybuidl

Issue

Calling draw() on an empty court breaks the dispute by pushing address(0) in the DK round.votes here because _postDrawCheck() does not validate drawnAddress

Impact

It is impossible to castVote(), even after successfully drawing jurors.

Fix

Fail _postDrawCheck() if drawnAddress is address(0).

Context

This bug was always present but was exacerbated by the fix for #2003 which removed these lines.

Devnet example

Dispute (3 jurors in the oracle court)
Empty draw tx
Successful draw tx
Failing castVote tx

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions