Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Use
engine_newPayloadV3
to passversioned_hashes
to EL for validation #3359Use
engine_newPayloadV3
to passversioned_hashes
to EL for validation #3359Changes from 2 commits
0581373
0b2f604
3247bcf
2eab6bf
fc45220
bee8fa1
73df193
7ec5efb
dd5e6f8
0a90b58
289d814
6b5513b
212a314
53a9221
ec1ee74
7a82763
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
another strategy is to keep
notify_new_payload()
as the same and to insert another functionexecution_engine.verify_versioned_hashes(versioned_hashes, payload.transactions)
. This would be divergent from the engine API but is very explicit.In fact if we went that path, I would also break out the verification of the
block_hash
-- e.g.and i would maybe keep it in
process_blob_kzg_commitments
along with the length check discussed in #3338There 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.
cc: @mkalinin
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.
I really like this strategy as making these checks explicit brings more clarity to the spec. Can't see anything that could be broken by doing it this way, I was thinking about optimistic sync tests but they shouldn't be affected afaics
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.
But in client implementations, the validation will still use the one Engine API call response, correct? Aren't different API abstractions make it more difficult to test? e.g., we already yield
execution_valid
in test vectors, if we want to add what's proposed in #3359 (comment) + addexecution_engine.is_valid_versioned_hashes()
helper in specs, we have to yield anis_valid_versioned_hashes
field in test vectors.I'd like to confirm if clients indeed prefer parsing this themselves. 🤔
/cc @terencechain
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.
my view: we would just like it as a single call with length check before the call (check should come before versioned hashes computation but suggested here for the conversation context)
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.
Given this is a specification to show complete state transition validation and mutation logic and not an implementation guide that knows or cares about the engine api (Engine API is just one architecture of a valid full client), I very much like explicitly calling out the various groupings of validations instead of just hiding it behind one.
That said, at this point in the process, if it is going to cause too much additional overhead (e.g. with changing test formats), I'm not going to push too hard for it.
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.
@g11tech @ppopth
The extra length check is unnecessary since the SSZ container has defined field
blob_kzg_commitments: List[KZGCommitment, MAX_BLOBS_PER_BLOCK]
.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.
@djrtwo @mkalinin
I agree the explicitness is good, but CL is just the caller and has no control over executing the validation. I support @ppopth's proposal of renaming the API name or creating a new API to replace the old one in Deneb.
Another way is to make it clear in the abstract API:
And we stick to using the single
execution_valid
return value ofnotify_new_payload_and_verify_versioned_hashes
in testing.Note: we override this API in
setup.py
, so the content doesn't matter for pyspec itself.Does it make sense to rename the Engine API side as well?
Edited:
verify_and_notify_new_payload
approach https://github.com/ethereum/consensus-specs/compare/engine-versioned-hashes-explicitThere 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.
It will be changed in this PR #3338
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.
@ppopth @g11tech
Ah...! but this PR will get merged first, so #3338 will have to address it. 😅