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

node: Reward Voters/Validators of previous block #1873

Merged
merged 31 commits into from
Jul 3, 2024
Merged

node: Reward Voters/Validators of previous block #1873

merged 31 commits into from
Jul 3, 2024

Conversation

goshawk-3
Copy link
Contributor

@goshawk-3 goshawk-3 commented Jun 20, 2024

resolves #1832

Acceptance criteria:

  • Total reward of the validators/voters of previous block must be 10% of the reward value
  • Generator reward must be 80% of the reward value
  • Restarting a node should initialize consensus task with voters list of tip attestation
  • Any call to est/vst/accept/finalize should use voters list of tip attestation
  • The initialization of the consensus task after accepting a block should reuse the generated committees in verify_block_header
{
  "timestamp": "2024-06-27T08:57:57.361558Z",
  "level": "INFO",
  "event": "generator rewarded",
  "voter": "\"244Sywxj7PuMHpcPxemaXLcrY5rPgztra6H9Vz8cU1Ro5v23SxKTfVqr2yS7NXAXE1iq59ndn4aMZmYxuzu3Te3e9fokQKTUkYvFxYg2P2E8EEg1gWUbs3AFL2aNx62HQd7r\"",
  "reward": 12800000000,
  "target": "rusk::chain::rusk"
}

{
   "timestamp": "2024-06-27T08:57:57.362798Z",
   "level": "INFO",
   "event": "voter rewarded",
   "voter": "\"rdHa4H5p1rVtQyqD5AjDHyr1EGg7yVU1wynqQ9VRqU8Wp7kMcePsSk2tURGzRLnzS36CaKEadpfRGwa3ucvFH5MEGYvF1LAqSQQT3zE1Fx7wQzYsrvDpJ44bBa6dKxN6mTC\"",
   "reward": 587500000,
   "target": "rusk::chain::rusk"
}

{
   "timestamp": "2024-06-27T08:57:57.364062Z",
   "level": "INFO",
   "event": "voter rewarded",
   "voter": "\"rvXLHF8DBNwzZ63uSWPki3y7uNgGbdRCrKpouEP9N7awiGBDaP1uzyrtLBDtFbNgw8bPNjbyMsfAsNutZKnuX8JXzMiFvpW9vK4c2zmAmk3RygzwiFGCVJ9KSU7b4bgC1UT\"",
   "reward": 437500000,
   "target": "rusk::chain::rusk"
}

{
   "timestamp": "2024-06-27T08:57:57.365053Z",
   "level": "INFO",
   "event": "voter rewarded",
   "voter": "\"244Sywxj7PuMHpcPxemaXLcrY5rPgztra6H9Vz8cU1Ro5v23SxKTfVqr2yS7NXAXE1iq59ndn4aMZmYxuzu3Te3e9fokQKTUkYvFxYg2P2E8EEg1gWUbs3AFL2aNx62HQd7r\"",
   "reward": 575000000,
   "target": "rusk::chain::rusk"
}

@goshawk-3 goshawk-3 marked this pull request as ready for review June 25, 2024 15:03
consensus/src/validation/step.rs Outdated Show resolved Hide resolved
rusk/src/lib/chain/rusk.rs Outdated Show resolved Hide resolved
rusk/src/lib/chain/rusk.rs Outdated Show resolved Hide resolved
node/src/chain/header_validation.rs Show resolved Hide resolved
node/src/chain/acceptor.rs Outdated Show resolved Hide resolved
node/src/chain/header_validation.rs Show resolved Hide resolved
node/src/chain/acceptor.rs Outdated Show resolved Hide resolved
node/src/chain/acceptor.rs Outdated Show resolved Hide resolved
node/src/chain/acceptor.rs Outdated Show resolved Hide resolved
node/src/chain/acceptor.rs Show resolved Hide resolved
goshawk-3 added 2 commits June 28, 2024 17:00
- Proper set of voters here means the voters that generate the candidate_block.prev_block_cert
- The mutex around executor instance is removed to avoid deadlock
@goshawk-3 goshawk-3 force-pushed the fix-1832 branch 2 times, most recently from da56bdc to 2f97b02 Compare June 28, 2024 14:28
@fed-franz
Copy link
Contributor

@goshawk-3 There are some unanswered comments from my previous review (maybe you missed them since they were hidden by github). Please address/answer them before I approve the PR.

herr-seppia
herr-seppia previously approved these changes Jul 3, 2024
Copy link
Member

@herr-seppia herr-seppia left a comment

Choose a reason for hiding this comment

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

LGTM

node/src/chain/acceptor.rs Show resolved Hide resolved
node/src/chain/header_validation.rs Outdated Show resolved Hide resolved
@goshawk-3 goshawk-3 requested a review from herr-seppia July 3, 2024 12:47
Copy link
Contributor

@fed-franz fed-franz left a comment

Choose a reason for hiding this comment

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

LGTM

@goshawk-3 goshawk-3 merged commit 0e41042 into master Jul 3, 2024
8 checks passed
@goshawk-3 goshawk-3 deleted the fix-1832 branch July 3, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

consensus: Assign rewards to Quorum voters
3 participants