Skip to content

Commit

Permalink
governance: lower emergency vote threshold to 1/3 (#4440)
Browse files Browse the repository at this point in the history
This changes the ratio in tally.rs emergency_pass() to 1/3 and also
updates any comments/docs referring to the previous 2/3 threshold. Note:
this will also affect `IBCFreeze` and `IBCUnfreeze`, so those have also
gotten easier to accomplish (seems fine for the same reasons, but wasn't
explicitly noted in the ticket). Closes #4389.
  • Loading branch information
aubrika authored May 23, 2024
1 parent 5ad7180 commit a9d5c7b
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
Binary file modified crates/cnidarium/src/gen/proto_descriptor.bin.no_lfs
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl ActionHandler for ValidatorVote {
tracing::debug!(validator_identity = %identity_key, proposal = %proposal, "cast validator vote");
state.cast_validator_vote(*proposal, *identity_key, *vote, reason.clone());

// Emergency proposals are passed immediately after receiving +2/3 of
// Emergency proposals are passed immediately after receiving +1/3 of
// validator votes. These include the eponymous `Emergency` proposal but
// also `IbcFreeze` and `IbcUnfreeze`.
let proposal_payload = state
Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/governance/src/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub enum ProposalPayload {
/// An optional commit hash for code that this proposal refers to.
commit: Option<String>,
},
/// An emergency proposal is immediately passed when 2/3 of all validators approve it, without
/// An emergency proposal is immediately passed when 1/3 of all validators approve it, without
/// waiting for the voting period to conclude.
Emergency {
/// If `halt_chain == true`, then the chain will immediately halt when the proposal is
Expand Down
4 changes: 2 additions & 2 deletions crates/core/component/governance/src/tally.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ impl Tally {
}

// Now that we've checked for slash and quorum, we can just check to see if it should pass in
// the emergency condition of 2/3 majority of voting power
Ratio::new(self.yes, total_voting_power) > Ratio::new(2, 3)
// the emergency condition of 1/3 majority of voting power
Ratio::new(self.yes, total_voting_power) > Ratio::new(1, 3)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ pub mod proposal {
)
}
}
/// An emergency proposal can be passed instantaneously by a 2/3 majority of validators, without
/// An emergency proposal can be passed instantaneously by a 1/3 majority of validators, without
/// waiting for the voting period to expire.
///
/// If the boolean `halt_chain` is set to `true`, then the chain will halt immediately when the
Expand Down
Binary file modified crates/proto/src/gen/proto_descriptor.bin.no_lfs
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/guide/src/pcli/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ may be included to specify these changes.
#### Emergency Proposals

Emergency proposals are meant for when immediate action is required to address a crisis, and
conclude early as soon as a 2/3 majority of all active voting power votes yes.
conclude early as soon as a 1/3 majority of all active voting power votes yes.

Emergency proposals have the power to optionally halt the chain when passed. If this occurs,
off-chain coordination between validators will be required to restart the chain.
Expand Down
6 changes: 3 additions & 3 deletions docs/protocol/src/concepts/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ proposals can reclaim their deposit).
Proposals can either be normal or emergency proposals. In either case, the
voting period begins immediately, in the next block after the proposal has been
committed to the chain. Normal proposals have a fixed-length voting period,
while emergency proposals are accepted as soon as a 2/3 majority of the stake is
while emergency proposals are accepted as soon as a 1/3 majority of the stake is
reached.

Because validators provide default votes for their delegation pool, an emergency
proposal can in principle be accepted immediately, without any input from
delegators. This allows time-critical resolution of emergencies (e.g., deploying
an 0day hotfix); the 2/3 majority of the stake required is already sufficient to
arbitrarily rewrite the chain state.
an 0day hotfix); a 1/3 + 1 plurality of the stake required is already sufficient to
halt the chain.

Proposals can also be withdrawn by their proposer prior to the end of the voting
period. This is done by creating a transaction with a `ProposalWithdraw`
Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/src/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ may be included to specify these changes.
#### Emergency Proposals

Emergency proposals are meant for when immediate action is required to address a crisis, and
conclude early as soon as a 2/3 majority of all active voting power votes yes.
conclude early as soon as a 1/3 majority of all active voting power votes yes.

Emergency proposals have the power to optionally halt the chain when passed. If this occurs,
off-chain coordination between validators will be required to restart the chain.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ message Proposal {
string commit = 1;
}

// An emergency proposal can be passed instantaneously by a 2/3 majority of validators, without
// An emergency proposal can be passed instantaneously by a 1/3 majority of validators, without
// waiting for the voting period to expire.
//
// If the boolean `halt_chain` is set to `true`, then the chain will halt immediately when the
Expand Down

0 comments on commit a9d5c7b

Please sign in to comment.