The .env file is used to configure your Bitcoin network.
Warning
The syntax of .env is pretty strict: do not use any spaces before or after the =.
- Description : The number of Bitcoin nodes in your local network.
- Type :
int - Default value :
0
Important
Remember that each node will be computed by your machine. Even if the image is pretty small you should take into account the power of your machine.
- Description : Max number of peers for each node
- Type :
int - Default value :
0
Note
This parameter should not be fixed under ~11. For obscure reasons if set under, nodes will refuse every connection and your network will be empty.
- Description : The base port for RPC protocol
- Type :
int - Default value :
18443
Each node will be placed in a docker container. To avoid conflicts with ports when interacting from the outside, the ports will be spaced following this formula : NODE_BASE_RPC_PORT in your config.
- Description : The base port for P2P port
- Type :
int - Default value :
18444
Same as NODE_BASE_RPC_PORT
- Description : The preffix of all node names.
- Type :
string - Default value :
node
All node will be named like : BASE_NAME_i where i is the number of the node (starting from 1).
- Description : Username and password for RPC protocol in each node.
- Type :
string - Default value :
userandpassword
bit-cli and other scripts will use this value to interract with the node. Because this is only a local regtest version ,there is no need to pass a complicated password.
- Description : Path of the logs output
- Type :
string(relative of absolute path) - Default value :
./logs
- Description : Which logs are reported to the log output
- Type :
booolean - Default value :
LOG_NET_ENABLED:trueLOG_MEMPOOL_ENABLED:true
The categories above are categories from the valid debug logging categories (see bitcoin Core doc).
- Description : Path of the scenarios files.
- Type :
string(relative of absolute path) - Default value :
./scenarios
Scenario file will be read from this folder. There is no need to change it, you should rather move files to the ./scenarios folder.
# This is the configuration file
# ==== network ====
NODE_NUMBER=5
MAX_PEERS=128
# WARNING : set this value high (don't know why, but if it's
# under ~11 , a node will refuse all connections)
NODE_BASE_RPC_PORT=18443
NODE_BASE_P2P_PORT=18444
# ==== names ====
NODE_BASE_NAME=node
# ==== login ====
RPC_USER=user
RPC_PASSWORD=password
# ==== data ====
LOGS_PATH=./logs
# the following options describe which logs you want to print (boolean)
LOG_NET_ENABLED=false
LOG_MEMPOOL_ENABLED=true
# ==== Scenarios ====
SCENARIO_PATH=./scenarios