Skip to content

Commit

Permalink
Soft opt out (cosmos#833)
Browse files Browse the repository at this point in the history
* WIP soft opt out code with incomplete boilerplate

* proto changes

* Seems like it should work

* Unit test for UpdateLargestSoftOptOutValidatorPower

* fixes and renames, unit tests work

* update comment

* log

* Update proto/interchain_security/ccv/consumer/v1/consumer.proto

Co-authored-by: Marius Poke <marius.poke@posteo.de>

* better validation for soft opt out threshhold

* improve test

* slicestable

* semantics and improved test

* use correct key util

* Update module.go

* comment

* updated semantics

* separate files

* fix TestMakeConsumerGenesis test

* fix naming

* change upper bound on soft opt out thresh

* fix test

* allow empty valset for tests

* gofumpt and fix from merge

* Update x/ccv/consumer/types/params_test.go

* Update x/ccv/consumer/types/params.go

* Soft opt out diff tests (cosmos#847)

* wip

* fixes for ts build

* AI fixed my bug lol

* throw error when needed

* comment

* disable soft opt-out in diff testing

* update diff testing model

* update UTs

---------

Co-authored-by: mpoke <marius.poke@posteo.de>

* add comment about beginblocker order requirement for soft opt-out

---------

Co-authored-by: Jehan Tremback <hi@jehan.email>
Co-authored-by: Marius Poke <marius.poke@posteo.de>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
  • Loading branch information
4 people authored Apr 13, 2023
1 parent 673b6c4 commit f7fb129
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions proto/interchain_security/ccv/consumer/v1/consumer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ message Params {
// which should be smaller than that of the provider in general.
google.protobuf.Duration unbonding_period = 9
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];

// The threshold for the percentage of validators at the bottom of the set who
// can opt out of running the consumer chain without being punished. For example, a
// value of 0.05 means that the validators in the bottom 5% of the set can opt out
string soft_opt_out_threshold = 10;
}

// LastTransmissionBlockHeight is the last time validator holding
Expand Down

0 comments on commit f7fb129

Please sign in to comment.