Skip to content

Commit 5b7346f

Browse files
committed
fix MinTimeDurationForBlobRequests for local test
1 parent 874f857 commit 5b7346f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

cmd/geth/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
227227
}
228228
if ctx.IsSet(utils.OverrideMinBlocksForBlobRequests.Name) {
229229
params.MinBlocksForBlobRequests = ctx.Uint64(utils.OverrideMinBlocksForBlobRequests.Name)
230+
params.MinTimeDurationForBlobRequests = uint64(float64(params.MinBlocksForBlobRequests) * 1.5)
230231
}
231232
if ctx.IsSet(utils.OverrideDefaultExtraReserveForBlobRequests.Name) {
232233
params.DefaultExtraReserveForBlobRequests = ctx.Uint64(utils.OverrideDefaultExtraReserveForBlobRequests.Name)

core/data_availability.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func IsDataAvailable(chain consensus.ChainHeaderReader, block *types.Block) (err
6666
return nil
6767
}
6868

69-
// only required to check within MinBlocksForBlobRequests block's DA
69+
// only required to check within MinTimeDurationForBlobRequests seconds's DA
7070
highest := chain.ChasingHead()
7171
current := chain.CurrentHeader()
7272
if highest == nil || highest.Number.Cmp(current.Number) < 0 {

params/protocol_params.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ const (
194194
)
195195

196196
var (
197-
MinTimeDurationForBlobRequests uint64 = 524288 * 3 // it keeps blob data available for ~18.2 days in local
197+
MinTimeDurationForBlobRequests uint64 = uint64(float64(86400) * 18.2) // it keeps blob data available for ~18.2 days in local
198198
MinBlocksForBlobRequests uint64 = uint64(float64(MinTimeDurationForBlobRequests) / 1.5) // ref: https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP-524.md#421-change-table.
199-
DefaultExtraReserveForBlobRequests uint64 = uint64(float64(24*3600) / 1.5) // it adds more time for expired blobs for some request cases, like expiry blob when remote peer is syncing, default 1 day.
199+
DefaultExtraReserveForBlobRequests uint64 = uint64(float64(86400) / 1.5) // it adds more time for expired blobs for some request cases, like expiry blob when remote peer is syncing, default 1 day.
200200

201201
BreatheBlockInterval uint64 = 86400 // Controls the interval for updateValidatorSetV2
202202

0 commit comments

Comments
 (0)