-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Motivation
Currently, deploying the indexer requires passing --chains=evm,tron,... to specify which chains to index. This is inconvenient for production deployments — every deploy command or Docker entrypoint needs to maintain this list, and adding/removing a chain means updating deployment configs rather than just the application config.
Proposal
Add an enabled field to each chain's configuration in config.yaml. When --chains is not provided, only chains with enabled: true are indexed.
chains:
tron_mainnet:
enabled: true
type: "tron"
...
tron_testnet:
enabled: false
type: "tron"
...Behavior:
--chainsnot provided: index only chains whereenabled: true(omitting the field defaults totruefor backward compatibility)--chainsprovided: index the specified chains regardless of theenabledflag (preserves current behavior for manual/dev runs)
Implementation
- Add
Enabled *boolfield toChainConfiginpkg/common/config/types.go - Add
EnabledNames()method toChainsinpkg/common/config/chains.go - Use
EnabledNames()instead ofNames()incmd/indexer/main.gowhen no--chainsflag is passed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels