mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02:00
25f69d970arelease note (Pol Espinasa)af629821cftest: add background validation test for getblockchaininfo (Pol Espinasa)a3d6f32a39rpc, log: add backgroundvalidation to getblockchaininfo (Pol Espinasa)5b2e4c4a88log: update progress calculations for background validation (Pol Espinasa) Pull request description: `getblockchaininfo` returns `verificationprogress=1` and `initialblockdownload=false` even if there's background validation. This PR adds information about background validation to rpc `getblockchaininfo` in a similar way to `validationprogress` does. If assume utxo was used the output of a "sync" node performing background validation: ``` $ ./build/bin/bitcoin-cli getblockchaininfo ... "mediantime": 1756933740, "verificationprogress": 1, "initialblockdownload": false, "backgroundvalidation": { "snapshotheight": 880000, "blocks": 527589, "bestblockhash": "0000000000000000002326308420fa5ccd28a9155217f4d1896ab443d84148fa", "mediantime": 1529076654, "chainwork": "0000000000000000000000000000000000000000020c92fab9e5e1d8ed2d8dbc", "verificationprogress": 0.2815790617966284 }, "chainwork": "0000000000000000000000000000000000000000df97866c410b0302954919d2", "size_on_disk": 61198817285, ... ``` If assume utxo was not used the progress is hidden: ``` $ ./build/bin/bitcoin-cli getblockchaininfo ... "mediantime": 1756245700, "verificationprogress": 1, "initialblockdownload": false, "chainwork": "00000000000000000000000000000000000000000000000000000656d6bb052b", "size_on_disk": 3964972194, ... ``` The PR also updates the way we estimate the verification progress returning a 100% on the snapshot block and not on the tip as we will stop doing background validation when reaching it. ACKs for top commit: fjahr: ACK25f69d970adanielabrozzoni: ACK25f69d970aachow101: ACK25f69d970asedited: ACK25f69d970aTree-SHA512: 5e5e08fd39af5f764962b862bc6d8257b0d2175fe920d4b79dc5105578fd4ebe08aee2fe9bfa5c9cad5d7610197a435ebaac0de23e7a5efa740dfea031a8a9d4