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

Withdrawals push #2836

Merged
merged 39 commits into from
Mar 24, 2022
Merged

Withdrawals push #2836

merged 39 commits into from
Mar 24, 2022

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Feb 23, 2022

  • BeaconState maintains a queue of withdrawal_receipts (one receipt added for each call to withdraw())
  • min(MAX_WITHDRAWAL_TRANSACTIONS_PER_PAYLOAD, len(withdrawal_receipts)) receipts are dequeued into ExecutionPayload at each slot
  • Validator updates on how to build such payloads using the ExecutionEngine interface
  • add a bunch of tests for process_withdrawals and process_full_withdrawals

@djrtwo djrtwo changed the title Withdrawals push [WIP]Withdrawals push Feb 23, 2022
@djrtwo djrtwo changed the title [WIP]Withdrawals push [WIP] Withdrawals push Feb 23, 2022
@mkalinin
Copy link
Collaborator

We may also consider a separate Withdrawal operation on EL side to avoid mixing it with application layer transactions. A list of such operations could be a replacement for a list of ommers in the block body. Processing withdrawals is going to be very simple and could be a replacement of ommers processing logic.

@vshvsh
Copy link

vshvsh commented Mar 12, 2022

We've been working on a proposal for execution layer only push with a mechanism closer to how the deposit contract works:
generalized message bus, partial withdrawals based on it. Maybe this will be of use in the discussion.

This was referenced Mar 15, 2022
@djrtwo djrtwo changed the title [WIP] Withdrawals push Withdrawals push Mar 16, 2022
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.

Great work!

I've run --preset=mainnet with this PR successfully.

Should we finish tests/core/pyspec/eth2spec/test/capella/fork/test_capella_fork_random.py in this PR? Or leave a TODO comment here?

specs/capella/beacon-chain.md Outdated Show resolved Hide resolved
specs/capella/beacon-chain.md Outdated Show resolved Hide resolved
specs/capella/beacon-chain.md Outdated Show resolved Hide resolved
```python
def process_block(state: BeaconState, block: BeaconBlock) -> None:
process_block_header(state, block)
if is_execution_enabled(state, block.body):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that this check and other checks in the spec that are related to the Merge transition should be removed in a cleanup fork after the Merge. Not directly related to Cappella but worth keeping in mind.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I think so too

will address in separate PR. It needs some testing fixes -- e.g. all transition tests need to be labeled with_only_bellatrix

Choose a reason for hiding this comment

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

Should be reviewed. There is a problem between the account and management account is being reviewed

Copy link
Member

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

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

great work! left some comments

edit: i'll make a separate pass on the tests left one comment on a test case, otherwise they are a great start!

specs/capella/beacon-chain.md Show resolved Hide resolved
specs/capella/beacon-chain.md Outdated Show resolved Hide resolved
specs/capella/beacon-chain.md Outdated Show resolved Hide resolved
specs/capella/beacon-chain.md Outdated Show resolved Hide resolved
specs/capella/beacon-chain.md Outdated Show resolved Hide resolved
specs/capella/fork-choice.md Show resolved Hide resolved
specs/capella/fork-choice.md Outdated Show resolved Hide resolved
specs/capella/validator.md Show resolved Hide resolved
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!

@djrtwo djrtwo merged commit 656e6ae into dev Mar 24, 2022
@djrtwo djrtwo deleted the withdrawals-push branch March 24, 2022 16:08
@ralexstokes ralexstokes mentioned this pull request Jun 7, 2022
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.

9 participants