diff --git a/builder/files/config.toml b/builder/files/config.toml index 8d2279b330..ca24bbcac2 100644 --- a/builder/files/config.toml +++ b/builder/files/config.toml @@ -145,6 +145,11 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] +# [blobpool] + # datadir = "blobpool" + # datacap = 10737418240 + # pricebump = 100 + # [cache] # cache = 1024 # gc = 25 diff --git a/docs/cli/example_config.toml b/docs/cli/example_config.toml index fb9def8e1f..a977330690 100644 --- a/docs/cli/example_config.toml +++ b/docs/cli/example_config.toml @@ -150,6 +150,11 @@ devfakeauthor = false # Run miner without validator set authorization ip = "99.911.221.66" region = "us-north-1" +[blobpool] + datadir = "blobpool" # Data directory to store blob transactions in + datacap = 10737418240 # Disk space to allocate for pending blob transactions (soft limit) + pricebump = 100 # Price bump percentage to replace an already existing blob transaction + [cache] cache = 1024 # Megabytes of memory allocated to internal caching (recommended for mainnet = 4096, default suitable for mumbai/devnet) gc = 25 # Percentage of cache memory allowance to use for trie pruning (default = 25% full mode, 0% archive mode) diff --git a/internal/cli/server/config.go b/internal/cli/server/config.go index 4a46ba0d1e..1e3099b087 100644 --- a/internal/cli/server/config.go +++ b/internal/cli/server/config.go @@ -24,6 +24,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/fdlimit" + "github.com/ethereum/go-ethereum/core/txpool/blobpool" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth/downloader" "github.com/ethereum/go-ethereum/eth/ethconfig" @@ -117,6 +118,8 @@ type Config struct { // Telemetry has the telemetry related settings Telemetry *TelemetryConfig `hcl:"telemetry,block" toml:"telemetry,block"` + BlobPool *BlobPoolConfig `hcl:"blobpool,block" toml:"blobpool,block"` + // Cache has the cache related settings Cache *CacheConfig `hcl:"cache,block" toml:"cache,block"` @@ -513,6 +516,17 @@ type InfluxDBConfig struct { Organization string `hcl:"organization,optional" toml:"organization,optional"` } +type BlobPoolConfig struct { + // Data directory to store blob transactions in + DataDir string `hcl:"datadir,optional" toml:"datadir,optional"` + + // Disk space to allocate for pending blob transactions (soft limit) + DataCap uint64 `hcl:"datacap,optional" toml:"datacap,optional"` + + // Price bump percentage to replace an already existing blob transaction + PriceBump uint64 `hcl:"pricebump,optional" toml:"pricebump,optional"` +} + type CacheConfig struct { // Cache is the amount of cache of the node Cache uint64 `hcl:"cache,optional" toml:"cache,optional"` @@ -733,6 +747,11 @@ func DefaultConfig() *Config { Organization: "", }, }, + BlobPool: &BlobPoolConfig{ + DataDir: blobpool.DefaultConfig.Datadir, + DataCap: blobpool.DefaultConfig.Datacap, + PriceBump: blobpool.DefaultConfig.PriceBump, + }, Cache: &CacheConfig{ Cache: 1024, // geth's default (suitable for mumbai) PercDatabase: 50, @@ -952,6 +971,13 @@ func (c *Config) buildEth(stack *node.Node, accountManager *accounts.Manager) (* n.TxPool.Lifetime = c.TxPool.LifeTime } + // blobpool options + { + n.BlobPool.Datadir = c.BlobPool.DataDir + n.BlobPool.Datacap = c.BlobPool.DataCap + n.BlobPool.PriceBump = c.BlobPool.PriceBump + } + // miner options { n.Miner.Recommit = c.Sealer.Recommit diff --git a/internal/cli/server/flags.go b/internal/cli/server/flags.go index 48813fdfbe..a3453a1135 100644 --- a/internal/cli/server/flags.go +++ b/internal/cli/server/flags.go @@ -367,6 +367,29 @@ func (c *Command) Flags(config *Config) *flagset.Flagset { Default: c.cliConfig.Gpo.IgnorePrice, }) + // Blob transaction pool settings + f.StringFlag(&flagset.StringFlag{ + Name: "blobpool.datadir", + Usage: "Data directory to store blob transactions in", + Value: &c.cliConfig.BlobPool.DataDir, + Default: c.cliConfig.BlobPool.DataDir, + Group: "BlobPool", + }) + f.Uint64Flag(&flagset.Uint64Flag{ + Name: "blobpool.datacap", + Usage: "Disk space to allocate for pending blob transactions (soft limit)", + Value: &c.cliConfig.BlobPool.DataCap, + Default: c.cliConfig.BlobPool.DataCap, + Group: "BlobPool", + }) + f.Uint64Flag(&flagset.Uint64Flag{ + Name: "blobpool.pricebump", + Usage: "Price bump percentage to replace an already existing blob transaction", + Value: &c.cliConfig.BlobPool.PriceBump, + Default: c.cliConfig.BlobPool.PriceBump, + Group: "BlobPool", + }) + // cache options f.Uint64Flag(&flagset.Uint64Flag{ Name: "cache", diff --git a/packaging/templates/mainnet-v1/archive/config.toml b/packaging/templates/mainnet-v1/archive/config.toml index bdbe8edc8f..02f49782ee 100644 --- a/packaging/templates/mainnet-v1/archive/config.toml +++ b/packaging/templates/mainnet-v1/archive/config.toml @@ -139,6 +139,11 @@ gcmode = "archive" # organization = "" # [telemetry.influx.tags] +# [blobpool] + # datadir = "blobpool" + # datacap = 10737418240 + # pricebump = 100 + [cache] cache = 4096 gc = 0 diff --git a/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml b/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml index af9cb26113..7942342b96 100644 --- a/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml +++ b/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml @@ -139,6 +139,11 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] +# [blobpool] + # datadir = "blobpool" + # datacap = 10737418240 + # pricebump = 100 + [cache] cache = 4096 # gc = 25 diff --git a/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml b/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml index e01d1fb331..77bf13620c 100644 --- a/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml +++ b/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml @@ -141,6 +141,11 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] +# [blobpool] + # datadir = "blobpool" + # datacap = 10737418240 + # pricebump = 100 + [cache] cache = 4096 # gc = 25 diff --git a/packaging/templates/mainnet-v1/without-sentry/bor/config.toml b/packaging/templates/mainnet-v1/without-sentry/bor/config.toml index 87dfaf54f2..ed5bf921c0 100644 --- a/packaging/templates/mainnet-v1/without-sentry/bor/config.toml +++ b/packaging/templates/mainnet-v1/without-sentry/bor/config.toml @@ -141,6 +141,11 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] +# [blobpool] + # datadir = "blobpool" + # datacap = 10737418240 + # pricebump = 100 + [cache] cache = 4096 # gc = 25 diff --git a/packaging/templates/testnet-v4/archive/config.toml b/packaging/templates/testnet-v4/archive/config.toml index b581a687e2..5e090f9b08 100644 --- a/packaging/templates/testnet-v4/archive/config.toml +++ b/packaging/templates/testnet-v4/archive/config.toml @@ -139,6 +139,11 @@ gcmode = "archive" # organization = "" # [telemetry.influx.tags] +# [blobpool] + # datadir = "blobpool" + # datacap = 10737418240 + # pricebump = 100 + [cache] # cache = 1024 gc = 0 diff --git a/packaging/templates/testnet-v4/sentry/sentry/bor/config.toml b/packaging/templates/testnet-v4/sentry/sentry/bor/config.toml index 0778310d8e..47cd5959c7 100644 --- a/packaging/templates/testnet-v4/sentry/sentry/bor/config.toml +++ b/packaging/templates/testnet-v4/sentry/sentry/bor/config.toml @@ -139,6 +139,11 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] +# [blobpool] + # datadir = "blobpool" + # datacap = 10737418240 + # pricebump = 100 + # [cache] # cache = 1024 # gc = 25 diff --git a/packaging/templates/testnet-v4/sentry/validator/bor/config.toml b/packaging/templates/testnet-v4/sentry/validator/bor/config.toml index 9c0133d7a5..05a95f2cda 100644 --- a/packaging/templates/testnet-v4/sentry/validator/bor/config.toml +++ b/packaging/templates/testnet-v4/sentry/validator/bor/config.toml @@ -141,6 +141,11 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] +# [blobpool] + # datadir = "blobpool" + # datacap = 10737418240 + # pricebump = 100 + # [cache] # cache = 1024 # gc = 25 diff --git a/packaging/templates/testnet-v4/without-sentry/bor/config.toml b/packaging/templates/testnet-v4/without-sentry/bor/config.toml index 6bcb8c59fc..c603d72d9f 100644 --- a/packaging/templates/testnet-v4/without-sentry/bor/config.toml +++ b/packaging/templates/testnet-v4/without-sentry/bor/config.toml @@ -141,6 +141,11 @@ syncmode = "full" # organization = "" # [telemetry.influx.tags] +# [blobpool] + # datadir = "blobpool" + # datacap = 10737418240 + # pricebump = 100 + # [cache] # cache = 1024 # gc = 25