As discussed on IRC. Intended to make using an external blockchain download solution just a bit easier.
Import $DataDir/bootstrap.dat automatically, if it exists. #1684
pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:bootstrap changing 1 files +14 −1-
jgarzik commented at 11:13 PM on August 17, 2012: contributor
-
BitcoinPullTester commented at 2:47 AM on August 18, 2012: none
Automatic sanity-testing: FAILED MERGE, see http://jenkins.bluematt.me/pull-tester/e1a36eefea413f83f91da3f4ffdbb0182f45587e for test log.
This pull does not merge cleanly onto current master
-
laanwj commented at 7:21 AM on August 18, 2012: member
Is this functionality currently safe enough to trigger automatically? What will happen in these cases:
Client stops before full import completes
User exits (after succesful import), then re-starts bitcoin
Also, we probably want some kind of progress widget, as the process can take a few hours.
-
luke-jr commented at 7:31 AM on August 18, 2012: member
Right now, Bitcoin-Qt is fully interactive during IBD...
-
laanwj commented at 7:35 AM on August 18, 2012: member
@luke-jr So to decode that, you mean run this importing in a thread (after the Init succeeds), pretend that the blocks come in from the network, and use the current progress mechanism? I suppose that could work, if you block the real network for the duration that the file is being read.
Also it doesn't address the above points. Does it somehow need to remember where it was with importing, between runs?
-
Diapolo commented at 9:07 AM on August 18, 2012: none
I recently added an info message when doing a -loadblock, so this needs a rebase + the shorter the message the better, because of the small splashscreen. @luke-jr When doing a -loadblock nothing is interactive, the client is just displaying the splashscreen and a message for ~1 hour or more.
-
laanwj commented at 2:38 PM on August 18, 2012: member
It should not be used for the specific -loadblocks, which is also a benchmark.
But for the automatic loadblocks for bootstrapping users (that jgarzik is proposing) it'd be fine. It's fine if it is a bit slower as long as the user gets feedback and doesn't have the idea that his client crashed at the splash screen.
-
Diapolo commented at 2:42 PM on August 18, 2012: none
So perhaps rebase and change the second InitMessage to
Auto-Importing blocks...? -
sipa commented at 8:49 PM on August 18, 2012: member
I'm planning on writing a "reindexer" that takes an existing blk*.dat file (in the normal location for those), and rebuilds/updates the index with the found blocks, and afterwards reorg to a new best chain if one is found there. That's maybe even preferable?
-
jgarzik commented at 8:56 PM on August 18, 2012: contributor
Yes, a reindexer would absolutely be preferred. Should be faster, with less disk traffic, and no files left over at the end.
-
mikehearn commented at 1:02 PM on August 19, 2012: contributor
A better way to reindex would be great, I already did some code for this (loading a blk?.dat files with a progress gui) in the leveldb branch but it's not very good because I wanted the change as small as possible.
-
gmaxwell commented at 1:21 PM on August 20, 2012: contributor
Am I misunderstanding this patch? It looks like it will reimport at every startup because it doesn't remove/move/flag the file when done. That seems pretty surprising.
-
laanwj commented at 2:05 PM on August 20, 2012: member
Yes, I thought so. That's why I asked what would happen in those cases.
-
jgarzik commented at 3:10 PM on September 4, 2012: contributor
Rebased, and corrected the FMB (frequently mentioned bug): it now renames bootstrap.dat, after import, to prevent re-import.
That should address all outstanding objections.
-
in src/init.cpp:None in 25b5d5da7d outdated
720 | @@ -721,7 +721,8 @@ bool AppInit2() 721 | 722 | if (mapArgs.count("-loadblock")) 723 | { 724 | - uiInterface.InitMessage(_("Importing blocks...")); 725 | + uiInterface.InitMessage(_("Importing blockchain data file. This operation may take several hours."));
Diapolo commented at 4:03 PM on September 4, 2012:Can you please remove that double-space, it really sucks on Transifex to have these, thanks :). Same for the second string below...
Edit: And as that message is quite large it will perhaps not even fit in our tiny splashscreen.
BitcoinPullTester commented at 2:26 PM on September 6, 2012: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/25b5d5da7daf046c974bb32785bb58f877d46795 for binaries and test log.
52c90a2b2bImport $DataDir/bootstrap.dat automatically, if it exists.
As discussed on IRC. Intended to make using an external blockchain download solution just a bit easier.
gavinandresen commented at 8:34 PM on September 25, 2012: contributorACK.
(and I think Diapolo's nit-picking is excessive)
Diapolo commented at 8:42 PM on September 25, 2012: none@gavinandresen I sometimes hate that character trait and so I'm fine with other devs ignoring some of the nit-picks if they feel bugged.
jgarzik referenced this in commit 1381ad2b21 on Sep 25, 2012jgarzik merged this on Sep 25, 2012jgarzik closed this on Sep 25, 2012jgarzik deleted the branch on Aug 24, 2014DrahtBot locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-20 00:16 UTC
More mirrored repositories can be found on mirror.b10c.me