diff --git a/pkg/node/node.go b/pkg/node/node.go index 764e43a98a0..0143f959fd4 100644 --- a/pkg/node/node.go +++ b/pkg/node/node.go @@ -14,7 +14,6 @@ import ( "fmt" "io" stdlog "log" - "math" "math/big" "net" "net/http" @@ -982,22 +981,6 @@ func NewBee( return uint8(radius.Load()), nil } - maxReserveRadius := func() (uint8, error) { - - commitment, err := batchStore.Commitment() - if err != nil { - return 0, fmt.Errorf("commitment: %w", err) - } - - if commitment <= ReserveCapacity { - return 0, nil - } else { - // totalCommitment/node_capacity = 2^R - // log2(totalCommitment/node_capacity) = R - return uint8(math.Ceil(math.Log2(float64(commitment) / float64(ReserveCapacity)))), nil - } - } - pusherService := pusher.New(networkID, localStore, networkRadiusFunc, pushSyncProtocol, validStamp, logger, tracer, warmupTime, pusher.DefaultRetryCount) b.pusherCloser = pusherService @@ -1052,7 +1035,7 @@ func NewBee( pullerService = puller.New(stateStore, kad, localStore, pullSyncProtocol, p2ps, logger, puller.Options{}) b.pullerCloser = pullerService - localStore.StartReserveWorker(ctx, pullerService, maxReserveRadius) + localStore.StartReserveWorker(ctx, pullerService, networkRadiusFunc) nodeStatus.SetSync(pullerService) if o.EnableStorageIncentives { diff --git a/pkg/storer/reserve.go b/pkg/storer/reserve.go index 3af31f78c9c..a5ad96238d8 100644 --- a/pkg/storer/reserve.go +++ b/pkg/storer/reserve.go @@ -72,12 +72,20 @@ func (db *DB) startReserveWorkers( // possibly a fresh node, acquire initial radius externally if initialRadius == 0 { - r, err := radius() - if err != nil { - db.logger.Error(err, "reserve worker initial radius") - } else { - initialRadius = r - } + + // August 4, 2023 18:47 CET, storage radius is 9 on the mainnet. + // Because the initial radius is acquired from the network, the radius needs to be boostrapped at + // the time of the release. The bootstrap needs to be removed after the release. + initialRadius = 9 + + /* + r, err := radius() + if err != nil { + db.logger.Error(err, "reserve worker initial radius") + } else { + initialRadius = r + } + */ } if err := db.reserve.SetRadius(db.repo.IndexStore(), initialRadius); err != nil {