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

ePBS #9

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from
Open

ePBS #9

wants to merge 13 commits into from

Conversation

potuz
Copy link
Owner

@potuz potuz commented Jun 24, 2024

Minimal ePBS changes, no Inclusion lists. Based on top of Electra.

The full design notes are included in https://hackmd.io/@potuz/rJ9GCnT1C
Forkchoice annotated spec can be found in https://hackmd.io/@potuz/SJdXM43x0

  • Beacon chain changes
  • Forkchoice changes
  • Validator changes
  • Builder changes
  • P2P changes
  • Fork changes
  • Pyspec execution

@potuz potuz changed the title beacon chain changes ePBS. minimal implementation. No IL Jun 24, 2024
@potuz potuz force-pushed the epbs_no_il branch 2 times, most recently from 86ce325 to c8ca26f Compare June 25, 2024 09:44
@potuz potuz changed the title ePBS. minimal implementation. No IL ePBS Jun 25, 2024

# Transfer the funds from the builder to the proposer
decrease_balance(state, builder_index, amount)
increase_balance(state, block.proposer_index, amount)
Copy link
Owner Author

Choose a reason for hiding this comment

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

TODO: We can use the churn mechanism of 7002 to transfer slowly these balances instead of lump transfer here.


```python
class ExecutionPayloadEnvelope(Container):
payload: ExecutionPayload
Copy link
Owner Author

Choose a reason for hiding this comment

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

This can be made Optional in the case of the withheld payload.

assert envelope.builder_index == committed_header.builder_index
assert committed_header.blob_kzg_commitments_root == hash_tree_root(envelope.blob_kzg_commitments)

if not envelope.payload_withheld:
Copy link
Owner Author

Choose a reason for hiding this comment

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

In case the payload is made optional in the envelope, this logic should change accordingly

```python
def process_block(state: BeaconState, block: BeaconBlock) -> None:
process_block_header(state, block)
process_withdrawals(state) [Modified in EIP-XXXX]
Copy link
Owner Author

Choose a reason for hiding this comment

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

We can instead remove withdrawals from here, process them with the execution payload and then there is no need to track the last withdrawals root in the Beacon state.

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.

3 participants