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

Test deposit top-up with inconsistent withdrawal credentials #1133

Merged
merged 18 commits into from
May 30, 2019

Conversation

michaelsproul
Copy link
Contributor

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 PR

CC @protolambda

JustinDrake and others added 5 commits May 25, 2019 00:35
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.
@djrtwo
Copy link
Contributor

djrtwo commented May 29, 2019

awesome! We could:

  1. do another minor version release
  2. make a quick patch to the v0.6.2 release and rerun tests
  3. just merge into dev and release with v0.7.0 next week

No strong preference here

@michaelsproul
Copy link
Contributor Author

I'm happy with (3)

@michaelsproul michaelsproul force-pushed the deposit-invalid-withdrawal-creds branch from cb2061c to f63f106 Compare May 29, 2019 03:59
@michaelsproul michaelsproul changed the base branch from master to dev May 29, 2019 04:00
@djrtwo djrtwo merged commit cc5b172 into ethereum:dev May 30, 2019
@michaelsproul michaelsproul deleted the deposit-invalid-withdrawal-creds branch May 30, 2019 06:57
djrtwo added a commit that referenced this pull request May 31, 2019
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

5 participants