Skip to content

Commit

Permalink
abjust blobs reserve periods (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
tak1827 authored Nov 22, 2024
1 parent 1d897bb commit 63ab0d3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server.
// Blob setting
BlobExtraReserveFlag = &cli.Uint64Flag{
Name: "blob.extra-reserve",
Usage: "Extra reserve threshold for blob, blob never expires when 0 is set, default 28800",
Usage: "Extra reserve threshold for blob, blob never expires when 0 is set, default 14400",
Value: params.DefaultExtraReserveForBlobRequests,
Category: flags.MiscCategory,
}
Expand Down
2 changes: 1 addition & 1 deletion eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var Defaults = Config{
RPCEVMTimeout: 5 * time.Second,
GPO: FullNodeGPO,
RPCTxFeeCap: 1, // 1 ether
BlobExtraReserve: params.DefaultExtraReserveForBlobRequests, // Extra reserve threshold for blob, blob never expires when -1 is set, default 28800
BlobExtraReserve: params.DefaultExtraReserveForBlobRequests, // Extra reserve threshold for blob, blob never expires when -1 is set, default 14400
}

//go:generate go run github.com/fjl/gencodec -type Config -formats toml -out gen_config.go
Expand Down
12 changes: 10 additions & 2 deletions params/protocol_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,16 @@ const (
)

var (
MinBlocksForBlobRequests uint64 = 524288 // it keeps blob data available for ~18.2 days in local, ref: https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP-336.md#51-parameters.
DefaultExtraReserveForBlobRequests uint64 = 1 * (24 * 3600) / 3 // it adds more time for expired blobs for some request cases, like expiry blob when remote peer is syncing, default 1 day.
// The factor to adjust blob reserve period for Oasys.
// Oasys blocktime(6s) / BSC blocktime(3s) = 2
divisionFactorForOasys uint64 = 2

// it keeps blob data available for ~18.2 days in local, ref: https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP-336.md#51-parameters.
// Same as the default blob reserve period in Ethereum (4096 epochs).
MinBlocksForBlobRequests uint64 = 524288 / divisionFactorForOasys

// it adds more time for expired blobs for some request cases, like expiry blob when remote peer is syncing, default 1 day.
DefaultExtraReserveForBlobRequests uint64 = 1 * (24 * 3600) / 3 / divisionFactorForOasys
)

// Gas discount table for BLS12-381 G1 and G2 multi exponentiation operations
Expand Down

0 comments on commit 63ab0d3

Please sign in to comment.