Home < Bitcoin++ < Lightning Specification < Bitcoin Review Podcast < Bitcoin Core Dev Tech < Bitcoin Core Dev Tech 2023 (Sept) < Bitcoin Core Dev Tech 2023 (Apr) < Bitcoin Core Dev Tech 2022 < Bitcoin Core Dev Tech 2019 < Bitcoin Core Dev Tech 2018 (Oct) < Bitcoin Core Dev Tech 2018 (Mar) < Bitcoin Core Dev Tech 2017 < Bitcoin Core Dev Tech 2015 < Stephan Livera Podcast < Advancing Bitcoin < Bitcoin Magazine < Bitcointranscripts < TABConf < London Bitcoin Devs < Misc < MIT Bitcoin Expo < Greg Maxwell < Chaincode Labs < Sydney Bitcoin Meetup < Bitcoinology < c-lightning < Adopting Bitcoin < IACR Crypto < Wasabi Research Club < Lightning Hack Day < Blockstream Webinars < Munich Meetup < TFTC Podcast < Realworldcrypto < SF Bitcoin Meetup < CPPcon < Bitcoin Design < Chicago Bitdevs < VR Bitcoin < LA Bitdevs < Ruben Somsen < Honey Badger Diaries < Andreas Antonopoulos < Austin Bitcoin Developers < Stanford Blockchain < Coordination of Decentralized Finance < Lightning Conference < Cryptoeconomic Systems < Bitcoinops < Baltic Honeybadger < Scaling Bitcoin Conference < Bitcoin Edge Dev++ < Decentralized Financial Architecture Workshop < Dallas Bitcoin Symposium < Breaking Bitcoin < Lets Talk Bitcoin Podcast < What Bitcoin Did Podcast < Magicalcryptoconference < Noded Podcast < Boltathon < Grincon < Verifiable Delay Functions < Building On Bitcoin < Layer2 Summit < Satoshi Roundtable < Blockchain Protocol Analysis Security Eng < Developers-Miners Meeting < W3 Blockchain Workshop < Simons Institute < Bit Block Boom < Coindesk Consensus < Rebooting Web Of Trust < Texas Bitcoin Conference < AssumeUTXO update

AssumeUTXO update

Speakers: James O'Beirne

Date: April 27, 2023

Transcript By:

Tags: Bitcoin core, Assumeutxo

Category: Core dev tech

Goals

  • allow nodes to get a utxo set quickly (1h)
  • at the same time, no major security concessions

Approach

  • Provide serialized utxo snapshot
  • get headers chain first, load snapshot and deserialize, sync to tip from that
  • then start background verification with a 2nd snapshot
  • finally, compare hashes when background IBD hits snapshot base

Progress update

  • lots of refactoring has been done; ChainStateManager was introduced, globals removed, mempool / blockstorage refactored
  • init / shutdown logic changes have been merged
  • wallet changes done
  • p2p changes still under review (i.e. picking the chainstate to which to append new blocks )

Open issues

nFile order gets fragmented, potential problems with pruning and/or reindex -> Introduce blockfile nFile counter per chainstate types (simple change)

Pruning

  • currently, pruning target w/ trailing window
  • do the same, but with two tips - different possiblities to achieve this

Indexing

validationinterface signals are picked up by indices

  • could build out of order, but some indexes (coinstats) cant be build out of order

  • simple solution: just disable all indexes until sync completes

  • fancy solution: disable some indexers only

  • Introduce rpc to load chainstate

  • Put actual assumeutxo hashes into chainparams

  • In total, only ~1k loc left, although mostly in important places

Approach re-ack discussion

  • Do we really need background sync?
  • not doing the background sync is simpler, but changes security assumptions
  • Also, it would remove the necessity that every node must be able to sync the chain