Skip to content

Commit

Permalink
Disable antiquation (#12442)
Browse files Browse the repository at this point in the history
Cherry pick #12237 into `release/2.61`

Co-authored-by: Giulio rebuffo <giulio.rebuffo@gmail.com>
  • Loading branch information
yperbasis and Giulio2002 authored Oct 24, 2024
1 parent 837391d commit 81ab987
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cl/antiquary/antiquary.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (

const safetyMargin = 10_000 // We retire snapshots 10k blocks after the finalized head

var IsTest = true

// Antiquary is where the snapshots go, aka old history, it is what keep track of the oldest records.
type Antiquary struct {
mainDB kv.RwDB // this is the main DB
Expand Down Expand Up @@ -165,6 +167,10 @@ func (a *Antiquary) Loop() error {
if a.states {
go a.loopStates(a.ctx)
}
if !IsTest {
return nil
}

if a.blobs {
go a.loopBlobs(a.ctx)
}
Expand Down
1 change: 1 addition & 0 deletions cl/antiquary/tests/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func GetPhase0Random() ([]*cltypes.SignedBeaconBlock, *state.CachingBeaconState,

func GetBellatrixRandom() ([]*cltypes.SignedBeaconBlock, *state.CachingBeaconState, *state.CachingBeaconState) {
ret := make([]*cltypes.SignedBeaconBlock, 0, 96)

// format for blocks is blocks_{i}.ssz_snappy where i is the index of the block, starting from 0 to 95 included.
for i := 0; i < 96; i++ {
block := cltypes.NewSignedBeaconBlock(&clparams.MainnetBeaconConfig)
Expand Down
1 change: 1 addition & 0 deletions cmd/caplin/caplin1/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ func RunCaplinPhase1(ctx context.Context, engine execution_client.ExecutionEngin
}
}()
}
antiquary.IsTest = false

tx, err := indexDB.BeginRw(ctx)
if err != nil {
Expand Down

0 comments on commit 81ab987

Please sign in to comment.