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

Execution Layer Meeting 153 #704

Closed
timbeiko opened this issue Jan 5, 2023 · 4 comments
Closed

Execution Layer Meeting 153 #704

timbeiko opened this issue Jan 5, 2023 · 4 comments

Comments

@timbeiko
Copy link
Collaborator

timbeiko commented Jan 5, 2023

Meeting Info

Agenda

@protolambda
Copy link

protolambda commented Jan 19, 2023

Part of the SSZ-ification of the trees in the block is not just the tree commitment, but also how the list items get embedded as leaf values. Current MPT has 32+ long values and thus hashes them, not entirely sure, but seems like this behavior overlaps with the tx-hash behavior. With SSZ depending on the integration, we might lose that: i.e. you can't reconstruct the root of the tree from just the tx-hashes as values (as currently available in the eth_getBlockByNumber(n, false) RPC). And CL definitely doesn't have this (different hash function, hash-tree-rooted opaque-tx bytes).

We'd have to modify the CL to not make a HTR of opaque txs, but of the keccak hashed opaque txs (if the tx hashing even stays consistent between all future tx types)

@ralexstokes
Copy link
Member

ralexstokes commented Jan 19, 2023

I think if anything we want to drive more things to SSZ, rather than pulling RLP or MPT concepts into the consensus layer.

This is what I think we should aim for:

  1. receipt_root: define a SSZ-encoding Receipt for receipts and replace this root with the hash tree root of a List<Receipt, SOME_BOUND>
  2. transactions_root: define a SSZ-encoding Transaction for all transaction types and replace this root with the hash tree root of a List<Transaction, SOME_BOUND>
  3. withdrawals_root: define a SSZ-encoding Withdrawal for the withdrawal object and replace this root with the hash tree root of a List<Withdrawal, SOME_BOUND>

Note: the state_root will change in spirit w/ the move to Verkle tries. Everything else has a "flat" RLP encoding that isn't too bad to work with no matter which layer of the stack you are standing on.

Another idea from discussing this with @etan-status is to change how block_hash is computed -- keep data as-is but define a Header format where the block hash is now the hash tree root of this Header object.

And if we really want to go all the way, we can even consider swapping big-endian RLP data to little-endian SSZ data so that the headers match across EL and CL. But I feel this may be too invasive of a change.

@lightclient
Copy link
Member

Can we talk about this in the next meeting? ethereum/execution-apis#329

@timbeiko
Copy link
Collaborator Author

Closed in favour of #715, adding your issue @lightclient !

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

No branches or pull requests

4 participants