BuildCheckpoints downloads headers and writes out a subset of them to a file.
These are generated using the BuildCheckpoints tool that can be found in the tools module of the bitcoinj source code. To solve this problem, we have checkpoint files.
#Ethereum wallet sync slow download#
We can see through simple multiplication that headers alone takes around 4 megabytes of data for every year the system exists, so as of July 2013 a new user must still download and process over 16 megabytes of data to get started. A header is just 80 bytes, but there is one for every 10 minutes the system has been in operation. CheckpointingĪlthough fast catchup and Bloom filtering (see below) mean you can sync with the chain just by downloading headers and some transactions+Merkle branches, sometimes this is still too damn slow. The time is simply set to the min of the earliest key creation time of all wallets, obtained by calling Wallet.getEarliestKe圜reationTime(). The fast catchup time can be set explicitly using tFastCatchupTime, although it will be recalculated for you any time you add a wallet or add keys to a wallet. If you’re implementing a wallet app, this is a very useful optimization that will be taken advantage of automatically. Block contents before the fast catchup time don’t have to be downloaded, only the headers, so it’s much faster to bootstrap the system in this way. If the wallet knows the creation times of all its keys, when you add it to a PeerGroup the fast catchup time will be set for you. Keys can have an associated creation time. It is for informational purposes only: all these optimisations are on by default and require no work from the developer.
This article details various performance techniques implemented by bitcoinj that speed things up. The wallet can work together with other classes in the library to implement various optimisations. For instance any end user facing wallet app falls into this category - for performance reasons you don’t want to handle the entire block chain. Often you don’t really want all the data, just a subset of it. Information on block chain sync optimisationsīitcoin is a system that throws around large quantities of data.