Skip to content

Governance Feature: prevent potential future state changes of past proposal state #200

@gabririgo

Description

@gabririgo

Rigoblock governance has an upgradable quorum. The quorum for determining a proposal state is read from the state, meaning that should the quorum change (in this context decrease) at some point in the future, there is a possible edge scenario where a past failed proposal becomes executable, causing unintended behavior. While it would be formally correct, in practice a change in the quorum should only affect future proposals, and past proposals state should be deterministic.

Possible patch:

  1. limited time window to queue a successful proposal, cannot be queued (and executed) in case of future changes in quorum
  2. add quorum checkpoints. This solution is gas-expensive and requires writing quorum at block whenever changes, plus looping through all past quorum checkpoints at each vote action, as the proposal state is verified in the call
  3. storing quorum in the proposal struct. Because of optimizer struct storage compression, this could probably not result in higher proposal creation gas cost, as there is enough room for another uint96 slot (actually uint104).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requeststaleStale issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions