From 9d631d355c5dd044adeded67731300be12cc55ea Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 27 Sep 2024 16:48:54 +0200 Subject: [PATCH] chore(confix): update v2 config (#21956) Co-authored-by: Akhil Kumar P <36399231+akhilkumarpilli@users.noreply.github.com> --- tools/confix/data/v0.52-app.toml | 8 +----- tools/confix/data/v2-app.toml | 43 +++++++++++++++++++++++++++----- tools/confix/migrations.go | 2 ++ 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/tools/confix/data/v0.52-app.toml b/tools/confix/data/v0.52-app.toml index d6e3cf95ab01..f97f48044502 100644 --- a/tools/confix/data/v0.52-app.toml +++ b/tools/confix/data/v0.52-app.toml @@ -66,7 +66,7 @@ index-events = [] # IavlCacheSize set the size of the iavl tree cache (in number of nodes). iavl-cache-size = 781250 -# IAVLDisableFastNode enables or disables the fast node feature of IAVL. +# IAVLDisableFastNode enables or disables the fast node feature of IAVL. # Default is false. iavl-disable-fastnode = false @@ -223,9 +223,3 @@ stop-node-on-err = true # Note, this configuration only applies to SDK built-in app-side mempool # implementations. max-txs = -1 - -[custom] - -# That field will be parsed by server.InterceptConfigsPreRunHandler and held by viper. -# Do not forget to add quotes around the value if it is a string. -custom-field = "anything" diff --git a/tools/confix/data/v2-app.toml b/tools/confix/data/v2-app.toml index 8f7f7f9940d2..c4f19348ce52 100644 --- a/tools/confix/data/v2-app.toml +++ b/tools/confix/data/v2-app.toml @@ -16,6 +16,11 @@ trace = false # standalone starts the application without the CometBFT node. The node should be started separately. standalone = false +# mempool defines the configuration for the SDK built-in app-side mempool implementations. +[comet.mempool] +# max-txs defines the maximum number of transactions that can be in the mempool. A value of 0 indicates an unbounded mempool, a negative value disables the app-side mempool. +max-txs = -1 + [grpc] # Enable defines if the gRPC server should be enabled. enable = true @@ -37,27 +42,53 @@ minimum-gas-prices = '0stake' app-db-backend = 'goleveldb' [store.options] -# State storage database type. Currently we support: 0 for SQLite, 1 for Pebble -ss-type = 0 -# State commitment database type. Currently we support:0 for iavl, 1 for iavl v2 -sc-type = 0 +# SState storage database type. Currently we support: "sqlite", "pebble" and "rocksdb" +ss-type = 'sqlite' +# State commitment database type. Currently we support: "iavl" and "iavl-v2" +sc-type = 'iavl' # Pruning options for state storage [store.options.ss-pruning-option] # Number of recent heights to keep on disk. keep-recent = 2 # Height interval at which pruned heights are removed from disk. -interval = 1 +interval = 100 # Pruning options for state commitment [store.options.sc-pruning-option] # Number of recent heights to keep on disk. keep-recent = 2 # Height interval at which pruned heights are removed from disk. -interval = 1 +interval = 100 [store.options.iavl-config] # CacheSize set the size of the iavl tree cache. cache-size = 100000 # If true, the tree will work like no fast storage and always not upgrade fast storage. skip-fast-storage-upgrade = true + +[telemetry] +# Enable enables the application telemetry functionality. When enabled, an in-memory sink is also enabled by default. Operators may also enabled other sinks such as Prometheus. +enable = true +# Address defines the metrics server address to bind to. +address = 'localhost:1338' +# Prefixed with keys to separate services. +service-name = '' +# Enable prefixing gauge values with hostname. +enable-hostname = false +# Enable adding hostname to labels. +enable-hostname-label = false +# Enable adding service to labels. +enable-service-label = false +# PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. It defines the retention duration in seconds. +prometheus-retention-time = 0 +# GlobalLabels defines a global set of name/value label tuples applied to all metrics emitted using the wrapper functions defined in telemetry package. +# Example: +# [["chain_id", "cosmoshub-1"]] +global-labels = [] +# MetricsSink defines the type of metrics backend to use. Default is in memory +metrics-sink = '' +# StatsdAddr defines the address of a statsd server to send metrics to. Only utilized if MetricsSink is set to "statsd" or "dogstatsd". +stats-addr = '' +# DatadogHostname defines the hostname to use when emitting metrics to Datadog. Only utilized if MetricsSink is set to "dogstatsd". +data-dog-hostname = '' diff --git a/tools/confix/migrations.go b/tools/confix/migrations.go index 86bf1affee24..77fc4a671cb4 100644 --- a/tools/confix/migrations.go +++ b/tools/confix/migrations.go @@ -55,6 +55,8 @@ var v2KeyChanges = v2KeyChangesMap{ }, "iavl-cache-size": []string{"store.options.iavl-config.cache-size"}, "iavl-disable-fastnode": []string{"store.options.iavl-config.skip-fast-storage-upgrade"}, + "telemetry.enabled": []string{"telemetry.enable"}, + "mempool.max-txs": []string{"comet.mempool.max-txs"}, // Add other key mappings as needed }