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>
75 lines
2.0 KiB
Go
75 lines
2.0 KiB
Go
package verification
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/consensus-types/blocks"
|
|
)
|
|
|
|
type MockBlobVerifier struct {
|
|
ErrBlobIndexInBounds error
|
|
ErrSlotTooEarly error
|
|
ErrSlotAboveFinalized error
|
|
ErrValidProposerSignature error
|
|
ErrSidecarParentSeen error
|
|
ErrSidecarParentValid error
|
|
ErrSidecarParentSlotLower error
|
|
ErrSidecarDescendsFromFinalized error
|
|
ErrSidecarInclusionProven error
|
|
ErrSidecarKzgProofVerified error
|
|
ErrSidecarProposerExpected error
|
|
cbVerifiedROBlob func() (blocks.VerifiedROBlob, error)
|
|
}
|
|
|
|
func (m *MockBlobVerifier) VerifiedROBlob() (blocks.VerifiedROBlob, error) {
|
|
return m.cbVerifiedROBlob()
|
|
}
|
|
|
|
func (m *MockBlobVerifier) BlobIndexInBounds() (err error) {
|
|
return m.ErrBlobIndexInBounds
|
|
}
|
|
|
|
func (m *MockBlobVerifier) NotFromFutureSlot() (err error) {
|
|
return m.ErrSlotTooEarly
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SlotAboveFinalized() (err error) {
|
|
return m.ErrSlotAboveFinalized
|
|
}
|
|
|
|
func (m *MockBlobVerifier) ValidProposerSignature(_ context.Context) (err error) {
|
|
return m.ErrValidProposerSignature
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarParentSeen(_ func([32]byte) bool) (err error) {
|
|
return m.ErrSidecarParentSeen
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarParentValid(_ func([32]byte) bool) (err error) {
|
|
return m.ErrSidecarParentValid
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarParentSlotLower() (err error) {
|
|
return m.ErrSidecarParentSlotLower
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarDescendsFromFinalized() (err error) {
|
|
return m.ErrSidecarDescendsFromFinalized
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarInclusionProven() (err error) {
|
|
return m.ErrSidecarInclusionProven
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarKzgProofVerified() (err error) {
|
|
return m.ErrSidecarKzgProofVerified
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarProposerExpected(_ context.Context) (err error) {
|
|
return m.ErrSidecarProposerExpected
|
|
}
|
|
|
|
func (*MockBlobVerifier) SatisfyRequirement(_ Requirement) {}
|
|
|
|
var _ BlobVerifier = &MockBlobVerifier{}
|