FFORGE//RS
← Roadmap

blockchain / LEVEL 5

The validator counted twice

EST.55 MIN
01

THEORY / RETRIEVAL

What to restore

  • Count voting power from a trusted validator set
  • Deduplicate repeated votes and exclude equivocation
  • Apply a strict greater-than-two-thirds threshold safely

Validator identity maps to trusted voting power

A vote message cannot self-report its weight. Consensus looks up the authenticated validator in the active set for the relevant height and round. Retransmitted votes count once; conflicting votes are evidence, not extra power.

Finality thresholds depend on the protocol model

Many BFT protocols require strictly more than two-thirds of voting power for a certificate under assumptions about less than one-third Byzantine power. Round, height, lock rules, validator-set changes and signature domains are also part of safety; this arithmetic is only one layer.

CHECKPOINT

A validator sends two conflicting votes for the same height and round. How should a tally treat its voting power for the target certificate?

ISOLATED RUST 1.96
src/lib.rsEDIT

02 / CODE REVIEW

Make the code safe

Implement a weighted target-block tally. Reject duplicate/zero-power validator sets, ignore unknown voters, count identical retransmits once, exclude a validator that votes for conflicting blocks, and finalize only when signed_power * 3 > total_power * 2.

Initializing editor…
CLOUD SANDBOXnetwork off · 256 MB · 12 s
1 / 64 KB
OUTPUT
Runner is waiting for a submission.