Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/objust blob reserve period #106

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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