Skip to content

Commit

Permalink
Move binary path in docs from ./src to ./build/src
Browse files Browse the repository at this point in the history
  • Loading branch information
l0rinc committed Aug 28, 2024
1 parent ba1913d commit 0ea1939
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 86 deletions.
12 changes: 6 additions & 6 deletions contrib/devtools/gen-manpages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import tempfile

BINARIES = [
'src/bitcoind',
'src/bitcoin-cli',
'src/bitcoin-tx',
'src/bitcoin-wallet',
'src/bitcoin-util',
'src/qt/bitcoin-qt',
'build/src/bitcoind',
'build/src/bitcoin-cli',
'build/src/bitcoin-tx',
'build/src/bitcoin-wallet',
'build/src/bitcoin-util',
'build/src/qt/bitcoin-qt',
]

# Paths to external utilities.
Expand Down
20 changes: 10 additions & 10 deletions contrib/devtools/test_utxo_snapshots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ trap finish EXIT
EARLY_IBD_FLAGS="-maxtipage=9223372036854775207 -minimumchainwork=0x00"

server_rpc() {
./src/bitcoin-cli -rpcport=$SERVER_RPC_PORT -datadir="$SERVER_DATADIR" "$@"
./build/src/bitcoin-cli -rpcport=$SERVER_RPC_PORT -datadir="$SERVER_DATADIR" "$@"
}
client_rpc() {
./src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir="$CLIENT_DATADIR" "$@"
./build/src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir="$CLIENT_DATADIR" "$@"
}
server_sleep_til_boot() {
while ! server_rpc ping >/dev/null 2>&1; do sleep 0.1; done
Expand Down Expand Up @@ -111,14 +111,14 @@ read -p "Press [enter] to continue" _
echo
echo "-- IBDing the blocks (height=$BASE_HEIGHT) required to the server node..."
# shellcheck disable=SC2086
./src/bitcoind -logthreadnames=1 $SERVER_PORTS \
./build/src/bitcoind -logthreadnames=1 $SERVER_PORTS \
-datadir="$SERVER_DATADIR" $EARLY_IBD_FLAGS -stopatheight="$BASE_HEIGHT" >/dev/null

echo
echo "-- Creating snapshot at ~ height $BASE_HEIGHT ($UTXO_DAT_FILE)..."
server_sleep_til_shutdown # wait for stopatheight to be hit
# shellcheck disable=SC2086
./src/bitcoind -logthreadnames=1 $SERVER_PORTS \
./build/src/bitcoind -logthreadnames=1 $SERVER_PORTS \
-datadir="$SERVER_DATADIR" $EARLY_IBD_FLAGS -connect=0 -listen=0 >/dev/null &
SERVER_PID="$!"

Expand All @@ -143,13 +143,13 @@ echo
echo
echo "-- IBDing more blocks to the server node (height=$FINAL_HEIGHT) so there is a diff between snapshot and tip..."
# shellcheck disable=SC2086
./src/bitcoind $SERVER_PORTS -logthreadnames=1 -datadir="$SERVER_DATADIR" \
./build/src/bitcoind $SERVER_PORTS -logthreadnames=1 -datadir="$SERVER_DATADIR" \
$EARLY_IBD_FLAGS -stopatheight="$FINAL_HEIGHT" >/dev/null

echo
echo "-- Starting the server node to provide blocks to the client node..."
# shellcheck disable=SC2086
./src/bitcoind $SERVER_PORTS -logthreadnames=1 -debug=net -datadir="$SERVER_DATADIR" \
./build/src/bitcoind $SERVER_PORTS -logthreadnames=1 -debug=net -datadir="$SERVER_DATADIR" \
$EARLY_IBD_FLAGS -connect=0 -listen=1 >/dev/null &
SERVER_PID="$!"
server_sleep_til_boot
Expand All @@ -173,7 +173,7 @@ read -p "When you're ready for all this, hit [enter]" _
echo
echo "-- Starting the client node to get headers from the server, then load the snapshot..."
# shellcheck disable=SC2086
./src/bitcoind $CLIENT_PORTS $ALL_INDEXES -logthreadnames=1 -datadir="$CLIENT_DATADIR" \
./build/src/bitcoind $CLIENT_PORTS $ALL_INDEXES -logthreadnames=1 -datadir="$CLIENT_DATADIR" \
-connect=0 -addnode=127.0.0.1:$SERVER_PORT -debug=net $EARLY_IBD_FLAGS >/dev/null &
CLIENT_PID="$!"
client_sleep_til_boot
Expand All @@ -186,7 +186,7 @@ echo
echo "-- Loading UTXO snapshot into client. Calling RPC in a loop..."
while ! client_rpc loadtxoutset "$UTXO_DAT_FILE" ; do sleep 10; done

watch -n 0.3 "( tail -n 14 $CLIENT_DATADIR/debug.log ; echo ; ./src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir=$CLIENT_DATADIR getchainstates) | cat"
watch -n 0.3 "( tail -n 14 $CLIENT_DATADIR/debug.log ; echo ; ./build/src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir=$CLIENT_DATADIR getchainstates) | cat"

echo
echo "-- Okay, now I'm going to restart the client to make sure that the snapshot chain reloads "
Expand All @@ -198,12 +198,12 @@ read -p "Press [enter] to continue"

client_sleep_til_boot
# shellcheck disable=SC2086
./src/bitcoind $CLIENT_PORTS $ALL_INDEXES -logthreadnames=1 -datadir="$CLIENT_DATADIR" -connect=0 \
./build/src/bitcoind $CLIENT_PORTS $ALL_INDEXES -logthreadnames=1 -datadir="$CLIENT_DATADIR" -connect=0 \
-addnode=127.0.0.1:$SERVER_PORT "$EARLY_IBD_FLAGS" >/dev/null &
CLIENT_PID="$!"
client_sleep_til_boot

watch -n 0.3 "( tail -n 14 $CLIENT_DATADIR/debug.log ; echo ; ./src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir=$CLIENT_DATADIR getchainstates) | cat"
watch -n 0.3 "( tail -n 14 $CLIENT_DATADIR/debug.log ; echo ; ./build/src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir=$CLIENT_DATADIR getchainstates) | cat"

echo
echo "-- Done!"
4 changes: 2 additions & 2 deletions contrib/devtools/utxo_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if (( $# < 3 )); then
echo
echo 'Examples:'
echo
echo " ./contrib/devtools/utxo_snapshot.sh 570000 utxo.dat ./src/bitcoin-cli -datadir=\$(pwd)/testdata"
echo ' ./contrib/devtools/utxo_snapshot.sh 570000 - ./src/bitcoin-cli'
echo " ./contrib/devtools/utxo_snapshot.sh 570000 utxo.dat ./build/src/bitcoin-cli -datadir=\$(pwd)/testdata"
echo ' ./contrib/devtools/utxo_snapshot.sh 570000 - ./build/src/bitcoin-cli'
exit 1
fi

Expand Down
10 changes: 5 additions & 5 deletions contrib/tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ about the connection. Peers can be selected individually to view recent P2P
messages.

```
$ python3 contrib/tracing/p2p_monitor.py ./src/bitcoind
$ python3 contrib/tracing/p2p_monitor.py ./build/src/bitcoind
```

Lists selectable peers and traffic and connection information.
Expand Down Expand Up @@ -150,7 +150,7 @@ lost. BCC prints: `Possibly lost 2 samples` on lost messages.


```
$ python3 contrib/tracing/log_raw_p2p_msgs.py ./src/bitcoind
$ python3 contrib/tracing/log_raw_p2p_msgs.py ./build/src/bitcoind
```

```
Expand Down Expand Up @@ -188,7 +188,7 @@ In a different terminal, starting Bitcoin Core in SigNet mode and with
re-indexing enabled.

```
$ ./src/bitcoind -signet -reindex
$ ./build/src/bitcoind -signet -reindex
```

This produces the following output.
Expand Down Expand Up @@ -241,7 +241,7 @@ A BCC Python script to log the UTXO cache flushes. Based on the
`utxocache:flush` tracepoint.

```bash
$ python3 contrib/tracing/log_utxocache_flush.py ./src/bitcoind
$ python3 contrib/tracing/log_utxocache_flush.py ./build/src/bitcoind
```

```
Expand Down Expand Up @@ -300,7 +300,7 @@ comprising a timestamp along with all event data available via the event's
tracepoint.

```console
$ python3 contrib/tracing/mempool_monitor.py ./src/bitcoind
$ python3 contrib/tracing/mempool_monitor.py ./build/src/bitcoind
```

```
Expand Down
6 changes: 3 additions & 3 deletions contrib/tracing/connectblock_benchmark.bt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

This script requires a 'bitcoind' binary compiled with eBPF support and the
'validation:block_connected' USDT. By default, it's assumed that 'bitcoind' is
located in './src/bitcoind'. This can be modified in the script below.
located in './build/src/bitcoind'. This can be modified in the script below.

EXAMPLES:

Expand Down Expand Up @@ -67,7 +67,7 @@ BEGIN
connected block is between the start and end height (or the end height is
unset).
*/
usdt:./src/bitcoind:validation:block_connected /arg1 >= $1 && (arg1 <= $2 || $2 == 0 )/
usdt:./build/src/bitcoind:validation:block_connected /arg1 >= $1 && (arg1 <= $2 || $2 == 0 )/
{
$height = arg1;
$transactions = arg2;
Expand Down Expand Up @@ -102,7 +102,7 @@ usdt:./src/bitcoind:validation:block_connected /arg1 >= $1 && (arg1 <= $2 || $2
blocks where the time it took to connect the block is above the
<logging threshold in ms>.
*/
usdt:./src/bitcoind:validation:block_connected / (uint64) arg5 / 1000> $3 /
usdt:./build/src/bitcoind:validation:block_connected / (uint64) arg5 / 1000> $3 /
{
$hash = arg0;
$height = (int32) arg1;
Expand Down
4 changes: 2 additions & 2 deletions contrib/tracing/log_p2p_traffic.bt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BEGIN
printf("Logging P2P traffic\n")
}

usdt:./src/bitcoind:net:inbound_message
usdt:./build/src/bitcoind:net:inbound_message
{
$peer_id = (int64) arg0;
$peer_addr = str(arg1);
Expand All @@ -15,7 +15,7 @@ usdt:./src/bitcoind:net:inbound_message
printf("inbound '%s' msg from peer %d (%s, %s) with %d bytes\n", $msg_type, $peer_id, $peer_type, $peer_addr, $msg_len);
}

usdt:./src/bitcoind:net:outbound_message
usdt:./build/src/bitcoind:net:outbound_message
{
$peer_id = (int64) arg0;
$peer_addr = str(arg1);
Expand Down
8 changes: 4 additions & 4 deletions contrib/tracing/log_utxos.bt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

This script requires a 'bitcoind' binary compiled with eBPF support and the
'utxocache' tracepoints. By default, it's assumed that 'bitcoind' is
located in './src/bitcoind'. This can be modified in the script below.
located in './build/src/bitcoind'. This can be modified in the script below.

NOTE: requires bpftrace v0.12.0 or above.
*/
Expand All @@ -22,7 +22,7 @@ BEGIN
/*
Attaches to the 'utxocache:add' tracepoint and prints additions to the UTXO set cache.
*/
usdt:./src/bitcoind:utxocache:add
usdt:./build/src/bitcoind:utxocache:add
{
$txid = arg0;
$index = (uint32)arg1;
Expand All @@ -44,7 +44,7 @@ usdt:./src/bitcoind:utxocache:add
/*
Attaches to the 'utxocache:spent' tracepoint and prints spents from the UTXO set cache.
*/
usdt:./src/bitcoind:utxocache:spent
usdt:./build/src/bitcoind:utxocache:spent
{
$txid = arg0;
$index = (uint32)arg1;
Expand All @@ -66,7 +66,7 @@ usdt:./src/bitcoind:utxocache:spent
/*
Attaches to the 'utxocache:uncache' tracepoint and uncache UTXOs from the UTXO set cache.
*/
usdt:./src/bitcoind:utxocache:uncache
usdt:./build/src/bitcoind:utxocache:uncache
{
$txid = arg0;
$index = (uint32)arg1;
Expand Down
4 changes: 2 additions & 2 deletions doc/build-osx.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ cmake --build build --target deploy

## Running Bitcoin Core

Bitcoin Core should now be available at `./src/bitcoind`.
If you compiled support for the GUI, it should be available at `./src/qt/bitcoin-qt`.
Bitcoin Core should now be available at `./build/src/bitcoind`.
If you compiled support for the GUI, it should be available at `./build/src/qt/bitcoin-qt`.

The first time you run `bitcoind` or `bitcoin-qt`, it will start downloading the blockchain.
This process could take many hours, or even days on slower than average systems.
Expand Down
6 changes: 3 additions & 3 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ The output is denoised of errors from external dependencies.
To run clang-tidy on all source files:

```sh
( cd ./src/ && run-clang-tidy -j $(nproc) )
( cd ./build && run-clang-tidy -p . -j $(nproc) )
```

To run clang-tidy on the changed source lines:

```sh
git diff | ( cd ./src/ && clang-tidy-diff -p2 -j $(nproc) )
git diff | ( cd ./build && clang-tidy-diff -p1 -j $(nproc) )
```

Coding Style (Python)
Expand Down Expand Up @@ -471,7 +471,7 @@ in-tree. Example use:
$ valgrind --suppressions=contrib/valgrind.supp src/test/test_bitcoin
$ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
--show-leak-kinds=all src/test/test_bitcoin --log_level=test_suite
$ valgrind -v --leak-check=full src/bitcoind -printtoconsole
$ valgrind -v --leak-check=full build/src/bitcoind -printtoconsole
$ ./test/functional/test_runner.py --valgrind
```

Expand Down
Loading

0 comments on commit 0ea1939

Please sign in to comment.