1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
Return-Path: <jtimon@jtimon.cc>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id C6935305
for <bitcoin-dev@lists.linuxfoundation.org>;
Mon, 10 Oct 2016 14:58:06 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com
[209.85.213.54])
by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A179BA6
for <bitcoin-dev@lists.linuxfoundation.org>;
Mon, 10 Oct 2016 14:58:05 +0000 (UTC)
Received: by mail-vk0-f54.google.com with SMTP id b186so88340909vkb.1
for <bitcoin-dev@lists.linuxfoundation.org>;
Mon, 10 Oct 2016 07:58:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=jtimon-cc.20150623.gappssmtp.com; s=20150623;
h=mime-version:from:date:message-id:subject:to;
bh=W3wLHNRAsK0nae/GOCmw6pBxNMah7UFnz9B/S3cDqWs=;
b=s5lKBnN+y/335PCHwy0ob/whMbUBsNJpWjBR+tweg9sXIOCEViUHiiRlcASYZti5Zq
EyeXbyhER0bVduidvyMQM9gsGD1vrvMjrV4+EOpngMr+5SwbbOr2zAU5mcSFdUgKtFtX
427VxG3X4v0zuqIZSggtVxijU9zV7YyZr7EiJRm0DBXVaOEfIIvkN+1Sigl6SDjfRN04
WL4gvPTBGMmBVYhz/bAYVXeSaWE1Mtcrq18EXojDOqwurDGaPM8M9VuS64ZOe/vEtPS+
4+9v7l6yDQlDrq6ZgIQP5UVJGopsGM3nvXWVNoBxeYUdsuAiw1ZSWBADDtWyCt1Qub1G
9g0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
bh=W3wLHNRAsK0nae/GOCmw6pBxNMah7UFnz9B/S3cDqWs=;
b=NbaueJ3MH7vCi4hStVlp43dTgJ39/zX11z9Pavb3X6MSljrLY4SNIRW2uTUryodMQd
XrQStm4faFHrPtDYe9BoqTWGaGlQU5k2tzEVDKfkozt/iwjnkxzzZlIWZZ7mHVLcbUcJ
Sle9a05+1lYn6OvyYA3+EQwRmveWIFAcQRRMIPIWh3SvVIk817v9y9Nu8AZwOivZ+Zxh
krovqN9TdvghLkB6lS16GrE7W27a6aEGEEfuYdVW52drRrkfyMuWfUZRgB5eB7rDBdbU
JRspkJbgqWVTPpyTuLnBBF8rrnmj4CBbNU5Am+RQan7+HZhEfbuvRpKCQHRAVzzI0U/k
LwXg==
X-Gm-Message-State: AA6/9Rla13CJmSpj1INneEbo143lgfV0M+ZG4U+FU7QySAwecfbzIZgzfBH6Soa31r4UGl+gkntlLDDAVc+0xQ==
X-Received: by 10.31.139.139 with SMTP id n133mr19614998vkd.100.1476111484692;
Mon, 10 Oct 2016 07:58:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.31.155.136 with HTTP; Mon, 10 Oct 2016 07:58:04 -0700 (PDT)
From: =?UTF-8?B?Sm9yZ2UgVGltw7Nu?= <jtimon@jtimon.cc>
Date: Mon, 10 Oct 2016 16:58:04 +0200
Message-ID: <CABm2gDpJ0o-Gea20q9TK7LAL2uogu7rvhTPEaq+FtUwj04OL0w@mail.gmail.com>
To: Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: text/plain; charset=UTF-8
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
smtp1.linux-foundation.org
Subject: [bitcoin-dev] Libconsensus completion plan document (with pictures)
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Oct 2016 14:58:06 -0000
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
|