Cardinal
This section configures Cardinal, which handles shard routing, logging, and rollup modes.
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_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
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_PRETTY
When set to true, enables human-readable (pretty) logs for easier debugging, the default value is false.
Example
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
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
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_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
TELEMETRY_TRACE_ENABLED
Enables trace collection, allowing for continuous application monitoring and tracing.
Example