The purpose of the debug-node is to start a debug-friendly environment.
-
Prepare the repos as described.
-
Setup the workspace using these docs.
-
Prepare the .env
Make a duplicate of .env.example and rename it to .env. Fill the corresponding variables.
DEBUG_CHAIN_ID
- Random string without space.ZERO_GAS_PRICE
- You can use this variable to set the gas prices to 0acudos thus making the debugging easier. Example: ZERO_GAS_PRICE="true"OPEN_ALL_PORTS
- By default only few ports are open. You can open all ports by setting this variable to true thus making the debugging easierExample: OPEN_ALL_PORTS="true"
-
Prepare the users configuration using the docs
-
Config the debug-node as described above
-
Build the node using the shell command
docker-compose --env-file ./debug-node.arg -f ./debug-node.yml -f ./users-debug-node.override.yml -p cudos-start-debug-node up --build
or by using the VS-code command Build START DEBUG NODE in docker
-
Attach shell to the debug-node's container
-
Once the shell is attached you can:
-
Build the binary by using
cd ./CudosNode make install
-
Initialize the node by using
./init.sh
-
This container is mounting folder from your host filesystem to docker container. So you can modify the file on your file system and then just rebuild & reinit the node inside the container.