[cardinal]
BASE_SHARD_ROUTER_KEY = "router_key"
BASE_SHARD_SEQUENCER_ADDRESS = "localhost:9601"
CARDINAL_LOG_LEVEL = "log_level"
CARDINAL_LOG_PRETTY = false
CARDINAL_NAMESPACE = "defaultnamespace"
CARDINAL_ROLLUP_ENABLED = false
REDIS_ADDRESS = "localhost:6379"
REDIS_PASSWORD = "redis_password"
TELEMETRY_TRACE_ENABLED = false

BASE_SHARD_ROUTER_KEY

A secure authentication token used to authenticate Cardinal with the EVM Base Shard gRPC private endpoint. This key ensures secure communication between Cardinal and the base shard services. Router key must be length 64 and only contain alphanumerics.

Example

BASE_SHARD_ROUTER_KEY = 'e99e9ed8d90e593ec8ef86d6e9cbeb0de5aabfa415d2fd369d6ee1974dc2bb7d'

BASE_SHARD_SEQUENCER_ADDRESS

The address of the sequencer service, which coordinates shard operations. If rollup mode is enabled, this address points to the sequencer handling transactions. Required if Cardinal’s rollup mode is enabled.

Example

BASE_SHARD_SEQUENCER_ADDRESS = 'localhost:9601'

CARDINAL_LOG_LEVEL

Sets the verbosity level of logging in Cardinal. The available levels are (trace, debug, info, warn, error, fatal, panic, disabled)

Example

CARDINAL_LOG_LEVEL = 'info'

CARDINAL_LOG_PRETTY

When set to true, enables human-readable (pretty) logs for easier debugging, the default value is false.

Example

CARDINAL_LOG_PRETTY = true

CARDINAL_NAMESPACE

A unique identifier for the Cardinal shard namespace. This configuration is critical for security:

  • Prevents signature replay attacks across different Cardinal instances
  • Ensures unique transaction signatures per game instance

Each Cardinal instance must have a unique namespace to ensure that signatures cannot be replayed across different instances of the game. This is particularly important in production environments where multiple game instances may be running simultaneously.

Example

# Production namespace
CARDINAL_NAMESPACE = 'prod-game-v1'

# Development namespace
CARDINAL_NAMESPACE = 'dev-game-v1'

CARDINAL_ROLLUP_ENABLED

Controls Cardinal’s rollup mode, which affects transaction handling and state management:

  • When Enabled (true):

    • Cardinal sequences and recovers transactions on the base shard
    • Requires valid BASE_SHARD_SEQUENCER_ADDRESS
    • Provides stronger consistency guarantees
    • Suitable for production deployments
  • When Disabled (false):

    • Processes transactions locally
    • Useful for development and testing
    • No sequencer dependency
    • Default setting

Example

# Production setting
CARDINAL_ROLLUP_ENABLED = true

# Development setting
CARDINAL_ROLLUP_ENABLED = false

REDIS_ADDRESS

The address of the Redis server used for storing game state. When using world cli v1.3.1 or later, this setting is automatically managed:

  • Local Development: world cli creates and manages a local Redis container
  • Production: Configure this for your production Redis instance
  • Testing: Uses an in-memory Redis instance

Example

REDIS_ADDRESS = 'localhost:6379'

REDIS_PASSWORD

The password for the Redis server. Leave empty for no password. Make sure to set this in production to secure your Redis instance.

Example

REDIS_PASSWORD = ''

TELEMETRY_TRACE_ENABLED

Enables trace collection, allowing for continuous application monitoring and tracing.

Example

TELEMETRY_TRACE_ENABLED = false