# on receiving block 227418 here
$ date -u '+%Y-%m-%dT%H:%M:%SZ'
2024-12-22T06:15:54Z
# as written in the block header
2024-12-22T06:15:50Z

$ uptime   # since last reboot
 06:15:54 up 139 days, 23:33,  0 users,  load average: 1.27, 1.47, 1.56

$ battery.sh
68%, Power Supply Online

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

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

$ du -h -d1 .bitcoin/signet
503M	.bitcoin/signet/indexes
8.3M	.bitcoin/signet/wallets
3.3G	.bitcoin/signet/blocks
407M	.bitcoin/signet/chainstate
123M	.bitcoin/signet/electrs
4.3G	.bitcoin/signet

$ df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       912G  826G   85G  91% /

$ 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 -signet getblockcount); echo $BC
227418

$ BH=$(bitcoin-cli -signet getblockhash 227418); echo $BH
000000d04b1deeb366b6de6747e1e5f33a794b83ddd98586901696fff77f4e52

$ bitcoin-cli -signet getblockheader $BH
{
  "hash": "000000d04b1deeb366b6de6747e1e5f33a794b83ddd98586901696fff77f4e52",
  "confirmations": 1,
  "height": 227418,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "2a7a7441790adb5080c214c7feaa4dedee7299ce12986b3bea376abe3f595363",
  "time": 1734848150,
  "mediantime": 1734845013,
  "nonce": 24254411,
  "bits": "1e014894",
  "difficulty": 0.003043369795877122,
  "chainwork": "00000000000000000000000000000000000000000000000000000294e7f489df",
  "nTx": 1874,
  "previousblockhash": "000000177424bfb2220c72672bb003a6bd0436dbf2feaa3ec05a2dfc4e1f0a8b"
}

$ echo $BH | tr 0 . | fold -w 4 | paste -d " " - - - -
.... ..d. 4b1d eeb3
66b6 de67 47e1 e5f3
3a79 4b83 ddd9 8586
9.16 96ff f77f 4e52

$ : 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
227418 sf: ..d. 9.16 4e52 

$ : 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
227418 sk: 4e52 d1

### niceblack moved to the end

$ bitcoin-cli -signet getmempoolinfo
{
  "loaded": true,
  "size": 67242,
  "bytes": 8510312,
  "usage": 82514576,
  "total_fee": 0.31894494,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00000100,
  "minrelaytxfee": 0.00000100,
  "incrementalrelayfee": 0.00001000,
  "unbroadcastcount": 0,
  "fullrbf": true
}

$ gmm-gen.sh
1566

## Current epoch estimation is -1.66%
## 1626 of 2016, i.e. 80%, 390 to go
## Current and previous two in numbers:
$ bitcoin-cli -signet getnetworkhashps 2016
21395.76466469518
$ bitcoin-cli -signet getnetworkhashps 2016 225791
21756.48000080898
$ bitcoin-cli -signet getnetworkhashps 2016 223775
21315.50795487778

$ bitcoin-cli -signet gettxoutsetinfo muhash
{
  "height": 227418,
  "bestblock": "000000d04b1deeb366b6de6747e1e5f33a794b83ddd98586901696fff77f4e52",
  "txouts": 5751864,
  "bogosize": 465996233,
  "muhash": "4c480a740c43283cf21b91480e97b71f79ee46cbcc933ec5716001f58137a0c6",
  "total_amount": 10935177.19924825,
  "total_unspendable_amount": 297.80075175,
  "block_info": {
    "prevout_spent": 456.08821342,
    "coinbase": 25.01053214,
    "new_outputs_ex_coinbase": 456.07768128,
    "unspendable": 0.00000000,
    "unspendables": {
      "genesis_block": 0.00000000,
      "bip30": 0.00000000,
      "scripts": 0.00000000,
      "unclaimed_rewards": 0.00000000
    }
  }
}

$ bitcoin-cli -signet getblockstats 227418
{
  "avgfee": 562,
  "avgfeerate": 4,
  "avgtxsize": 262,
  "blockhash": "000000d04b1deeb366b6de6747e1e5f33a794b83ddd98586901696fff77f4e52",
  "feerate_percentiles": [
    4,
    4,
    4,
    4,
    4
  ],
  "height": 227418,
  "ins": 2020,
  "maxfee": 6441,
  "maxfeerate": 10,
  "maxtxsize": 2181,
  "medianfee": 500,
  "mediantime": 1734845013,
  "mediantxsize": 254,
  "minfee": 396,
  "minfeerate": 3,
  "mintxsize": 150,
  "outs": 2049,
  "subsidy": 2500000000,
  "swtotal_size": 491201,
  "swtotal_weight": 995762,
  "swtxs": 1873,
  "time": 1734848150,
  "total_out": 45607768128,
  "total_size": 491201,
  "total_weight": 995762,
  "totalfee": 1053214,
  "txs": 1874,
  "utxo_increase": 29,
  "utxo_size_inc": -18119,
  "utxo_increase_actual": 28,
  "utxo_size_inc_actual": -18288
}

$ bitcoin-cli -signet getnettotals
{
  "totalbytesrecv": 711647809,
  "totalbytessent": 1972833511,
  "timemillis": 1734848155211,
  "uploadtarget": {
    "timeframe": 86400,
    "target": 0,
    "target_reached": false,
    "serve_historical_blocks": true,
    "bytes_left_in_cycle": 0,
    "time_left_in_cycle": 0
  }
}

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

         ipv4   total   block
in         52      52
out        10      10       2
total      62      62

Local addresses: n/a


$ bitcoin-cli -signet -addrinfo
{
  "addresses_known": {
    "ipv4": 866,
    "ipv6": 0,
    "onion": 0,
    "i2p": 0,
    "cjdns": 0,
    "total": 866
  }
}

### v2_peerinfo are in v2_peerinfo-signet.txt
$ bitcoin-cli -signet getpeerinfo | grep -w 'v2' | uniq -c
      5     "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

f5ff3afa0c83e1eb
	9c64b0482a851af4de2e25e4e2c0720fddde11464b1d3cce686639ce11c6953d
efa032167c1e1a95
	67647ebe3c4f70c4593f07366349617dcc03d943636f4cd1ba07e072c55fd33a
944abbe46ee94b0d
	855d8591b9b1fb013c4d7b302b4fd61b2467d970d354de4c018c16fb34bf943a
e22fe61feb92b5c4
	0547c3fcd405fc4ad7aee7a098cbbc305526e86e6cc3ce257a5bba7ecf7e0d82
b238f700f288e393
	e565ad9487e61702395ea1c56859f802d0ba4242e87491f0c4d120a0ff7c5744


$ niceblack.sh $BH $BC
    ___  ___  _____   __ __ _______ 
   |__ \|__ \/__  /  / // /<  ( __ )
   __/ /__/ /  / /  / // /_/ / __  |
  / __// __/  / /  /__  __/ / /_/ / 
 /____/____/ /_/     /_/ /_/\____/  

  ,---   .123 4567 89ab cdef   ---,
  | ..   .... ..d. 4b1d eeb3   .f |
  | 1.   66b6 de67 47e1 e5f3   1f |
  | 2.   3a79 4b83 ddd9 8586   2f |
  | 3.   9.16 96ff f77f 4e52   3f |
  '===   ==== ==== ==== ====   ==='
   sk:   4e52 d1