-
Notifications
You must be signed in to change notification settings - Fork 933
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
Test deposit top-up with inconsistent withdrawal credentials #1133
Merged
djrtwo
merged 18 commits into
ethereum:dev
from
michaelsproul:deposit-invalid-withdrawal-creds
May 30, 2019
Merged
Test deposit top-up with inconsistent withdrawal credentials #1133
djrtwo
merged 18 commits into
ethereum:dev
from
michaelsproul:deposit-invalid-withdrawal-creds
May 30, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Possible fix to avoid four cases of divisions by zero: * `return state.validator_registry[index].effective_balance // adjusted_quotient // BASE_REWARDS_PER_EPOCH` * `rewards[index] += get_base_reward(state, index) * attesting_balance // total_balance` * `validator.effective_balance * min(total_penalties * 3, total_balance) // total_balance` * `rewards[index] += base_reward * attesting_balance // committee_balance` See also ethereum#1107.
Release V06x into master
awesome! We could:
No strong preference here |
I'm happy with (3) |
cb2061c
to
f63f106
Compare
Fix linter errors
Fix Test Formats Broken Links
Avoid divisions by zero
Simplify deposits
djrtwo
approved these changes
May 30, 2019
…/michaelsproul/eth2.0-specs into michaelsproul-deposit-invalid-withdrawal-creds
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lighthouse had a check on Deposit withdrawal credentials that was left over from v0.4, which is no longer required (and would break consensus). I wrote this test to confirm the spec's behaviour, and figured it might be useful for other client implementers too.
Not sure exactly which base branch to target, if you'd prefer this merged into
dev
, I'll update the PRCC @protolambda