Skip to content

Conversation

@kevinbogner
Copy link
Contributor

@kevinbogner kevinbogner commented Nov 9, 2022

Reference: #260 (review)

/eth/v1/beacon/rewards/sync_committee/{block_id}

{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "validator_index": "0",
      "reward": "2000"
    }
  ]
}

@dapplion
Copy link
Member

dapplion commented Nov 11, 2022

@michaelsproul how do you plan to fulfill this API? AFAIK we don't have that information available after block processing since the rewards are "merged" into the balances array

@michaelsproul
Copy link
Contributor

@dapplion I'm intending to replay blocks. For sync aggregates it's just a matter of loading the pre-state, and calculating the rewards based on the bits set in the sync aggregate

Copy link
Contributor

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Looking good! Almost ready to go I think

@kevinbogner kevinbogner marked this pull request as ready for review November 14, 2022 15:58
@kevinbogner kevinbogner changed the title WIP: Add sync_committee_rewards Add sync_committee_rewards Nov 14, 2022
michaelsproul
michaelsproul previously approved these changes Nov 16, 2022
Copy link
Contributor

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

LGTM, I'm happy to merge.

@ensi321
Copy link
Contributor

ensi321 commented Nov 16, 2022

Just renamed types/sync_committee_rewards.yaml to rewards.yaml. It will be merged with types/rewards.yaml in the other PR

rolfyone
rolfyone previously approved these changes Nov 18, 2022
Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

LGTM, I think post will be better once you get into it, so thanks for persisting!

Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

LGTM

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.

5 participants