-
Notifications
You must be signed in to change notification settings - Fork 204
Description
One way to speed up the initial sync for neutrino
is to actually package a set of headers (both regular and filter headers) along side the application that packages neutrino
. This would allow one to package a set of (possibly compressed) headers that will be written to disk on start up before we start to fetch headers from the network.
Steps To Completion
-
Modify the initial constructor to add a new set of functional options for side loaded headers.
-
On start up, before syncing, if this is IBD, we should read these headers and write them directly to disk. In the suggested model, we skip verification all together, as it's assumed that these headers are being fetched from a trusted source.
-
As a bonus, we can also compress the set of headers, and decompress them within
neutrino
. This may be useful for contexts such as mobile applications, where reducing the size of the apk is desirable. An example of a header specific compression scheme we may want to look at is: https://github.com/petertodd/rust-bitcoin-headers#how-it-works. There likely some additional optimizations on top of this that we can explore and later implement.