Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gov 1.5 - States #334

Open
rossneilson opened this issue Mar 23, 2023 · 0 comments
Open

Gov 1.5 - States #334

rossneilson opened this issue Mar 23, 2023 · 0 comments

Comments

@rossneilson
Copy link
Contributor

So, states with gov 1.5 are a little complex.

We are still going to need the idea of contract state which we get directly from subgraph as well as the actual state we want to show the user. Since we now have multiple types of state: state, proposal state and execution state, what we show the user is even more important.

All options we have:

enum State (this seems to have the same name in contracts, but think its just called state on the subgraph) {
        None,
        Submitted,
        Rejected,
        Passed
    }
enum ProposalState {
        None,
        Expired,
        ExecutedInQueue,
        ExecutedInBoost,
        Queued,
        PreBoosted,
        Boosted,
        QuietEndingPeriod
    }
enum ExecutionState {
        None,
        Failed,
        QueueBarCrossed,
        QueueTimeOut,
        PreBoostedBarCrossed,
        BoostedTimeOut,
        BoostedBarCrossed
}

Fortunately, a lot of these states are more details than most users actually need so we can discount execution state for the most part for now.

If the State variable in subgraph is Rejected or Passed then that is what we should show.

If Proposal State is anything but None then we should show that.

We also need to handle states where it hasn't yet been updated on the contracts but can be, for example

  • Pre-boosted state but ready for boosting (can be boosted)
  • Boosted but passed boost time (can be executed if over boost quorum)
  • Queued or boosted but passed quorum (can be executed)

Look into _execute() function in voting machine contracts to see logic for all of this

This stuff gets complicated with holographic consensus so reach out if this is not clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant