-
Notifications
You must be signed in to change notification settings - Fork 977
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
RLP-encoded blob transaction #3345
Conversation
One idea to alleviate the need for RLP is to extend |
Moving RLP to the CL would be a major pain for Deneb IMO. Matching KZG commitments and sending them over the Engine API has some drawbacks in that we can currently validate execution payload in parallel without having the full sidecar and wait for data validation before we put into forkchoice. Both of these approaches seem pretty dire to me. |
So you could do this as well as long as you had an ejection (or filtering) mechanism. Essentially -- you have two flags on the block in the fork-choice ( |
We can't put into forkchoice without the EL returning at least |
It doesn't necessarily need to be a part of the full sidecar. I think it could also be an extension on the p2p beacon block. You would pass those |
Sorry, I misunderstood when you meant on putting into forkchoice. I didn't see that @lightclient wanted to extend the blob sidecar with the version hashes. I would put these in the beacon block or execution payload so they are delivered at the same time as the block and can be verified whenever doing any block verifications. The data in a sidecar should not impact the ability to do any state transition computations. |
def get_blob_versioned_hashes(signed_blob_tx_rlp: bytes) -> Sequence[VersionedHash]: | ||
decoded_tx = rlp.decode(signed_blob_tx_rlp, SignedBlobTransaction) | ||
return [VersionedHash(x) for x in decoded_tx.blob_versioned_hashes] |
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.
Would it be possible to use a "neutral" encoding here, that does not add RLP to the CL? It seems like the wrong direction to go with.
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.
https://eips.ethereum.org/EIPS/eip-6404
If going with (current) EIP-6404, this function would actually still provide SSZ, as EIP-6404 converts all transactions to a common SSZ representation as part of the block production, regardless of what their original representation used to be.
As discussed with @lightclient, the TX version hashes are already "committed to" in the beaconblock due to the explicit list of Thus the above proposal can be to just compute the list of versioned hashes from the kzg_commitments and then pass them along to the EL via the engine API with an engine-API validation condition to be that this list matches those in the blob TXs Note, the one downside is that this validation only happens when CL and EL are communicating synchronously and not when CL is optimistic nor when EL is syncing, due to not having this info otherwise available on EL. This is a marginal degredation in the optimistic/syncing security, but I'm not really seeing how it becomes a place of actual exploit. Curious other's input The alternative would be to move the commitments into the EL such that it just does this vlaidation without CL at all. That said, it breaks the attempted firewall between the CL DA crypto and the EL (although it is already broken in the mempool) CC: @potuz, @lightclient, @mkalinin |
just to add : can we prefix block commitments with the version byte so CL doesn't has to make any assumption to compute versioned hashes |
I'm not sure this is beneficial. The version commitments are to make it so that the EL doesn't have to care about which commitment/cryptography the CL is using for the blob data |
may be i am missing something here: so CL can independently decide to use a commitment scheme (and derive from blob data) while the original txs were submitted using a different commitment/cryptography? Also if EL is agnostic about the commitment version, so basically the OR the cryptography version is decided by hardfork (coordinated on both CL and EL) |
Do you suggest creating a new Engine API interface or re-using the Having two API calls within a state transition seems to be a suboptimal design. However, extending engine_newPayload by adding parameters doesn't seem quite fitting, given the term "new_payload". |
I think the idea is to extend |
I don't see any issues with this approach as this check isn't a part of EL block validity conditions. EL should run this check in a similar way as it validates block hash today and respond immediately if it fails. We have two options: either extend UPD: |
did you mean the "latter", which I think has a more clear name? |
Sorry for confusion, I am more in favour of the option with the hashes as a separate parameter |
I've opened a PR with the way it would look like in Engine API ethereum/execution-apis#407 |
closing via #3359 |
To evaluate ethereum/EIPs#6985 suggestion, this PR demonstrates the CL-side changes.
get_blob_versioned_hashes
that implementers can use an RLP library to retrieveblob_versioned_hashes
.Declaration: I do not tend to this change. I just show what CL specs will be.