two ways to get bitcoin.pdf from your bitcoin node:

A) If you run a full archival node with txindex on:

bitcoin-cli getrawtransaction 54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713 0 00000000000000ecbbff6bafb7efa2f7df05b227d5c73dca8f2635af32a2e949 | sed 's/0100000000000000/\n/g' | tail -n +2 | cut -c7-136,139-268,271-400 | tr -d '\n' | cut -c17-368600 | xxd -p -r > bitcoin.pdf

B) directly from the utxoset. works on all nodes, pruned or not. I came up with this one! it takes on a bit longer:

seq 0 947 | (while read -r n; do bitcoin-cli gettxout 54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713 $n | jq -r '.scriptPubKey.asm' | awk '{ print $2 $3 $4 }'; done) | tr -d '\n' | cut -c 17-368600 | xxd -r -p > bitcoin.pdf

both should sha256 hash to b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553

happy bitcoin whitepaper day!

Reply to this note

Please Login to reply.

Discussion

No replies yet.