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

Move parent_beacon_block_root in execution payload and update verification #3454

Closed
wants to merge 3 commits into from

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jul 17, 2023

Want to propose a simplification which allows execution block to be reconstructed entirely based on execution payload

Till 4788 addition execution payload (from beacon bloc) had one to one correspondence with execution block and hence was possible to construct execution block with payload (and relatively straight forward debugging). However the payload from beacon bloc directly can't be used without massaging with parent

Ethereumjs has utility methods to construct block from execution payload

TODO

  • if this change is acceptable to community then can update any other post deneb references

@mkalinin
Copy link
Collaborator

It would be good to know whether other clients have a preference of parent_beacon_block_root to be a part of ExecutionPayload to justify this change. Alternatively, can this utility method be extended with the parent_beacon_block_root parameter? Will it be a breaking change?

@g11tech
Copy link
Contributor Author

g11tech commented Jul 17, 2023

It would be good to know whether other clients have a preference of parent_beacon_block_root to be a part of ExecutionPayload to justify this change. Alternatively, can this utility method be extended with the parent_beacon_block_root parameter? Will it be a breaking change?

it can be extended for sure but the problem is all the payload data being handy and available in one place. currently parent_beacon_block_root not in payload messes up the UX imo. (we have seen several instances of debugging on testnets where we used payload to construct and debug the blocs)

and yea would love to see opinions from other clients 🙂

@djrtwo
Copy link
Contributor

djrtwo commented Jul 17, 2023

There was a moderate amount of discussion on this when the initial EIP PR was up. I was in favor of putting it in there to just more easily mirror what's on CL and EL and for simple access patterns. I also thought it might help with lightclient proofs but was convinced that when moving from CL into EL proofs, that you'd use native EL structures at that point. So the argument came down mainly to aesthetic reasons vs de-duplication of data.

If the aesthetic reasons have elevated to practical reasons due to debugging issues, I'm very okay with patching this in.

Want to hear from other CL devs first

EDIT: previous discussions that lead to not being in payload are here -- #3421 (comment)

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.

Need to shuffle this around a bit, see comments.

Plus need a few tests to show success and failure

specs/deneb/beacon-chain.md Outdated Show resolved Hide resolved
specs/deneb/beacon-chain.md Outdated Show resolved Hide resolved
specs/deneb/beacon-chain.md Outdated Show resolved Hide resolved
@tbenr
Copy link
Contributor

tbenr commented Jul 20, 2023

I'm mildly against it (due to data duplication) unless there are other EL devs agreeing that this would improve significantly their DevX. I'm generally not a fan of adding extra data on-chain just for easier testing\debugging.

@lightclient
Copy link
Member

I don't really see what the advantage of having it in the execution payload vs. having it as an equal-level parameter in the engine api. Of course our architecture is very EL-CL split right now, but I don't think we should let that leak into our actual consensus objects more than it already is.

@terencechain
Copy link
Contributor

I'm against it unless it brings significant improvement on the EL side. Same reason as @tbenr

@mkalinin
Copy link
Collaborator

I want to echo @lightclient's point. From the perspective of a client software running CL and EL under the same hood this field in the CL's payload structure and the corresponding check in the state transition look ugly. Engine API is the place where we should aim encapsulating such redundancies. Although, we already have precedents like the block hash check it would be great not to extend the surface of EL dependencies leaked into the beacon chain structures and validity rules unless there is a strong reason for that.

@hwwhww hwwhww added the general:RFC Request for Comments label Jul 21, 2023
@g11tech
Copy link
Contributor Author

g11tech commented Jul 21, 2023

because this field is just not a check but something that impacts EL state and with the same decoupling argument it should belong in payload standalone by itself.

check can still be moved to EL with new payload also sending block's parent hash as it does currently but check performed on EL side similar to versioned hashes)

Not sure how to value such cleanliness and debuggng exp against havng a duplcated field

specs/deneb/beacon-chain.md Outdated Show resolved Hide resolved
specs/deneb/beacon-chain.md Outdated Show resolved Hide resolved
@Giulio2002
Copy link

Giulio2002 commented Jul 27, 2023

I am against it as well for the same reason as @tbenr, I also do not see any significant improvements for the EL side, and I think it has the potential to only add protocol debt.

@Giulio2002
Copy link

Ok, I misread, this is good because since EIP4788 is in Cancun, having it present in the header makes it consistent

@g11tech
Copy link
Contributor Author

g11tech commented Jul 27, 2023

closing the PR as per discussion in the ACD CL call jul 27

@g11tech g11tech closed this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general:RFC Request for Comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants