-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ADR-25): Remove voting power from jailed finality providers (#65)
This PR partially closes #64 by jailing sluggish finality providers by not assigning voting power to them in the voting power table. In particular, this PR made the following changes: 1. Change the `sluggish` label of a finality provider to `jailed`. 2. Implement `AfterSluggishFinalityProviderDetected` hook in the `x/btcstaking` module to set the label of a finality provider to `jailed`. 3. Introduce `EventJailedFinalityProvider` event as `EventPowerDistUpdate`, which is emitted after a finality provider is jailed. 4. Introduce a new parameter `jail_duration` to `x/finality` (needs to handle upgrade in a separate PR). 5. Introduce a new field `jailed_until` to `FinalityProviderSigningInfo` in `x/finality`, which is calculated as the timestamp of the jailing block plus the `jail_duration` of the parameter. 6. Clear the signing info record of the jailed finality provider and set `jailed_until=jailingBlock.Time.Add(params.JailDuration)`. 7. Within the `BeginBlocker` of the next block, upon `EventJailedFinalityProvider`, record the finality provider public key and do not assign voting power to it. 8. Modify relevant tests
- Loading branch information
Showing
34 changed files
with
1,147 additions
and
730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.