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

attesation proposer rewards to block processing #920

Merged
merged 21 commits into from
Apr 17, 2019
Merged

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Apr 14, 2019

Handles #906

  • move attestation proposer rewards to block processing
  • beacon block proposer can only be deterministically checked during the slot in question because balances might change at every block. thus removal of slot param from get_beacon_proposer_index
  • extend some helper functionality to be more modular to be used in this context

todo: write some tests

@djrtwo djrtwo mentioned this pull request Apr 14, 2019
@hwwhww
Copy link
Contributor

hwwhww commented Apr 16, 2019

- def get_beacon_proposer_index(state: BeaconState,
-                               slot: Slot) -> ValidatorIndex:
+ def get_beacon_proposer_index(state: BeaconState) -> ValidatorIndex:

But it is useful for block proposal!
https://github.com/ethereum/eth2.0-specs/blob/442aa0e7f34012b37e61f19e156246694ac76997/specs/validator/0_beacon-chain-validator.md#block-proposal

@JustinDrake
Copy link
Collaborator

But it is useful for block proposal!

It's a fundamental constraint with the current proposer sampling logic.

Screenshot 2019-04-16 at 14 30 15

@djrtwo djrtwo requested review from hwwhww and JustinDrake and removed request for hwwhww April 16, 2019 21:18
@JustinDrake
Copy link
Collaborator

Removed ~30 lines and made things more readable... but broke the tests 😂

@JustinDrake JustinDrake merged commit 882937b into dev Apr 17, 2019
@hwwhww hwwhww deleted the proposer-reward-906 branch May 9, 2019 07:18
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.

None yet

3 participants