Bitcoin CLI tooltips and hacks retweeted
bitcoin-cli getblock $(bitcoin-cli getblockhash 666666) 0 | xxd -r -p | fq -d bitcoin_block '.transactions[] | .outputs[] | select(.scriptpub[0].op == "return") | .scriptpub[1].arg'
Bitcoin CLI tooltips and hacks retweeted
$ bitcoin-cli getblock $(bitcoin-cli getblockhash 0) 2 | jq .tx[0].hex | xxd -r -p | strings | head -n 1
EThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks
Happy Birthday #Bitcoin 🥳
Bitcoin CLI tooltips and hacks retweeted
bitcoin-cli getblock $(bitcoin-cli getblockhash 0) 0 | xxd -r -p | xxd
This quoted post is unavailable.
Bitcoin CLI tooltips and hacks retweeted
$ bitcoin-cli getblockchaininfo | jq .softforks.taproot.bip9.status
"active"
Bitcoin CLI tooltips and hacks retweeted
Replying to @pwuille
$ date -d "+$(bitcoin-cli getblockchaininfo | jq '.softforks.taproot.bip9.min_activation_height - .blocks')0 minutes" -uR
Wed, 17 Nov 2021 13:31:05 +0000
Bitcoin CLI tooltips and hacks retweeted
Finding missed opportunities in lnd.log:
zgrep "insufficient bandwidth to route htlc" ~/.lnd/logs/bitcoin/mainnet/lnd.log* | grep "ChannelLink" | cut -d' ' -f5,11 | awk 'BEGIN { FS=OFS=SUBSEP=" "}{arr[$1]+=$2 }END {for (i in arr) print i,arr[i]}' | sort -n -t' ' -k2 -r
Bitcoin CLI tooltips and hacks retweeted
Replying to @zndtoshi
if you’re on linux, use it with “watch” for the live experience
watch -t bitcoin-cli -netinfo 4
and for more info, run
bitcoin-cli -netinfo help
Bitcoin CLI tooltips and hacks retweeted
list of all the config options
./src/bitcoind -help or ./src/bitcoind -?
list of all the RPCs
./src/bitcoin-cli help
detailed help for an RPC
./src/bitcoin-cli help (rpc call name)
./src/bitcoin-cli help getaddressinfo
Bitcoin CLI tooltips and hacks retweeted
Bashified the coarse difficulty adjustment estimation.
I'm still not sure if this is a reasonable correct way of estimating an upcoming difficulty adjustment.
Bitcoin CLI tooltips and hacks retweeted
Replying to @ajtowns @murchandamus
Oh, commands to get this data:
$ ./bitcoin-cli getpeerinfo | grep subver | sort | uniq -c | sort -n
$ tail -n5000000 ~/.bitcoin/debug.log | sed -n 's/.*receive version message: //p;' | sed 's/ version [0-9]*, blocks=.*//' | sort | uniq -c | sort -n
(2nd requires -debug=net)
Bitcoin CLI tooltips and hacks retweeted
admin@mynode:~$ bitcoin-cli getnetworkinfo
{
"version": 210100,
"subversion": "/Satoshi:0.21.1/"
Upgrade your #bitcoin node
Pass it on.
Bitcoin CLI tooltips and hacks retweeted
Replying to @JohnOnChain
bitcoin-cli getpeerinfo | jq -r .[].subver | sort
Bitcoin CLI tooltips and hacks retweeted
echo $(bitcoin-cli decoderawtransaction $(bitcoin-cli getrawtransaction $(bitcoin-cli getblock $(bitcoin-cli getblockhash 681629) | jq -r '.tx[0]')) | jq -r '.vin[0].coinbase' | xxd -r -p)
Bitcoin CLI tooltips and hacks retweeted
$ bitcoin-cli getblockchaininfo | jq .softforks.taproot.bip9.statistics.count
69
Nice.
Bitcoin CLI tooltips and hacks retweeted
With Bitcoin Core 0.21.1:
$ bitcoin-cli getblockchaininfo | jq '.softforks.taproot.bip9.statistics | .count / .elapsed * 100'
> 2.2556390977443606
Bitcoin CLI tooltips and hacks retweeted
quick jq command to compute the total amt of satoshis your lnd node has routed in the past month:
lncli fwdinghistory --start_time="-1M" --max_events=5000 | jq '[.forwarding_events[].amt_out | tonumber] | add'
my node has really been glowing up this year: 1.22 BTC ($70k) MTD
Bitcoin CLI tooltips and hacks retweeted
Now including transaction decoder:
echo $(bitcoin-cli decoderawtransaction $(bitcoin-cli getrawtransaction $(bitcoin-cli getblock $(bitcoin-cli getblockhash 668197) | jq -r '.tx[0]')) | jq -r '.vin[0].coinbase' | cut -c19-109 | xxd -r -p)
Bitcoin CLI tooltips and hacks retweeted
echo $(bitcoin-cli getrawtransaction $(bitcoin-cli getblock $(bitcoin-cli getblockhash 668197) | jq -r '.tx[0]') | cut -c107-197 | xxd -r -p)
"In retrospect, it was inevitable"
Recorded on the #Bitcoin blockchain in block 668,197.





















