Skip to content

Required Node Configs

These configurations must be applied for both full nodes and validators.

💡Note: failure to set up below configurations on a validator node may compromise chain functionality.

Node Configs

The dYdX Chain has important node configurations required for normal chain operation. This includes:

config.toml

Consensus Configs

[consensus]
timeout_commit = "500ms"

app.toml

Base Configuration

Replace $NATIVE_TOKEN_DENOM at the end of the field with the correct value from Network Constants

### Gas Prices ###
minimum-gas-prices = "0.025ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5,12500000000$NATIVE_TOKEN_DENOM"
### Pruning ###
pruning = "custom"
 
# Small numbers >= "2" for validator nodes.
# Larger numbers could be used for full-nodes if they are used for historical queries.
pruning-keep-recent = "7"
 
# Any prime number between "13" and "97", inclusive.
pruning-interval = "17"

gRPC Configs

[grpc]
# Enable grpc. The Cosmos gRPC service is used by various daemon processes,
# and must be enabled in order for the protocol to operate:
enable = true
 
# Non-standard gRPC ports are not supported at this time. Please run on port 9090, which is the default
# port specified in the config file.
# Note: grpc can be also be configured via start flags. Be careful not to change the default settings
# with either of the following flags: `--grpc.enable`, `--grpc.address`.
address = "0.0.0.0:9090"

Oracle Configuration

# ... other sections
 
[oracle]
# Enabled indicates whether the oracle is enabled.
enabled = "true"
 
# Oracle Address is the URL of the out of process oracle sidecar. This is used to
# connect to the oracle sidecar when the application boots up.
oracle_address = "SLINKY_ADDRESS_HERE:SLINKY_PORT_HERE" # default Slinky port is 8080.
 
# Client Timeout is the time that the application is willing to wait for responses from
# the oracle before timing out.
client_timeout = "250ms"
 
# MetricsEnabled determines whether oracle metrics are enabled. Specifically,
# this enables instrumentation of the oracle client and the interaction between
# the oracle and the app.
metrics_enabled = "true"
 
# PriceTTL is the maximum age of the latest price response before it is considered stale.
# The recommended max age is 10 seconds (10s). If this is greater than 1 minute (1m), the app
# will not start.
price_ttl = "10s"
 
# Interval is the time between each price update request. The recommended interval
# is the block time of the chain. Otherwise, 0.6 seconds (600ms) is a good default. If this
# is greater than 1 minute (1m), the app will not start.
interval = "600ms"

Slinky Configs

Sidecar can be configured by both flags and environment variables.

Env Vars

KeyDefaultDescription
CONNECT_CONFIG_HOST"0.0.0.0"The address Slinky will serve requests from. For single-machine deployments, consider using 127.0.0.1 for enhanced security. WARNING: changing this value requires updating the oracle_address in the app.toml configuration.
CONNECT_CONFIG_PORT"8080"The port Slinky will serve requests from. WARNING: changing this value requires updating the oracle_address in the app.toml configuration.
CONNECT_CONFIG_METRICS_ENABLED"true"Enables prometheus metrics.
CONNECT_CONFIG_METRICS_PROMETHEUSSERVERADDRESS"0.0.0.0:8002"The address of your prometheus server instance.

Flags

FlagDefault ValueDescription
--market-map-endpoint""The listen-to endpoint for market-map. This is typically the blockchain node's gRPC endpoint.
--oracle-config""Overrides part of the Oracle configuration. This does not override the entire configuration, only the specified part.
--run-pproffalseRun pprof server.
--pprof-port"6060"Port for the pprof server to listen on.
--log-std-out-level"info"Log level (debug, info, warn, error, dpanic, panic, fatal).
--log-file-level"info"Log level for the file logger (debug, info, warn, error, dpanic, panic, fatal).
--log-file"sidecar.log"Write logs to a file.
--log-max-size100Maximum size in megabytes before log is rotated.
--log-max-backups1Maximum number of old log files to retain.
--log-max-age3Maximum number of days to retain an old log file.
--log-file-disable-compressionfalseCompress rotated log files.
--log-disable-file-rotationfalseDisable writing logs to a file.
--metrics-enabledtrueEnables the Oracle client metrics.
--metrics-prometheus-address"0.0.0.0:8002"Sets the Prometheus server address for the Oracle client metrics.
--host"0.0.0.0"The address the Oracle will serve from.
--port"8080"The port the Oracle will serve from.
--update-interval250000000The interval at which the oracle will fetch prices from providers.
--max-price-age120000000000Maximum age of a price that the oracle will consider valid.