Prerequisites:
- Rust toolchain
- Docker (optional)
Perform P2P handshake to one or more Bitcoin nodes by running the following command:
cargo run 75.30.104.234:8333 185.78.209.28:8333
In case you want to run your local Bitcoin node, follow the next steps:
- Build Docker image
docker build docker/ -t bitcoin-node
- Run Docker container
docker run -p 18444:18444 --name btc bitcoin-node
Port 18444 is used in the regtest
Bitcoin network by default.
If you wish to run the node in Bitcoin network other than regtest
(possible values:
main
, test
, signet
, regtest
), set the environment variable like:
docker run -e BTC_CHAIN=main ...
- Perform P2P handshake
cargo run 0.0.0.0:18444 -n testnet
Note: Checksum check might fail sometimes during handshake.
Feel free to contribute.
If you find that any of the tests fail, please create a ticket in the issue tracker indicating the following information:
- platform
- architecture
The project is available under the MIT license.