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

Simplify deposits #780

Merged
merged 4 commits into from
Mar 26, 2019
Merged

Simplify deposits #780

merged 4 commits into from
Mar 26, 2019

Conversation

JustinDrake
Copy link
Collaborator

Fix #760

Copy link
Contributor

@hwwhww hwwhww left a comment

Choose a reason for hiding this comment

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

LGTM 👍
pending on CI to verify.

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

This PR requires two things:

  1. a corresponding change in the deposit contract repo
  2. an assertion in the deposit contract that ensures that the amount contained in thedeposit_data payload is equivalent to the amount of eth that came in on the tx. Otherwise, a user could send a 1eth tx but put in the deposit_data.amount some value higher than 1

@JustinDrake
Copy link
Collaborator Author

Opened an issue :)

ethereum/deposit_contract#24

@NIC619
Copy link
Contributor

NIC619 commented Mar 21, 2019

Opened the PR at
ethereum/deposit_contract#25 .

I didn't change much: first compute amount from msg.value then concatenate it with deposit_input.
But this differs from the spec in the order of the data in deposit_data:
this PR has amount + pubkey + withdrawal_credentials + proof_of_possession,
spec has pubkey + withdrawal_credentials + amount + proof_of_possession.
I can change the order if the spec one is preferred.

@JustinDrake
Copy link
Collaborator Author

@NIC619 The spec ordering was chosen to be consistent with the Validator object which has pubkey and withdrawal_credentials as the first two fields (those are the two fixed fields).

@NIC619
Copy link
Contributor

NIC619 commented Mar 21, 2019

@hwwhww hwwhww mentioned this pull request Mar 23, 2019
@djrtwo
Copy link
Contributor

djrtwo commented Mar 26, 2019

Similar to #779 , @NIC619 I think we should merge ethereum/deposit_contract#25 into dev only to be released when this is released via v0.6.0 as to not confuse those targeting v0.5.x

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

Looks good. Added tests, fixed a bug.

@djrtwo djrtwo merged commit 9bc1928 into dev Mar 26, 2019
@djrtwo djrtwo deleted the JustinDrake-patch-7 branch March 26, 2019 13:40
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