mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Backfill data columns (#15580)
**What type of PR is this?** Feature **What does this PR do? Why is it needed?** Adds data column support to backfill. **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description to this PR with sufficient context for reviewers to understand this PR. --------- Co-authored-by: Kasey <kasey@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Preston Van Loon <preston@pvl.dev>
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/blockchain/kzg"
|
||||
mock "github.com/OffchainLabs/prysm/v7/beacon-chain/blockchain/testing"
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/peerdas"
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/das"
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/db/filesystem"
|
||||
"github.com/OffchainLabs/prysm/v7/beacon-chain/db/kv"
|
||||
dbtest "github.com/OffchainLabs/prysm/v7/beacon-chain/db/testing"
|
||||
@@ -152,10 +153,7 @@ func TestService_InitStartStop(t *testing.T) {
|
||||
|
||||
p := p2ptest.NewTestP2P(t)
|
||||
connectPeers(t, p, []*peerData{}, p.Peers())
|
||||
for i, tt := range tests {
|
||||
if i == 0 {
|
||||
continue
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
defer hook.Reset()
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
@@ -175,6 +173,8 @@ func TestService_InitStartStop(t *testing.T) {
|
||||
InitialSyncComplete: make(chan struct{}),
|
||||
})
|
||||
s.verifierWaiter = verification.NewInitializerWaiter(gs, nil, nil, nil)
|
||||
|
||||
s.blobRetentionChecker = func(primitives.Slot) bool { return true }
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
assert.NotNil(t, s)
|
||||
if tt.setGenesis != nil {
|
||||
@@ -207,15 +207,22 @@ func TestService_waitForStateInitialization(t *testing.T) {
|
||||
cs := startup.NewClockSynchronizer()
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
s := &Service{
|
||||
cfg: &Config{Chain: mc, StateNotifier: mc.StateNotifier(), ClockWaiter: cs, InitialSyncComplete: make(chan struct{})},
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
synced: abool.New(),
|
||||
chainStarted: abool.New(),
|
||||
counter: ratecounter.NewRateCounter(counterSeconds * time.Second),
|
||||
genesisChan: make(chan time.Time),
|
||||
cfg: &Config{Chain: mc, StateNotifier: mc.StateNotifier(), ClockWaiter: cs, InitialSyncComplete: make(chan struct{})},
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
synced: abool.New(),
|
||||
chainStarted: abool.New(),
|
||||
counter: ratecounter.NewRateCounter(counterSeconds * time.Second),
|
||||
genesisChan: make(chan time.Time),
|
||||
blobRetentionChecker: func(primitives.Slot) bool { return true },
|
||||
}
|
||||
s.verifierWaiter = verification.NewInitializerWaiter(cs, nil, nil, nil)
|
||||
syWait := func() (das.SyncNeeds, error) {
|
||||
clock, err := cs.WaitForClock(ctx)
|
||||
require.NoError(t, err)
|
||||
return das.NewSyncNeeds(clock.CurrentSlot, nil, primitives.Epoch(0))
|
||||
}
|
||||
s.cfg.SyncNeedsWaiter = syWait
|
||||
return s, cs
|
||||
}
|
||||
|
||||
@@ -225,6 +232,7 @@ func TestService_waitForStateInitialization(t *testing.T) {
|
||||
defer cancel()
|
||||
|
||||
s, _ := newService(ctx, &mock.ChainService{Genesis: time.Now(), ValidatorsRoot: [32]byte{}})
|
||||
s.blobRetentionChecker = func(primitives.Slot) bool { return true }
|
||||
wg := &sync.WaitGroup{}
|
||||
wg.Go(func() {
|
||||
s.Start()
|
||||
@@ -252,6 +260,7 @@ func TestService_waitForStateInitialization(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
gt := st.GenesisTime()
|
||||
s, gs := newService(ctx, &mock.ChainService{State: st, Genesis: gt, ValidatorsRoot: [32]byte{}})
|
||||
s.blobRetentionChecker = func(primitives.Slot) bool { return true }
|
||||
|
||||
expectedGenesisTime := gt
|
||||
wg := &sync.WaitGroup{}
|
||||
|
||||
Reference in New Issue
Block a user