Skip to content

Compile in the LS 32bits as checkpoints - #1577

Closed
TheBlueMatt wants to merge 6 commits into
bitcoin:masterfrom
TheBlueMatt:checkpoints
Closed

TheBlueMatt wants to merge 6 commits into
bitcoin:masterfrom
TheBlueMatt:checkpoints

Conversation

@TheBlueMatt

Copy link
Copy Markdown
Contributor

Details:
Uses a src/checkpoint_def.cpp file to store a static array of checkpoints. That file is easily generate-able using -saveblockcheckpointfile and gitian builds require the file as an input.

@gavinandresen

Copy link
Copy Markdown
Contributor

checkpoints_def.cpp needs some newlines-- see http://stackoverflow.com/questions/10519738/source-line-length-limit

And would it be better to NOT check in the full checkpoints_def.cpp to git? gitian builders could generate it themselves or download a copy (using github 'download a file' feature maybe).

@TheBlueMatt

Copy link
Copy Markdown
Contributor Author

Oops, yea Ill add some \n, I had previously dropped them because of the increase in file size...

Gitian builders are required to have a checkpoints_def.cpp in their inputs, so they have to compile their own in anyway. Its only checked into git so that people who git clone && cd src && make can continue to do that. (and one can't simply build with an empty one as they will end up rejecting the 2 BIP30-invalid blocks which are in the chain before BIP30 was enforced). But if people believe its better to force people building bitcoin to download the file, thats fair too.

Matt Corallo added 2 commits July 17, 2012 02:03
@TheBlueMatt

Copy link
Copy Markdown
Contributor Author

New version:
"\n"s in checkpoints_def.cpp
Default checkpoints_def.cpp is now empty with a #warning
BIP30 checkpoints are now in checkpoints.cpp using full hashes.

Comment thread src/checkpoints_def.cpp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a nice big comment at the top of this explaining why this do-nothing file exists? Something like:

/*
This is a placholder file that should be replaced by the output of bitcoind -saveblockcheckpointfileto
It will be filled iwth the least-significant 32 bits of block hashes in the best block chain. By checkpointing
the early, difficulty-1 blocks several potential denial-of-service attacks are prevented.
*/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Diapolo

Diapolo commented Jul 17, 2012

Copy link
Copy Markdown

So, when doing own builds on Windows I have to use -saveblockcheckpointfileto to generate a new checkpoints_def.cpp? If this is the case wouldn't it be nicer if I don't need to specify that filename and even as default src\ is used :)?

@TheBlueMatt

Copy link
Copy Markdown
Contributor Author

If you are running bitcoin-qt, the output would be src/checkpoints_def.cpp, or if you are running it on windows, it would be ../src/checkpoints_def.cpp, or if you are running bitcoin it would be checkpoints_def.cpp...I dont really feel like doing some #ifdefs there...

@gavinandresen

Copy link
Copy Markdown
Contributor

Not loving this:

If I get rid of the compile #warnings, then I get a dirty tree, and I know sooner or later I'll accidentally commit checkpoints_def.cpp.

It will be considered a dirty git tree during gitian building, yes? That will screw up the auto-version-determination code...

Also, with a generated checkpoints_def.cpp, I get a gazillion:
checkpoints_def.cpp:185334: warning: this decimal constant is unsigned only in ISO C90

I think adding the 4 checkpoints and doing BIP30-check-all-except-checkpointed-blocks is the right thing to do.

lateminer pushed a commit to lateminer/bitcoin that referenced this pull request May 6, 2020
c67fcec [Trivial] Hide CWallet::MultiSend() call in main (random-zebra)
f50918e [RPC] Disable/Hide multisend (random-zebra)
7ac2aee [GUI] Hide MultiSend in the options (random-zebra)

Pull request description:

  Multisend flow is clunky and sorely out of date / in need of a full overhaul and review.
  Let's disable it for now until such time that it can be either re-coded properly, or just dropped entirely.
  We can thus close the following issues for now: bitcoin#1560, bitcoin#1561, bitcoin#1563, bitcoin#1567 .

ACKs for top commit:
  Fuzzbawls:
    ACK c67fcec
  furszy:
    ACK c67fcec

Tree-SHA512: 2719c346c44fc3baaded05c3fe320e59c85e5549e96358873ffb1ce87cd2a89ffb471ac014b737975a3a6a31ced72c4639622b8c8527eabc36564492d367547e
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants