-
Notifications
You must be signed in to change notification settings - Fork 998
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
Enables transfers of balance proportions > 32 ETH #936
Conversation
|
Now that we have transfers in phase 1 I don't think it's that bad :) Also, unlimited deposits mean that we may not need another contract to send Eth1 ETH to shards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Fixed a minor bug (
get_balance(transfer.sender)
->get_balance(state, transfer.sender)
- added a bunch of transfer tests
Can you add a bit more rationale to this PR for implementers?
* dev: Cleanup per-epoch processing presentation (#959)
Absolutely! My bad for not including it from the outset. The rationale behind this PR is to instead embrace transfers and to leverage them to provide the growth functionality we desire. By allowing validators to instantly transfer any portion of the balance that is > 32 ETH, validators can simulate the desired growth profile through repeated transfers. This has the the enhancement of improving the liquidity of validators' stakes allowing them to syphon off the rewards they accrue to either instantiate new validator instances or to be put into alternate Defi instruments. This has the further enhancement of removing the necessity of enforcing maximum deposit sizes. :) |
This needs an associated PR allowing deposits > MAX_EFFECTIVE on the deposit contract before merge |
This is not strictly needed. The deposit contract just asserts the deposit is <=MAX_EFFECTIVE, but everything will work without this change. That said, I'll make the deposit contract PR now. |
It needs deposit contract updates since you changed:
to
I remember the original reasons that we bound it are:
|
The condition can become
With transfers fat fingers are not too bad. Whoever deposited 320 ETH can do the following:
So the fat-finger BETH is definitely not unrecoverable or stuck with transfers.
I think we have our cake (simple deposit contract) and eat it too (use it for phase 2). |
not sure we can commit to this. The deposit contract has no notion of a destination shard and also requires a minimum of 1eth deposit. We should have a mechanism to reduce dust transfers but 1eth seems very high for a user transfer. |
@@ -347,7 +347,7 @@ def get_valid_transfer(state, slot=None, sender_index=None, amount=None, fee=Non | |||
fee=fee, | |||
slot=slot, | |||
pubkey=transfer_pubkey, | |||
signature=EMPTY_SIGNATURE, | |||
signature=ZERO_HASH, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems wrong. This line should go away.
As per discussions around the new balance schemes, this PR allows the proportion of a validator's balance that is > 32 ETH to be transferred.
This stems from my insistence that validators receive compounding growth. If this was not the case, I argued that validators would be incentivised to transfer frequently causing frequent validator set changes. I argue this point fully in the recently closed #730.
The rationale behind this PR is to instead embrace transfers and to leverage them to provide the growth functionality we desire. By allowing validators to instantly transfer any portion of the balance that is > 32 ETH, validators can simulate the desired growth profile through repeated transfers. This has the the enhancement of improving the liquidity of validators' stakes allowing them to syphon off the rewards they accrue to either instantiate new validator instances or to be put into alternate Defi instruments. This has the further enhancement of removing the necessity of enforcing maximum deposit sizes. :)