Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

P2P bitcoin node showcase demonstrating a node handshake

Notifications You must be signed in to change notification settings

bitmagier/p2p-bitcoin-handshake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample P2P node handshake for bitcoin

Test Procedure

We build and run a bitcoin-core node and run our tool against it.

Install Dependencies. See dependencies.md

e.g. for Ubuntu jammy (22.04):

apt install build-essential autoconf automake clang libboost-all-dev

Compile original Bitcoin core version v24.0.1

git submodule update --init
cd bitcoin-core
# we checkout a stable recent version to get a consistent result 
git checkout v24.0.1
./autogen.sh
./configure --disable-maintainer-mode --disable-wallet --disable-tests --disable-bench --with-gui=no
make # use "-j N" for N parallel jobs
cd ..

Run Bitcoin Core node with a minimal chain and bind it to 127.0.0.1:

mkdir -p /tmp/bitcoin_data && bitcoin-core/src/bitcoind -datadir=/tmp/bitcoin_data -chain=regtest -bind=127.0.0.1 -debug=net

In another shell, we test the handshake implementation against the default port of regtest chain: 18445

cargo run -- --remote 127.0.0.1:18445 

Resources

About

P2P bitcoin node showcase demonstrating a node handshake

Topics

Resources

Stars

Watchers

Forks

Languages