environments/README.md
This directory contains environment-specific configuration files for Shardeum. Each file is tailored for a specific deployment environment.
To use a specific configuration file, set the LOAD_JSON_CONFIGS environment variable to point to the desired configuration file:
# For local environment
LOAD_JSON_CONFIGS=config/environments/local.config.json shardus start 10
# For devnet environment
LOAD_JSON_CONFIGS=config/environments/devnet.config.json shardus start 10
# For testnet environment
LOAD_JSON_CONFIGS=config/environments/testnet.config.json shardus start 10
# For mainnet environment
LOAD_JSON_CONFIGS=config/environments/mainnet.config.json shardus start 10
Alternatively, use the provided convenience script:
# For local environment with 10 nodes
./scripts/run-env.sh local 10
# For devnet environment with 15 nodes
./scripts/run-env.sh devnet 15
# For testnet environment with 25 nodes
./scripts/run-env.sh testnet 25
This approach uses the built-in configuration loading mechanism of Shardus without modifying any files.
When connecting to existing networks like testnet or mainnet, you need to configure the archivers correctly. The following script is available to help with this:
The configure-archiver.js script provides several ways to configure archivers:
Verify if the current configuration matches what we would get from the specified archiver:
node scripts/configure-archiver.js check testnet 35.193.191.159 4000
This will:
Replace all existing archivers with all archivers discovered from the network:
node scripts/configure-archiver.js set testnet 35.193.191.159 4000
This will:
Add a new archiver to the existing list:
node scripts/configure-archiver.js add testnet archiver2.testnet.shardeum.org 4000
The script will automatically fetch the public key from the archiver.
These configurations are designed for development purposes and include:
This configuration is designed for the Incentivized Test Network:
This configuration is designed for the production Shardeum network:
The placeholder keys in the TestNet and MainNet configurations must be replaced with actual secure keys before deployment. Never commit real private keys to version control.
For local and development environments, the included keys are for testing only and should not be used in production.