Skip to content

m-peko/handshaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build License

handshaker - Perform P2P handshake with Bitcoin node

Table of Content

  1. Quick Start
  2. Contribution
  3. License

Quick Start

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:

  1. Build Docker image
docker build docker/ -t bitcoin-node
  1. 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 ...
  1. Perform P2P handshake
cargo run 0.0.0.0:18444 -n testnet

Note: Checksum check might fail sometimes during handshake.

Contribution

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

License

The project is available under the MIT license.

About

Bitcoin protocol P2P handshake implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published