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

Add sync_committee_rewards #262

Merged
merged 17 commits into from
Nov 22, 2022

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
Collaborator

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

beacon-node-oapi.yaml Outdated Show resolved Hide resolved
@michaelsproul
Copy link
Collaborator

@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
Collaborator

@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

apis/beacon/blocks/sync_committee_rewards.yaml Outdated Show resolved Hide resolved
types/sync_committee_rewards.yaml Outdated Show resolved Hide resolved
@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
Collaborator

@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.

beacon-node-oapi.yaml Outdated Show resolved Hide resolved
@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
Collaborator

@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
Collaborator

@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