LearnBitcoin

Bitcoin Dev Archive 2016

Libconsensus completion plan document (with pictures)

1 message, 10 Oct 2016. Started by Jorge Timón.

Jorge Timón

Permalink Original thread on gnusha.org

Jorge Timón permalink original

Hello, since trying to encapsulate consensus code without exposing anything else (see my post from january https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-January/012235.html ) wasn't succesful in getting review, I decided to turn "phase 2" into "expose verifyHeader" again. I was previously starting the document with pictures but since things we're changing and the pictures were already deprecated, I decided to wait after segwit was merged and include those changes in the pictures too. This time I created a repository so that people can look at it, even if it's less advanced than previous versions have been:

https://github.com/jtimon/consensus-doc

Here's a branch with the resulting images, latex file and pdf:

https://github.com/jtimon/consensus-doc/tree/generated

And here's the pdf:

https://github.com/jtimon/consensus-doc/blob/generated/libconsensus.pdf

Any questions or comments are welcomed. If some of the images are wanted for some other more general documentation or you want me to create a specific diagram to document Bitcoin Core I'm happy to do so as well.

Note that some phases can be done in different order or in parallel (ie phase 3 and phase 4 could happen before phase 2, although I strongly doubt it because phase 2 is the simplest to review and I've been harassing different people to do it for a while with little success [thanks to those who reviewed it and gave feedback] ).

An implementation of phase 2 (expose verifyHeader()) can be seen in https://github.com/bitcoin/bitcoin/pull/8493