Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verification progress dropped 11% on bitcoin core update from 22 to 28 #31473

Closed
1 task done
wisammechano opened this issue Dec 12, 2024 · 2 comments
Closed
1 task done

Comments

@wisammechano
Copy link

wisammechano commented Dec 12, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

Possibly related to #31127 with wrong estimation.

I had a full node synced for a while then got shut down for a year or so. I started syncing again last week and got to 90% verification progress using Bitcoin Core v22 on Windows 11.

I shut it down normally and started v28 and found out that sync progress dropped to 79% (although height looks correct). The estimation of 79% seems off by a margin (~810204 / ~874306).

Prior to starting 28.0, I changed cache size to 3072 from 2000mb. Also enabled listen=1 and natpmp=1 and set rpcthreads to 4

Below is the output from bitcoind

v22.0

2024-12-11T22:32:59Z UpdateTip: new best=0000000000000000000025c009ef7f5a53d83c0f90b7204e6d4d6b8c558c3f46 height=810204 version=0x2161a000 log2_work=94.450625 tx=902076116 date='2023-10-01T21:38:54Z' progress=0.907849 cache=2729.0MiB(19552965txo)
2024-12-11T22:33:08Z addcon thread exit
2024-12-11T22:33:08Z Shutdown: In progress...
2024-12-11T22:33:29Z UpdateTip: new best=0000000000000000000388fb7927edce65a92fd529855ee0964a132a74943fd1 height=810205 version=0x20598000 log2_work=94.450638 tx=902078375 date='2023-10-01T21:51:34Z' progress=0.907851 cache=2729.5MiB(19557179txo)
2024-12-11T22:33:29Z net thread exit
2024-12-11T22:33:29Z opencon thread exit
2024-12-11T22:33:29Z msghand thread exit
2024-12-11T22:33:30Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat started
2024-12-11T22:33:30Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat completed (0.03s)
2024-12-11T22:33:30Z scheduler thread exit
2024-12-11T22:33:30Z Writing 0 unbroadcast transactions to disk.
2024-12-11T22:33:30Z Dumped mempool: 0s to copy, 0.042118s to dump
2024-12-11T22:33:30Z FlushStateToDisk: write coins cache to disk (19557179 coins, 2862106kB) started
2024-12-11T22:38:21Z FlushStateToDisk: write coins cache to disk (19557179 coins, 2862106kB) completed (290.77s)
2024-12-11T22:38:22Z FlushStateToDisk: write coins cache to disk (0 coins, 249287kB) started
2024-12-11T22:38:22Z FlushStateToDisk: write coins cache to disk (0 coins, 249287kB) completed (0.03s)
2024-12-11T22:38:22Z [btc] Releasing wallet
2024-12-11T22:38:24Z Shutdown: done

v28.0

2024-12-11T22:44:56Z Bitcoin Core version v28.0.0 (release build)
2024-12-11T22:44:56Z Script verification uses 7 additional threads
...
2024-12-11T22:45:13Z [Chainstate [ibd] @ height 810205 (0000000000000000000388fb7927edce65a92fd529855ee0964a132a74943fd1)] resized coinsdb cache to 8.0 MiB
2024-12-11T22:45:13Z [Chainstate [ibd] @ height 810205 (0000000000000000000388fb7927edce65a92fd529855ee0964a132a74943fd1)] resized coinstip cache to 3062.0 MiB
2024-12-11T22:45:13Z init message: Verifying blocks…
2024-12-11T22:45:13Z Verifying last 6 blocks at level 3
2024-12-11T22:45:13Z Verification progress: 0%
2024-12-11T22:45:18Z Verification progress: 16%
2024-12-11T22:45:20Z Verification progress: 33%
2024-12-11T22:45:22Z Verification progress: 50%
2024-12-11T22:45:27Z Verification progress: 66%
2024-12-11T22:45:32Z Verification progress: 83%
2024-12-11T22:45:37Z Verification progress: 99%
2024-12-11T22:45:37Z Verification: No coin database inconsistencies in last 6 blocks (13700 transactions)
...
2024-12-11T22:45:38Z block tree size = 874310
2024-12-11T22:45:38Z nBestHeight = 810205
...
2024-12-11T22:46:38Z UpdateTip: new best=0000000000000000000328e424cd9ff6317a8f256f7bc2b5d3aa487e295eb27d height=810206 version=0x2000a000 log2_work=94.450651 tx=902081169 date='2023-10-01T22:03:16Z' progress=0.799296 cache=2.0MiB(13498txo)
...
2024-12-11T23:05:30Z UpdateTip: new best=00000000000000000003c60a6d2e1057f22c6196fd460426edcac61fb6566bc6 height=810257 version=0x31df0000 log2_work=94.451318 tx=902204695 date='2023-10-02T05:46:14Z' progress=0.799400 cache=66.2MiB(471028txo)
2024-12-11T23:05:31Z New outbound-full-relay v1 peer connected: version: 70016, blocks=874317, peer=11
2024-12-11T23:06:43Z UpdateTip: new best=000000000000000000002523bf6b52063643fe2f6fa0044be77b9281f032fa44 height=810258 version=0x2c1a2000 log2_work=94.451331 tx=902206413 date='2023-10-02T05:49:36Z' progress=0.799402 cache=67.0MiB(477299txo)

output from getblockchaininfo v28

{
  "chain": "main",
  "blocks": 810219,
  "headers": 874306,
  "bestblockhash": "00000000000000000001ea4fa4ece42b581f5fdc166f7b38f5c8fa681e4df428",
  "difficulty": 57119871304635.31,
  "time": 1696204947,
  "mediantime": 1696201662,
  "verificationprogress": 0.7993304061924166,
  "initialblockdownload": true,
  "chainwork": "00000000000000000000000000000000000000005779f10cf088bda014db5010",
  "size_on_disk": 585465035888,
  "pruned": false,
  "warnings": [
  ]
}

v22

{
  "bestblockhash": "00000000000000000002a1d92d666379d4dad703f83a65d3fab646ac926059db",
  "blocks": 810129,
  "chain": "main",
  "chainwork": "00000000000000000000000000000000000000005767ad75997516b2847c0618",
  "difficulty": 57119871304635.31,
  "headers": 874306,
  "initialblockdownload": true,
  "mediantime": 1696145087,
  "pruned": false,
  "size_on_disk": 585444075524,
  "softforks": { "...":"..." },
  "verificationprogress": 0.9077289515209678,
  "warnings": ""
}

Expected behaviour

I'd expect the progress to be the same and reasonable maybe?

Steps to reproduce

upgrade from v22 to v28 using same datadir and run right away

Relevant log output

2024-12-11T22:31:49Z UpdateTip: new best=00000000000000000004ad5b9643b09000d1e468caf79c19492429865b158489 height=810202 version=0x2fffe000 log2_work=94.450599 tx=902071710 date='2023-10-01T21:25:05Z' progress=0.907847 cache=2727.9MiB(19544073txo)
2024-12-11T22:31:54Z UpdateTip: new best=00000000000000000004c503eb1af0f16fe468100db3dae2caf7420f22aaa8a3 height=810203 version=0x2b5a8000 log2_work=94.450612 tx=902074572 date='2023-10-01T21:35:20Z' progress=0.907848 cache=2728.4MiB(19547525txo)
2024-12-11T22:32:59Z UpdateTip: new best=0000000000000000000025c009ef7f5a53d83c0f90b7204e6d4d6b8c558c3f46 height=810204 version=0x2161a000 log2_work=94.450625 tx=902076116 date='2023-10-01T21:38:54Z' progress=0.907849 cache=2729.0MiB(19552965txo)
2024-12-11T22:33:08Z addcon thread exit
2024-12-11T22:33:08Z Shutdown: In progress...
2024-12-11T22:33:29Z UpdateTip: new best=0000000000000000000388fb7927edce65a92fd529855ee0964a132a74943fd1 height=810205 version=0x20598000 log2_work=94.450638 tx=902078375 date='2023-10-01T21:51:34Z' progress=0.907851 cache=2729.5MiB(19557179txo)
2024-12-11T22:33:29Z net thread exit
2024-12-11T22:33:29Z opencon thread exit
2024-12-11T22:33:29Z msghand thread exit
2024-12-11T22:33:30Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat started
2024-12-11T22:33:30Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat completed (0.03s)
2024-12-11T22:33:30Z scheduler thread exit
2024-12-11T22:33:30Z Writing 0 unbroadcast transactions to disk.
2024-12-11T22:33:30Z Dumped mempool: 0s to copy, 0.042118s to dump
2024-12-11T22:33:30Z FlushStateToDisk: write coins cache to disk (19557179 coins, 2862106kB) started
2024-12-11T22:38:21Z FlushStateToDisk: write coins cache to disk (19557179 coins, 2862106kB) completed (290.77s)
2024-12-11T22:38:22Z FlushStateToDisk: write coins cache to disk (0 coins, 249287kB) started
2024-12-11T22:38:22Z FlushStateToDisk: write coins cache to disk (0 coins, 249287kB) completed (0.03s)
2024-12-11T22:38:22Z [btc] Releasing wallet
2024-12-11T22:38:24Z Shutdown: done





2024-12-11T22:44:56Z Bitcoin Core version v28.0.0 (release build)
2024-12-11T22:44:56Z Script verification uses 7 additional threads
2024-12-11T22:44:56Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
2024-12-11T22:44:57Z Using RdSeed as an additional entropy source
2024-12-11T22:44:57Z Using RdRand as an additional entropy source
2024-12-11T22:44:59Z Default data directory C:\Users\_PATH\AppData\Local\Bitcoin
2024-12-11T22:44:59Z Using data directory D:\_PATH
2024-12-11T22:44:59Z Config file: D:\_PATH\bitcoin.conf
2024-12-11T22:44:59Z Config file arg: blockmaxweight="4000000"
2024-12-11T22:44:59Z Config file arg: blockreconstructionextratxn="1000"
2024-12-11T22:44:59Z Config file arg: datadir="D:\\_PATH"
2024-12-11T22:44:59Z Config file arg: dbcache="3072"
2024-12-11T22:44:59Z Config file arg: listen="1"
2024-12-11T22:44:59Z Config file arg: maxmempool="1000"
2024-12-11T22:44:59Z Config file arg: maxorphantx="1000"
2024-12-11T22:44:59Z Config file arg: maxsigcachesize="100"
2024-12-11T22:44:59Z Config file arg: natpmp="1"
2024-12-11T22:44:59Z Config file arg: prune="0"
2024-12-11T22:44:59Z Config file arg: rpcallowip="192.168.1.0/24"
2024-12-11T22:44:59Z Config file arg: rpcauth=****
2024-12-11T22:44:59Z Config file arg: rpcbind="0.0.0.0"
2024-12-11T22:44:59Z Config file arg: rpcport="8332"
2024-12-11T22:44:59Z Config file arg: rpcthreads="4"
2024-12-11T22:44:59Z Config file arg: server="1"
2024-12-11T22:44:59Z Config file arg: upnp="0"
2024-12-11T22:44:59Z Setting file arg: wallet = ["btc"]
2024-12-11T22:44:59Z Command-line arg: conf="bitcoin.conf"
2024-12-11T22:44:59Z Command-line arg: datadir="D:/_PATH"
2024-12-11T22:44:59Z Using at most 125 automatic connections (2048 file descriptors available)
2024-12-11T22:44:59Z scheduler thread start
2024-12-11T22:44:59Z Binding RPC on address 0.0.0.0 port 8332
2024-12-11T22:44:59Z WARNING: the RPC server is not safe to expose to untrusted networks such as the public internet
2024-12-11T22:44:59Z Using random cookie authentication.
2024-12-11T22:44:59Z Generated RPC authentication cookie D:\_PATH\.cookie
2024-12-11T22:44:59Z Permissions used for cookie: rw-rw-rw-
2024-12-11T22:44:59Z Using rpcauth authentication.
2024-12-11T22:44:59Z Starting HTTP server with 4 worker threads
2024-12-11T22:44:59Z Using wallet directory D:\_PATH
2024-12-11T22:44:59Z init message: Verifying wallet(s)…
2024-12-11T22:44:59Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2024-12-11T22:44:59Z Using wallet D:\_PATH\btc\wallet.dat
2024-12-11T22:44:59Z BerkeleyEnvironment::Open: LogDir=D:\_PATH\btc\database ErrorFile=D:\_PATH\btc\db.log
2024-12-11T22:45:00Z Using /16 prefix for IP bucketing
2024-12-11T22:45:00Z init message: Loading P2P addresses…
2024-12-11T22:45:00Z Loaded 70570 addresses from peers.dat  523ms
2024-12-11T22:45:00Z init message: Loading banlist…
2024-12-11T22:45:00Z banlist.dat ignored because it can only be read by Bitcoin Core version 22.x. Remove "D:\_PATH\banlist.dat" to silence this warning.
2024-12-11T22:45:00Z SetNetworkActive: true
2024-12-11T22:45:00Z Script verification uses 7 additional threads
2024-12-11T22:45:00Z Cache configuration:
2024-12-11T22:45:00Z * Using 2.0 MiB for block index database
2024-12-11T22:45:00Z * Using 8.0 MiB for chain state database
2024-12-11T22:45:00Z * Using 3062.0 MiB for in-memory UTXO set (plus up to 953.7 MiB of unused mempool space)
2024-12-11T22:45:00Z Using obfuscation key for blocksdir *.dat files (D:\_PATH\blocks): '0000000000000000'
2024-12-11T22:45:00Z Using 50 MiB out of 50 MiB requested for signature cache, able to store 1638400 elements
2024-12-11T22:45:00Z Using 50 MiB out of 50 MiB requested for script execution cache, able to store 1638400 elements
2024-12-11T22:45:00Z init message: Loading block index…
2024-12-11T22:45:00Z Assuming ancestors of block 000000000000000000011c5890365bdbe5d25b97ce0057589acaef4f1a57263f have valid signatures.
2024-12-11T22:45:00Z Setting nMinimumChainWork=000000000000000000000000000000000000000088e186b70e0862c193ec44d6
2024-12-11T22:45:00Z Opening LevelDB in D:\_PATH\blocks\index
2024-12-11T22:45:01Z Opened LevelDB successfully
2024-12-11T22:45:01Z Using obfuscation key for D:\_PATH\blocks\index: 0000000000000000
2024-12-11T22:45:09Z LoadBlockIndexDB: last block file = 3863
2024-12-11T22:45:10Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=28, size=43132583, heights=809956...810727, time=2023-09-30...2023-10-05)
2024-12-11T22:45:10Z Checking all blk files are present...
2024-12-11T22:45:11Z Initializing chainstate Chainstate [ibd] @ height -1 (null)
2024-12-11T22:45:11Z Opening LevelDB in D:\_PATH\chainstate
2024-12-11T22:45:13Z Opened LevelDB successfully
2024-12-11T22:45:13Z Using obfuscation key for D:\_PATH\chainstate: fbaa23d084ac0d83
2024-12-11T22:45:13Z Loaded best chain: hashBestChain=0000000000000000000388fb7927edce65a92fd529855ee0964a132a74943fd1 height=810205 date=2023-10-01T21:51:34Z progress=0.799294
2024-12-11T22:45:13Z Opening LevelDB in D:\_PATH\chainstate
2024-12-11T22:45:13Z Opened LevelDB successfully
2024-12-11T22:45:13Z Using obfuscation key for D:\_PATH\chainstate: fbaa23d084ac0d83
2024-12-11T22:45:13Z [Chainstate [ibd] @ height 810205 (0000000000000000000388fb7927edce65a92fd529855ee0964a132a74943fd1)] resized coinsdb cache to 8.0 MiB
2024-12-11T22:45:13Z [Chainstate [ibd] @ height 810205 (0000000000000000000388fb7927edce65a92fd529855ee0964a132a74943fd1)] resized coinstip cache to 3062.0 MiB
2024-12-11T22:45:13Z init message: Verifying blocks…
2024-12-11T22:45:13Z Verifying last 6 blocks at level 3
2024-12-11T22:45:13Z Verification progress: 0%
2024-12-11T22:45:18Z Verification progress: 16%
2024-12-11T22:45:20Z Verification progress: 33%
2024-12-11T22:45:22Z Verification progress: 50%
2024-12-11T22:45:27Z Verification progress: 66%
2024-12-11T22:45:32Z Verification progress: 83%
2024-12-11T22:45:37Z Verification progress: 99%
2024-12-11T22:45:37Z Verification: No coin database inconsistencies in last 6 blocks (13700 transactions)
2024-12-11T22:45:37Z  block index           36930ms
2024-12-11T22:45:37Z init message: Loading wallet…
2024-12-11T22:45:37Z BerkeleyEnvironment::Open: LogDir=D:\_PATH\btc\database ErrorFile=D:\_PATH\btc\db.log
2024-12-11T22:45:37Z [btc] Wallet file version = 10500, last client version = 220000
2024-12-11T22:45:37Z [btc] Legacy Wallet Keys: 0 plaintext, 2001 encrypted, 2001 w/ metadata, 2001 total.
2024-12-11T22:45:37Z [btc] Descriptors: 0, Descriptor Keys: 0 plaintext, 0 encrypted, 0 total.
2024-12-11T22:45:38Z [btc] Wallet completed loading in             291ms
2024-12-11T22:45:38Z [btc] setKeyPool.size() = 2000
2024-12-11T22:45:38Z [btc] mapWallet.size() = 4
2024-12-11T22:45:38Z [btc] m_address_book.size() = 1
2024-12-11T22:45:38Z Setting NODE_NETWORK on non-prune mode
2024-12-11T22:45:38Z block tree size = 874310
2024-12-11T22:45:38Z nBestHeight = 810205
2024-12-11T22:45:38Z initload thread start
2024-12-11T22:45:38Z mapport thread start
2024-12-11T22:45:38Z torcontrol thread start
2024-12-11T22:45:38Z natpmp: readnatpmpresponseorretry() for public address failed with -5 error.
2024-12-11T22:45:38Z Bound to 127.0.0.1:8334
2024-12-11T22:45:38Z Bound to [::]:8333
2024-12-11T22:45:38Z Bound to 0.0.0.0:8333
2024-12-11T22:45:38Z Loaded 0 addresses from "anchors.dat"
2024-12-11T22:45:38Z 0 block-relay-only anchors will be tried for connections.
2024-12-11T22:45:38Z init message: Starting network threads…
2024-12-11T22:45:38Z net thread start
2024-12-11T22:45:38Z opencon thread start
2024-12-11T22:45:38Z dnsseed thread start
2024-12-11T22:45:38Z addcon thread start
2024-12-11T22:45:38Z msghand thread start
2024-12-11T22:45:38Z Waiting 300 seconds before querying DNS seeds.
2024-12-11T22:46:38Z UpdateTip: new best=0000000000000000000328e424cd9ff6317a8f256f7bc2b5d3aa487e295eb27d height=810206 version=0x2000a000 log2_work=94.450651 tx=902081169 date='2023-10-01T22:03:16Z' progress=0.799296 cache=2.0MiB(13498txo)
2024-12-11T22:47:27Z UpdateTip: new best=000000000000000000005bf8f39f891a7ef192cd420aca62e6e4e712f9651345 height=810207 version=0x30b0c000 log2_work=94.450664 tx=902083876 date='2023-10-01T22:15:30Z' progress=0.799299 cache=3.7MiB(26474txo)
2024-12-11T22:50:23Z UpdateTip: new best=00000000000000000003d001eba5cebcc7f518100c565e9b81a8d43abe1a4647 height=810208 version=0x21b18000 log2_work=94.450677 tx=902085395 date='2023-10-01T22:16:33Z' progress=0.799299 cache=5.4MiB(40108txo)
2024-12-11T22:50:33Z UpdateTip: new best=000000000000000000023aa4cd17246fd163f70c76886d0a8a0c95de12064463 height=810209 version=0x31c16000 log2_work=94.450690 tx=902089477 date='2023-10-01T22:26:53Z' progress=0.799303 cache=7.2MiB(50870txo)
2024-12-11T22:50:38Z natpmp: readnatpmpresponseorretry() for public address failed with -5 error.
2024-12-11T22:50:38Z Loading addresses from DNS seed seed.bitcoin.sipa.be.
2024-12-11T22:50:38Z Loading addresses from DNS seed dnsseed.emzy.de.
2024-12-11T22:50:38Z Loading addresses from DNS seed dnsseed.bitcoin.dashjr-list-of-p2p-nodes.us.
2024-12-11T22:50:40Z Waiting 300 seconds before querying DNS seeds.
2024-12-11T22:51:05Z UpdateTip: new best=00000000000000000003bc9f4d0c3ee9506a98af5f998e76a26d0ce738857388 height=810210 version=0x20400000 log2_work=94.450703 tx=902091419 date='2023-10-01T22:34:18Z' progress=0.799304 cache=8.5MiB(61772txo)
2024-12-11T22:51:05Z init message: Done loading
2024-12-11T22:51:18Z UpdateTip: new best=000000000000000000015d7268a3392ee8a1d12df7487ab05a16850db6b55d27 height=810211 version=0x20000000 log2_work=94.450716 tx=902095202 date='2023-10-01T22:41:03Z' progress=0.799307 cache=9.7MiB(70383txo)
2024-12-11T22:51:32Z UpdateTip: new best=00000000000000000001e1f6c8ead46189e4be15a9d4ed23c9c3ab8173592fae height=810212 version=0x29274000 log2_work=94.450729 tx=902097477 date='2023-10-01T22:53:50Z' progress=0.799309 cache=10.7MiB(80259txo)
2024-12-11T22:51:36Z UpdateTip: new best=000000000000000000017157c555d2dbb157fab5fc745a16b08e6738e0c85936 height=810213 version=0x27e4e000 log2_work=94.450742 tx=902101740 date='2023-10-01T22:57:23Z' progress=0.799313 cache=12.6MiB(87659txo)
2024-12-11T22:51:46Z UpdateTip: new best=00000000000000000001d4e8965451fa109b0b7b8526ba2af168f20f0b9a7bcf height=810214 version=0x2c824000 log2_work=94.450755 tx=902104456 date='2023-10-01T23:07:42Z' progress=0.799316 cache=13.7MiB(96410txo)
2024-12-11T22:51:48Z UpdateTip: new best=00000000000000000002e60058b030f8f5c6a73a4d9c303a08996179bda559ed height=810215 version=0x2563e004 log2_work=94.450769 tx=902108886 date='2023-10-01T23:11:09Z' progress=0.799319 cache=14.4MiB(102029txo)
2024-12-11T22:52:04Z UpdateTip: new best=00000000000000000004ec54730438f390b5284524e581feb471639ebe4398f3 height=810216 version=0x20018000 log2_work=94.450782 tx=902111866 date='2023-10-01T23:33:15Z' progress=0.799322 cache=16.2MiB(115993txo)
2024-12-11T22:52:42Z UpdateTip: new best=00000000000000000001617c47276c60dca2c1115ada583ca27df1f98f564f14 height=810217 version=0x20006000 log2_work=94.450795 tx=902114798 date='2023-10-01T23:43:08Z' progress=0.799324 cache=17.3MiB(125921txo)

How did you obtain Bitcoin Core

Pre-built binaries

What version of Bitcoin Core are you using?

v28.0

Operating system and version

Windows 11 21H2 22000.2538

Machine specifications

Processor Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 2808 Mhz, 4 Core(s), 8 Logical Processor(s)
Total Physical Memory 15.9 GB
Total Virtual Memory 22.6 GB
Diskdrive D (NTFS):
HDD Size 919.41 GB
Free Space 119.99 GB

@wisammechano wisammechano changed the title verification progress dropped 12% on bitcoin core update from 22 to 28 verification progress dropped 11% on bitcoin core update from 22 to 28 Dec 12, 2024
@pinheadmz
Copy link
Member

pinheadmz commented Dec 12, 2024

Sync progress as reported by Bitcoin Core is really only accurate up to the height of the chain at the time of release. The number of transactions in the blockchain at that time are hard coded:

chainTxData = ChainTxData{
// Data from RPC: getchaintxstats 4096 000000000000000000011c5890365bdbe5d25b97ce0057589acaef4f1a57263f
.nTime = 1723649144,
.tx_count = 1059312821,
.dTxRate = 6.721086701157182,
};

These data are updated with every new release:

https://github.com/bitcoin/bitcoin/blob/28.x/doc/release-process.md#before-branch-off

After the hard-coded height is reached the software can only estimate how many more transactions there are to verify and so the sync progress is only a guess:

bitcoin/src/validation.cpp

Lines 5563 to 5586 in d6b225f

//! Guess how far we are in the verification process at the given block index
//! require cs_main if pindex has not been validated yet (because m_chain_tx_count might be unset)
double GuessVerificationProgress(const ChainTxData& data, const CBlockIndex *pindex) {
if (pindex == nullptr)
return 0.0;
if (!Assume(pindex->m_chain_tx_count > 0)) {
LogWarning("Internal bug detected: block %d has unset m_chain_tx_count (%s %s). Please report this issue here: %s\n",
pindex->nHeight, PACKAGE_NAME, FormatFullVersion(), PACKAGE_BUGREPORT);
return 0.0;
}
int64_t nNow = time(nullptr);
double fTxTotal;
if (pindex->m_chain_tx_count <= data.tx_count) {
fTxTotal = data.tx_count + (nNow - data.nTime) * data.dTxRate;
} else {
fTxTotal = pindex->m_chain_tx_count + (nNow - pindex->GetBlockTime()) * data.dTxRate;
}
return std::min<double>(pindex->m_chain_tx_count / fTxTotal, 1.0);
}

Upgrading from v22 to v28 means around three years of data has been included that you did not have before! So the updated node is giving you a much more accurate progress estimation.

@maflcko
Copy link
Member

maflcko commented Dec 12, 2024

Yes, this is expected.

Closing for now.

Leave a comment if there are any follow-up questions.

@maflcko maflcko closed this as completed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants