Skip to content

Preserve historical proposal outcomes when quorum changes - #196

Draft
mswilkison wants to merge 2 commits into
codex/187-slither-upgradefrom
codex/checkpoint-governance-quorum
Draft

mswilkison wants to merge 2 commits into
codex/187-slither-upgradefrom
codex/checkpoint-governance-quorum

Conversation

@mswilkison

@mswilkison mswilkison commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Changing quorum currently recalculates old proposals using the latest numerator. An authorized reduction can revive a proposal that failed only for insufficient quorum; an increase can retroactively defeat a queued proposal. Checkpoint quorum numerators and read them at each proposal's snapshot so both governors preserve historical outcomes while future proposals use the updated requirement.

The existing public ABI, current-numerator getter, authorization, events, bounds, and predeployment query behavior are preserved. The implementation reuses the already-pinned OpenZeppelin Checkpoints library.

Addresses the custom-code counterpart of Dependabot #26, CVE-2022-31198. The operator independently confirmed no qualifying proposal is exploitable today. This is a source correction for future deployments; it does not alter the existing mainnet governor or automatically clear a package-version alert.

Stacked on #188 (codex/187-slither-upgrade, base 20a20d5), which is stacked on #182. Merge in order: #182#188 → this PR, retargeting each dependent PR after its base merges. Slither 0.8.0 cannot parse the aliased Checkpoints import; the existing scanner upgrade provides Slither 0.11.6 while retaining the detector gate.

Validation:

  • The original implementation fails all three new lifecycle regressions: for-only and for-plus-abstain proposal revival after a reduction, and retroactive defeat after an increase.
  • The corrected implementation passes all 388 contract tests, including historical/same-block updates, unchanged authorization, rejected queue/execute of defeated proposals, and successful future proposals under the new quorum.
  • Build, typecheck, lint/formatting, local deployment, prepack, and diff checks pass. Both governor ABIs are unchanged.
  • Independent candidate review found no concrete bypass or regression.
  • CI passes on head a2be670: all 388 contract tests, formatting, deployment dry run, documentation preview, and Slither 0.11.6 (85 contracts, 95 detectors, zero findings). The baseline annotations come from Upgrade Slither CI to 0.11.6 #188; this PR adds no detector exclusions or suppressions.

@mswilkison
mswilkison changed the base branch from chore/dependency-toolchain-refresh to codex/187-slither-upgrade September 12, 2026 02:04
@mswilkison
mswilkison marked this pull request as draft September 12, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant