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

Blob verification spectest #13707

Merged
merged 11 commits into from Mar 8, 2024
Merged

Blob verification spectest #13707

merged 11 commits into from Mar 8, 2024

Conversation

kasey
Copy link
Contributor

@kasey kasey commented Mar 8, 2024

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

This fixes an oversight in our spectest coverage that was not exercising blob verification paths in the forkchoice tests. This issue was further compounded by a test Skip in the spectests. This PR unskips the on_block tests and sets up the necessary dependencies to verify blobs like sync.

@kasey kasey requested a review from a team as a code owner March 8, 2024 01:23
@@ -261,7 +277,7 @@ func (bv *ROBlobVerifier) SidecarDescendsFromFinalized() (err error) {
func (bv *ROBlobVerifier) SidecarInclusionProven() (err error) {
defer bv.recordResult(RequireSidecarInclusionProven, &err)
if err = blocks.VerifyKZGInclusionProof(bv.blob); err != nil {
log.WithError(err).WithFields(logging.BlobFields(bv.blob)).Debug("sidecar inclusion proof verification failed")
log.WithError(err).WithFields(logging.BlobFields(bv.blob)).Error("sidecar inclusion proof verification failed")
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I changed this to Error in my PR. I think we can revert this back to Debug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@kasey kasey force-pushed the blob-verification-spectest branch from ab4bbf8 to 069786b Compare March 8, 2024 02:00
@kasey kasey enabled auto-merge March 8, 2024 02:02
Comment on lines 56 to 57
//RequireSidecarParentSeen,
//RequireSidecarParentValid,
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to comment these out?

If so, consider adding some method like

var SpectestSidecarRequirements = xor(GossipSidecarRequirements, []Requirement{
  // Requiring parent checks in spectest is not possible.
  RequireSidecarParentSeen, 
  RequireSidecarParentValid,
})

This way we won't have to ensure two slices are updated in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

implemented this, please take a look!

fwiw the main downside I see is that it makes it a little hard to make out what requirements you're keeping for lists where you're excluding most things, like initial-sync/backfill. but otherwise I'm good with it if you are.

beacon-chain/verification/result.go Show resolved Hide resolved
@kasey kasey force-pushed the blob-verification-spectest branch 3 times, most recently from 58de343 to 8023ea0 Compare March 8, 2024 17:27
terencechain
terencechain previously approved these changes Mar 8, 2024
@kasey kasey enabled auto-merge March 8, 2024 17:42
@kasey kasey added this pull request to the merge queue Mar 8, 2024
Merged via the queue into develop with commit 07a0a95 Mar 8, 2024
17 checks passed
@kasey kasey deleted the blob-verification-spectest branch March 8, 2024 18:55
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.

None yet

3 participants