To develop and run this project locally, ensure you have the following tools installed.
- Rust.
- Binaries folder contains binary of
cometbft&bticoind - We can find
local_setup.shinside the project root, which contains commands for init, start and stop the services and nodes.
-
Download binaraires
bitcoind,bitcoin-cli,bitcoin-wallet&cometbftto your home directory & setDEFAULT_BINARY_PATH="{PROVIDE_BINARIES_PATH} //Set downloaded binary path in `local_setup.sh` -
use below command which initialize the folders, in your home directory.
./local_setup.sh init
Note: The init command will create a temp directory, and within that directory, it will generate subdirectories for Bitcoin nodes, POA nodes, and CometBFT nodes.
-
Create a file named federation.toml and copy the contents of the Federational.Toml file and save it node1 and node2 folders. Which contains federation members keys.
-
Update the comet BFT config files, which will be created inside the comet folders.
| node0 | node1 |
|---|---|
config.toml |
config.toml |
| proxy_app = "tcp://127.0.0.1:26658" | proxy_app = "tcp://127.0.0.1:36658" |
| laddr = "tcp://127.0.0.1:26657" | laddr = "tcp://127.0.0:36657" |
| allow_duplicate_ip = true | allow_duplicate_ip = true |
| under[p2p] = laddr = "tcp://0.0.0.0:26656", | under[p2p] = laddr = "tcp://0.0.0.0:36656" |
| persistent_peers = "{node_id_0}@127.0.0.1:26656, | persistent_peers = {node_id_0}@127.0.0.1:36656" |
| {node_id_1}@127.0.0.1:36656" | {node_id_1}@127.0.0.1:36656" |
-
Use below command to
startabitcoind,bitcoin-server,POAandcometbftnodes../local_setup.sh start -
Use script below command to
stopservices and nodes../local_setup.sh stop -
Use script below command to
cleanservices and nodes../local_setup.sh clean
Note: clean command will delete the tmp folders and contents.