iguana is bitcoin core, client, RPC server and more.
Can we extract the blockchain sync optimized code easily? -> unfortunately easily is not a word I would use to describe it. possible, certainly and most interactions internally are via queues, so with a bit of work it can be interfaced to.
The difficulty is that I had performance as only goal....
So we end up with direct dependencies internally without regard to code purity and separation into formal layers in some cases.
With iguana you can do syncs at the bundle level, where each bundle is 2000 blocks worth of data, just half the size and already fully indexed and ready to be added to parallel searches. So it is kind of like 2GB blocks, and I am working on using the main bittorrent network to sync them, so I dont see any quadratic misbehavior at all.
It should stream in at whatever bandwidth you have and since the hard work of creating all the data is already done, it wont need a lot of CPU time. Once I get the lossless codec functionality debugged, it would allow full reconstruction of any tx directly, so all nodes can validate everything locally. After the validation all the sigs can be truncated away as there is no point to keep around the 15GB of data.
For the current blocks, these types of advantages wont exist, but there are alternate methods
Can we extract the blockchain sync optimized code easily? -> unfortunately easily is not a word I would use to describe it. possible, certainly and most interactions internally are via queues, so with a bit of work it can be interfaced to.
The difficulty is that I had performance as only goal....
So we end up with direct dependencies internally without regard to code purity and separation into formal layers in some cases.
With iguana you can do syncs at the bundle level, where each bundle is 2000 blocks worth of data, just half the size and already fully indexed and ready to be added to parallel searches. So it is kind of like 2GB blocks, and I am working on using the main bittorrent network to sync them, so I dont see any quadratic misbehavior at all.
It should stream in at whatever bandwidth you have and since the hard work of creating all the data is already done, it wont need a lot of CPU time. Once I get the lossless codec functionality debugged, it would allow full reconstruction of any tx directly, so all nodes can validate everything locally. After the validation all the sigs can be truncated away as there is no point to keep around the 15GB of data.
For the current blocks, these types of advantages wont exist, but there are alternate methods