mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
0e043d55b4
* Use VerifiedROBlobs in initial-sync * Update beacon-chain/das/cache.go Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com> * Apply suggestions from code review comment fixes Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com> * fix lint error from gh web ui * deepsource fixes * more deepsource * fix init wiring * mark blobless blocks verified in batch mode * move sig check after parent checks * validate block commitment length at start of da check * remove vestigial locking * rm more copy-locksta * rm old comment * fail the entire batch if any sidecar fails * lint * skip redundant checks, fix len check * assume sig and proposer checks passed for block * inherits most checks from processed block * Assume block processing handles most checks * lint * cleanup unused call and gaz * more detailed logging for e2e * fix bad refactor breaking non-finalized init-sync * self-review cleanup * gaz * Update beacon-chain/verification/blob.go Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com> * terence and justin feedback --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com> Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
32 lines
1.2 KiB
Go
32 lines
1.2 KiB
Go
package verification
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/consensus-types/blocks"
|
|
)
|
|
|
|
// BlobVerifier defines the methods implemented by the ROBlobVerifier.
|
|
// It is mainly intended to make mocks and tests more straightforward, and to deal
|
|
// with the awkwardness of mocking a concrete type that returns a concrete type
|
|
// in tests outside of this package.
|
|
type BlobVerifier interface {
|
|
VerifiedROBlob() (blocks.VerifiedROBlob, error)
|
|
BlobIndexInBounds() (err error)
|
|
NotFromFutureSlot() (err error)
|
|
SlotAboveFinalized() (err error)
|
|
ValidProposerSignature(ctx context.Context) (err error)
|
|
SidecarParentSeen(parentSeen func([32]byte) bool) (err error)
|
|
SidecarParentValid(badParent func([32]byte) bool) (err error)
|
|
SidecarParentSlotLower() (err error)
|
|
SidecarDescendsFromFinalized() (err error)
|
|
SidecarInclusionProven() (err error)
|
|
SidecarKzgProofVerified() (err error)
|
|
SidecarProposerExpected(ctx context.Context) (err error)
|
|
SatisfyRequirement(Requirement)
|
|
}
|
|
|
|
// NewBlobVerifier is a function signature that can be used by code that needs to be
|
|
// able to mock Initializer.NewBlobVerifier without complex setup.
|
|
type NewBlobVerifier func(b blocks.ROBlob, reqs []Requirement) BlobVerifier
|