VerifiedROBlobs in initial-sync (#13351)

* 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>
This commit is contained in:
kasey
2024-01-06 17:47:09 -06:00
committed by GitHub
parent 8d092a1113
commit 0e043d55b4
46 changed files with 1209 additions and 454 deletions

View File

@@ -306,9 +306,9 @@ func TestBlocksFetcher_RoundRobin(t *testing.T) {
fetcher.stop()
}()
processFetchedBlocks := func() ([]blocks.BlockWithVerifiedBlobs, error) {
processFetchedBlocks := func() ([]blocks.BlockWithROBlobs, error) {
defer cancel()
var unionRespBlocks []blocks.BlockWithVerifiedBlobs
var unionRespBlocks []blocks.BlockWithROBlobs
for {
select {
@@ -347,7 +347,7 @@ func TestBlocksFetcher_RoundRobin(t *testing.T) {
bwb, err := processFetchedBlocks()
assert.NoError(t, err)
sort.Sort(blocks.BlockWithVerifiedBlobsSlice(bwb))
sort.Sort(blocks.BlockWithROBlobsSlice(bwb))
ss := make([]primitives.Slot, len(bwb))
for i, b := range bwb {
ss[i] = b.Block.Block().Slot()
@@ -454,7 +454,7 @@ func TestBlocksFetcher_handleRequest(t *testing.T) {
}
}()
var bwb []blocks.BlockWithVerifiedBlobs
var bwb []blocks.BlockWithROBlobs
select {
case <-ctx.Done():
t.Error(ctx.Err())
@@ -1015,7 +1015,7 @@ func TestLowestSlotNeedsBlob(t *testing.T) {
func TestBlobRequest(t *testing.T) {
var nilReq *ethpb.BlobSidecarsByRangeRequest
// no blocks
req := blobRequest([]blocks.BlockWithVerifiedBlobs{}, 0)
req := blobRequest([]blocks.BlockWithROBlobs{}, 0)
require.Equal(t, nilReq, req)
blks, _ := util.ExtendBlocksPlusBlobs(t, []blocks.ROBlock{}, 10)
sbbs := make([]interfaces.ReadOnlySignedBeaconBlock, len(blks))
@@ -1047,7 +1047,7 @@ func TestBlobRequest(t *testing.T) {
require.Equal(t, len(allAfter), int(req.Count))
}
func testSequenceBlockWithBlob(t *testing.T, nblocks int) ([]blocks.BlockWithVerifiedBlobs, []blocks.ROBlob) {
func testSequenceBlockWithBlob(t *testing.T, nblocks int) ([]blocks.BlockWithROBlobs, []blocks.ROBlob) {
blks, blobs := util.ExtendBlocksPlusBlobs(t, []blocks.ROBlock{}, nblocks)
sbbs := make([]interfaces.ReadOnlySignedBeaconBlock, len(blks))
for i := range blks {