-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Summary
Implement the configuration system (config/) for loading, validating, and providing typed access to apex's YAML configuration.
YAML over TOML — aligns with Evolve ecosystem and DevOps conventions. People are more accustomed to YAML.
Requirements
- Load from
config.yaml(configurable path via--configflag) - Validate required fields, reject unknown keys
- Sensible defaults for optional fields
- Environment variable overrides for sensitive values (e.g.,
APEX_AUTH_TOKEN)
Config structure
namespaces:
eden: "000000000000000000000000000000000000000000000000000000006564656e"
xo: "00000000000000000000000000000000000000000000000000000000786f"
collect: "000000000000000000000000000000000000000000000000636f6c6c656374"
data_source:
type: celestia-node
endpoint: ws://localhost:26658
auth_token: ""
storage:
path: ./data/indexer.db
rpc:
address: 0.0.0.0:26659
grpc:
address: 0.0.0.0:26660
sync:
start_height: 1000000
backfill_batch_size: 100
backfill_concurrency: 4
observability:
metrics_address: 0.0.0.0:9090
log_level: info
tracing_enabled: false
tracing_endpoint: ""Implementation
- Use
gopkg.in/yaml.v3 - Typed Go structs in
config/config.gowithyamlstruct tags - Validation in
config/load.go - Namespace hex strings decoded and validated (29 bytes)
- Unit tests for loading, defaults, validation errors
References
- Design doc:
test_plan.md— Configuration section
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels