bitcoin-computer / monorepo

A Turing-complete smart contract system for Bitcoin and Litecoin
https://docs.bitcoincomputer.io/
29 stars 18 forks source link

Simplify sync process #209

Closed ltardivo closed 4 months ago

ltardivo commented 4 months ago

Until now, we had to parse the blockchain sequentially from the TBC activation block due to the dependency on update actions over the database. This PR refactors the synchronization process and modifies the DB to produce independence over row insertion in the Output table, providing the opportunity to synchronize the entire blockchain in parallel using all available cores, and to handle block reorgs.

The key changes are:

ClemensLey commented 4 months ago

Great work