Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

chain: Introduce the notion of active validators who are performing oracle tasks #2111

Merged
merged 10 commits into from
Jun 30, 2020

Conversation

sorawit
Copy link
Member

@sorawit sorawit commented Jun 30, 2020

Implementation details

The PR adds the concept of "active" validators who are performing oracle tasks on BandChain and replace ReportInfo completely.

With this PR, validators are marked "active" if they are actively performing oracle tasks (report data). If a validator fails to report data, they are immediately switched back to "inactive" and cannot switch back to "active" until after certain duration. Block rewards (inflation + tx fee) are split into two pools, one will be rewarded to all currently active validators, while the other will be rewarded to all bonded validators as usual.


Please ensure the following requirements are met before submitting a pull request:

  • The pull request is targeted against the correct target branch
  • The pull request includes a description of the implementation/work done in detail.
  • The pull request includes any and all appropriate unit/integration tests
  • You have added a relevant changelog entry to CHANGELOG_UNRELEASED.md
  • You have re-reviewed the files affected by the pull request (e.g. using the Files changed tab in the Github PR explorer)

@render
Copy link

render bot commented Jun 30, 2020

Copy link
Member

@taobun taobun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's abci.go to perform begin block logic of oracle?

@@ -41,6 +41,8 @@ var (
ReporterStoreKeyPrefix = []byte{0x05}
// ReportInfoKeyPrefix is the prefix for validator report info store.
ReportInfoKeyPrefix = []byte{0x06}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this key

@sorawit
Copy link
Member Author

sorawit commented Jun 30, 2020

Tests will be added in separate commits

@sorawit sorawit merged commit 8f963bb into master Jun 30, 2020
@sorawit sorawit deleted the activate-initial-impl branch June 30, 2020 19:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants