project-bitmark / bitmark

Bitmark Core
The Unlicense
47 stars 32 forks source link

Faster Initial Blockchain Download (IBD) #109

Open melvincarvalho opened 3 years ago

melvincarvalho commented 3 years ago

Also, I'm doing final testing on development v0.9.7.5, which implements the "headers first, blocks-in-parallel" initial blockchain download (IBD/HF-BIP) strategy which debuted in bitcoin v0.10 This enables faster initial blockchain download, because only the block headers are initially obtained from a single peer; once the entire chain of headers is obtained and verified as correct, then the actual block data for each block is filled in, from several peers in parallel, concurrently.

from @dbkeys in https://github.com/project-bitmark/bitmark/issues/103

Let's discuss this here. It seems it should be on hold until v.0.9.7.4 is working and the proposal is written up and reviewed, PRs associated with the issue, etc. Let's stop merging into master before review after v.0.9.7.4, please

dbkeys commented 3 years ago

Agreed. Master branch should have the latest, stable tagged release version at the tip, IMO When people clone a github repo, in general they expect master branch to compile to the latest stable release. Development should branch off the tagged tip of master commit and then upon reaching acceptance and stability, be merged back into master branch At the moment, tagged stable release is v.0.9.7.2; but that is deep in the commits of master now. This should be addressed: v0.9.7.4 is meant to be functionally the same as v0.9.7.2, but able to compile under the new TLS/SSL libraries current in Ubuntu 18, 20 and Debian 10.

dbkeys commented 3 years ago

Also, if/when development branches are merged back into master, they really ought to be deleted so as to not clutter up the repo.

melvincarvalho commented 3 years ago

Great, I'm currently testing 0.9.7.4 here: https://github.com/project-bitmark/bitmark/issues/107

dbkeys commented 3 years ago

For reference, if one wants to compile the exact code base that was used for the current stable release, v0.9.7.2 :

git checkout tags/v0.9.7.2

Git will give a message about being in a "detached HEAD state", which just means the working code is not the tip of the branch.

melvincarvalho commented 3 years ago

Discussed IBD with @dbkeys and it is an optimization that is imported from bitcoin. Something valuable in the long-term but not hugely mission critical for us right now as our blocks are not full

dbkeys commented 2 years ago

It's correct that bitmark's blocks arehave not been full. But the advantage of IBD is that new nodes set up faster, as they can have their initial blockchain download completed faster. With over a 1 million blocks now, bitmark's chain is long, but yes, much "thinner" than a coin with full blocks. So as agreed, IBD will develop in a parallel development branch, v0.9.7.5, and then released, (I would suggest) as v0.10.0 as upstream had IBD by v0.10