Bitcoin Core - Pruned Node Setup

Blockchain snapshot

speed-up synchronization

as user

grab the latest snapshot of the Bitcoin blockchain

wget https://prunednode.today/latest.zip
wget https://prunednode.today/latest.signed.txt
cat latest.signed.txt
sha256sum latest.zip
# 5b8f662040ea993a0aec3fe9808b1aa4c38061df98974cd2be5449926a967a6d  snapshot230103.zip

and deploy it before starting the daemon for the first time

mkdir ~/.bitcoin/
unzip -d ~/.bitcoin/ latest.zip
rm -f latest.zip

Install

as user

grab the latest and official protocol implementation

wget https://bitcoin.org/bin/bitcoin-core-22.0/bitcoin-22.0-x86_64-linux-gnu.tar.gz
wget https://bitcoin.org/laanwj-releases.asc
md5sum bitcoin-22.0-x86_64-linux-gnu.tar.gz
# c263822f9d12a1f22f087e6858559bbe
tar xzf bitcoin-22.0-x86_64-linux-gnu.tar.gz
cd bitcoin-22.0/
cp -ai bin/* /usr/local/bin/
cp -ai include/* /usr/local/include/
cp -ai lib/* /usr/local/lib/
cp -ai share/* /usr/local/share/
vi /etc/ld.so.conf

/usr/local/lib

ldconfig

Ready to go

as user

which bitcoind
bitcoind -version

screen -S bitcoind

bitcoind -daemon -prune=550
pgrep -a bitcoind
netstat -lntup | grep bitcoind

watch du -sh ~/.bitcoin/blocks/ ~/.bitcoin/chainstate/

check its sync status

tail -F ~/.bitcoin/debug.log

and wait until you’ve reached progress=1

Operations

as user

stop

bitcoin-cli stop

status

bitcoin-cli getmemoryinfo
bitcoin-cli getrpcinfo
bitcoin-cli uptime

bitcoin-cli getnetworkinfo
bitcoin-cli getpeerinfo

bitcoin-cli getblockchaininfo
bitcoin-cli getdifficulty

start

bitcoin-cli start

Additional notes

misc

did we get the last block? are we truly up-to-date?

wget -q -O- https://blockchain.info/q/getblockcount; echo
bitcoin-cli getblockcount

firewall

once your node is in sync, you might want to open the service to the world

vi /etc/nftables.conf

    # bitcoind
            iif $nic tcp dport 8333 accept

systemctl reload nftables.service

as for 8332/tcp, it is only enabled on localhost by default

Resources

https://bitcoin.org/en/download

https://bitcoin.org/en/full-node

https://blockgeeks.com/install-bitcoin-core/

https://en.bitcoinwiki.org/wiki/Bitcoind

firewall

https://bitcoin.stackexchange.com/questions/5757/what-is-the-difference-between-the-rpc-port-8332-and-port-8333

full node

FW https://bitcoin.org/en/full-node

FW https://bitcoin.org/en/full-node#what-is-a-full-node ==> 7GiB

FW https://bitcoin.org/en/posts/how-to-run-a-full-node

blockchain snapshots

https://bitcoin.stackexchange.com/questions/110945/how-download-whole-blockchain-and-preprocess-it-for-analysis

https://bitcoin.stackexchange.com/questions/799/can-i-download-the-whole-block-chain-from-somewhere

https://blockchains.download/bitcoin/

https://github.com/Blockchains-Download/Bitcoin/releases

https://github.com/Blockchains-Download/Bitcoin

https://flo.sh/download-bitcoin-blockchain-bootstrap/#donation ==> not for free

https://prunednode.today/ ==> OK

[fw] https://bitcointalk.org/index.php?topic=5177528.0

[fw] https://bitcointalk.org/index.php?topic=145386.0

https://www.linux.org/threads/installing-bitcoin-on-kali.29678/

https://blockgeeks.com/guides/how-to-install-blockchain-on-ubuntu/

https://bitcoin.stackexchange.com/questions/12001/what-is-the-fastest-possible-way-to-download-the-blockchain

https://www.reddit.com/r/Bitcoin/comments/h06stx/can_you_predownload_the_whole_blockchain_before/

sync

https://bitcoin.stackexchange.com/questions/37815/how-to-know-if-bitcoind-synced

prune

https://bitcoin.stackexchange.com/questions/37496/how-can-i-run-bitcoind-in-pruning-mode

https://bitcoin.stackexchange.com/questions/24563/is-there-a-way-to-run-bitcoind-without-being-a-full-node

https://news.bitcoin.com/pros-and-cons-on-bitcoin-block-pruning/

https://bitcoin.stackexchange.com/questions/71539/do-you-have-to-download-the-entire-bitcoin-blockchain-for-bitcoin-core-pruned-mo

https://coinguides.org/bitcoin-blockchain-pruning/

troubles

https://bitcoin.stackexchange.com/questions/84918/bitcoind-daemon-error-connecting-to-the-server


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun