# on receiving block 871305 here
$ date -u '+%Y-%m-%dT%H:%M:%SZ'
2024-11-21T07:05:02Z
# as written in the block header
2024-11-21T07:04:45Z

$ uptime   # since last reboot
 07:05:02 up 109 days, 22 min,  0 users,  load average: 0.03, 0.18, 0.30

$ battery.sh
95%, Power Supply Online

$ uname -smnr
Linux singer 6.6.37-0-lts x86_64

$ grep ^MemAvailable /proc/meminfo
MemAvailable:    1540932 kB

$ du -h -d1 .bitcoin/
2.2G	.bitcoin/testnet4
10.7G	.bitcoin/indexes
3.2G	.bitcoin/signet
33.6M	.bitcoin/wallets
97.7G	.bitcoin/blocks
11.9G	.bitcoin/chainstate
15.3G	.bitcoin/testnet3
141.1G	.bitcoin/

$ df -h .
Filesystem                Size      Used Available Use% Mounted on
/dev/sda3               911.4G    807.3G    103.1G  89% /

$ bitcoind --version
Bitcoin Core version v28.99.0-4835bba2cb13
Copyright (C) 2009-2024 The Bitcoin Core developers

Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org/> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.

This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
or <https://opensource.org/licenses/MIT>

$ BC=$(bitcoin-cli getblockcount); echo $BC
871305

$ BH=$(bitcoin-cli getblockhash 871305); echo $BH
000000000000000000011c150cf6b49fa2282162a51df8bea32ecfd9c2d582a6

$ bitcoin-cli getblockheader $BH
{
  "hash": "0000000000000000000177e5df18154411cf2f9ea4fa4e3f7fbbed9b6fc75e0d",
  "confirmations": 1,
  "height": 855601,
  "version": 537083904,
  "versionHex": "20034000",
  "merkleroot": "1f3f3c3fc7b44de7c79df750712a334ea83dbb10dd47c57a789d6dd049b432c8",
  "time": 1722919934,
  "mediantime": 1722917249,
  "nonce": 2205577874,
  "bits": "17031abe",
  "difficulty": 90666502495565.78,
  "chainwork": "0000000000000000000000000000000000000000876c314d1b2244b4226cab8c",
  "nTx": 1,
  "previousblockhash": "00000000000000000001187df2cd86998c727058ce11aa92b2fc97abb7816728"
}

$ echo $BH | tr 0 . | fold -w 4 | paste -d " " - - - -
.... .... .... ....
...1 1c15 .cf6 b49f
a228 2162 a51d f8be
a32e cfd9 c2d5 82a6

$ : Following was the shortform
$ : from which shortkode came
$ last=${BH: -4}
$ a=$(echo $BH | cut -b-60 \
  | fold -w 4 \
  | grep -Ev '^(0000|[^0]{4})$')
$ R=$(echo $a $last | cut -b-20)
$ printf "%s sf: " $BC
$ { echo $R | grep "$last$" \
  || echo $R M; } | tr "0\n" ". "
  echo
871305 sf: ...1 .cf6 82a6 

$ : Following is the shortkode
$ last=${BH#${BH%????}}
$ nz=$(echo $BH | fold -w 4 \
  | grep -cE '^[^0]{4}$')
$ z=$(echo $BH | fold -w 4 \
  | grep -c '^0000$')
$ printf "%s sk: " $BC
$ printf "%s %x" $last \
  $(((${nz}<<4)+${z})) \
  | tr "0\n" ". "; echo
871305 sk: 82a6 a4

$ niceblack.sh $BH $BC
             ____ ________
            ( __ )__  <  /
           / __  | / // / 
          / /_/ / / // /  
          \____/ /_//_/   

           _____ ____  ______
          |__  // __ \/ ____/
           /_ </ / / /___ \  
         ___/ / /_/ /___/ /  
        /____/\____/_____/   

  ,---   .123 4567 89ab cdef   ---,
  | ..   .... .... .... ....   .f |
  | 1.   ...1 1c15 .cf6 b49f   1f |
  | 2.   a228 2162 a51d f8be   2f |
  | 3.   a32e cfd9 c2d5 82a6   3f |
  '===   ==== ==== ==== ====   ==='
   sk:   82a6 a4

$ bitcoin-cli getmempoolinfo
{
  "loaded": true,
  "size": 74965,
  "bytes": 45626297,
  "usage": 250770288,
  "total_fee": 0.67248253,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000,
  "incrementalrelayfee": 0.00001000,
  "unbroadcastcount": 0,
  "fullrbf": true
}

## Current epoch estimation is +1.67%
## 393 of 2016, i.e. 19%, 1623 to go
## Current and previous two in numbers:
$ bitcoin-cli getnetworkhashps 2016
7.442212299710393e+20
$ bitcoin-cli getnetworkhashps 2016 870911
7.319322521948825e+20
$ bitcoin-cli getnetworkhashps 2016 868895
7.275582664903283e+20

$ bitcoin-cli gettxoutsetinfo muhash
{
  "height": 871305,
  "bestblock": "000000000000000000011c150cf6b49fa2282162a51df8bea32ecfd9c2d582a6",
  "txouts": 186367903,
  "bogosize": 14437714228,
  "muhash": "788b969b76b89f2f01ea378d1d28c17a5a36a339dd9b3e630ec98a99c65c4588",
  "total_amount": 19785111.73822506,
  "total_unspendable_amount": 219.51177494,
  "block_info": {
    "prevout_spent": 3573.54266514,
    "coinbase": 3.24317023,
    "new_outputs_ex_coinbase": 3573.42449491,
    "unspendable": 0.00000000,
    "unspendables": {
      "genesis_block": 0.00000000,
      "bip30": 0.00000000,
      "scripts": 0.00000000,
      "unclaimed_rewards": 0.00000000
    }
  }
}

$ bitcoin-cli getblockstats 871305
{
  "avgfee": 2732,
  "avgfeerate": 11,
  "avgtxsize": 364,
  "blockhash": "000000000000000000011c150cf6b49fa2282162a51df8bea32ecfd9c2d582a6",
  "feerate_percentiles": [
    4,
    5,
    6,
    10,
    33
  ],
  "height": 871305,
  "ins": 8529,
  "maxfee": 369892,
  "maxfeerate": 200,
  "maxtxsize": 29050,
  "medianfee": 774,
  "mediantime": 1732169968,
  "mediantxsize": 210,
  "minfee": 212,
  "minfeerate": 1,
  "mintxsize": 150,
  "outs": 9748,
  "subsidy": 312500000,
  "swtotal_size": 1482582,
  "swtotal_weight": 3610233,
  "swtxs": 4158,
  "time": 1732172685,
  "total_out": 357342449491,
  "total_size": 1578011,
  "total_weight": 3991949,
  "totalfee": 11817023,
  "txs": 4325,
  "utxo_increase": 1219,
  "utxo_size_inc": 70728,
  "utxo_increase_actual": -669,
  "utxo_size_inc_actual": -44617
}

$ bitcoin-cli getnettotals
{
  "totalbytesrecv": 6754292020,
  "totalbytessent": 5736007645,
  "timemillis": 1732172703775,
  "uploadtarget": {
    "timeframe": 86400,
    "target": 0,
    "target_reached": false,
    "serve_historical_blocks": true,
    "bytes_left_in_cycle": 0,
    "time_left_in_cycle": 0
  }
}

$ bitcoin-cli -netinfo
Bitcoin Core client v28.99.0-4835bba2cb13 - server 70016/Satoshi:28.99.0/

         ipv4     npr   total   block  manual
in         48       1      49
out        11       0      11       2       1
total      59       1      60

Local addresses: n/a


$ bitcoin-cli -addrinfo
{
  "addresses_known": {
    "ipv4": 52394,
    "ipv6": 0,
    "onion": 13508,
    "i2p": 0,
    "cjdns": 0,
    "total": 65902
  }
}

$ halving.sh 871305
=====================================
  Bitcoin Block Halving prediction
=====================================

bc=871305
gbt=1231006505
bbt=1732172685

This is average time to mine a block
(1732172685-1231006505)/871305
bts=575.1896348699538394088873

Now let's multiply that by 1050000
which is the block number of next
halving and get the prediction:
Wed Feb 23 22:03:16 UTC 2028

-------------------------------------
Next palindrome will be 872278
predicted to happen at this time:
Wed Nov 27 18:32:24 UTC 2024

-------------------------------------
Current mining epoch number is 432.
The next fortnight happens in block
872928 and probably around this time:
Mon Dec  2 02:23:37 UTC 2024

### v2_peerinfo are in v2_peerinfo-bitcoin.txt
$ bitcoin-cli getpeerinfo | grep -w 'v2' | uniq -c
     17     "transport_protocol_type": "v2",

$ bitcoin-cli getpeerinfo \
    | jq -r '.[]
      | select ( .transport_protocol_type == "v2" )
      | .addr + " " + .session_id' \
    | while read addr sid
      do
        a=$(echo ${addr%\]*} | tr -d '\[' | md5sum | cut -b-16);
        printf "%s\n\t%s\n" "$a" "$sid"
      done

7d3488815f08fe4d
	39453aa00021616620c8ee27de86d60609c8339f3f58322e5e916b6437265513
a01dd372a17e22af
	16a015a29130f71f66db488b6fe22b484d62b6e82ccd2966f03454689e977301
ea0d828b6840a58c
	12625926b6bc11d3c6e0230fab63fe0a5ed919c06671e7c43dc6f84aff881f60
27fb0220961d2c4c
	4d0027e3aaccf06009cd7ee59b217ffb874e5cee9d163208e51880358374c62b
f714d09729ce6b20
	13e415aedbaeff87198224ffe912331a8ca3b12d487699e97dc3a84da0db8e07
24ff0ef028fe6f5e
	520bd3cc9e951559f67e04d5cb2b908dddcad9de0657becdd0477561443a6460
cd89474ec9938594
	9d81c6a5bddf6c37b62fa3a629f572edad9618b831d2a5e4fc441f385ddeda43
b641a2d54785a0c9
	0bb487291d4450cfa62dfc9e9c5a979962548f08c68d4742b52db1a81a1497ef
a859e666d7a90948
	78d81141ca0e62a3b4d5fee62a21db8871387dd67637d8c9b418191cebd5b46b
fe7bcb6ba8e81065
	f86c93f8473cdaea2da41d2142baa8ba00aceaa5ce855edb3e93f9df022209c2
0028055375a445b6
	134846c7c2ae3c35bb96703ed4f3cc12b3b90583b2a56dff3ac50aecc88d845b
9f002a5fccae1c49
	8e9a135893a6785d2027c4c928589624052dbe0130f6ee626119a3c9c6dfdc9d
76fdeb26c1421dba
	bd6451a919a69aeee5e4f9b5e10a36d347928a304b162be4d2ea5af51aa43c13
f7184249d883a245
	01a3faa09207dbf5c5c4f2cc4d5a09d0625bf996999fbb0f22e7840c7282594b
ecdacfe7ae939546
	3da135bec2299c809a54622510e520b91ff36119acdc5b232fd605e4842ef26e
128530b89e23d131
	89ebf5098b63871b7ac59841c1f2d6b2263ce255a473e7551d6878497e221e56
f4595521a24bc96b
	9ca580ca927e77a5e696ce161a31e4c0a86e164f6a6ab7802e197d29d0a77c42