summaryrefslogtreecommitdiff
path: root/23/86f16d9d97e291c26e34d1acae134a6f032218
blob: 2649276af4e77a83d0f049347c6a740163e1dce1 (plain)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Return-Path: <theartlav@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 884595B1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed,  7 Nov 2018 13:20:15 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com
	[209.85.167.49])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4525C76F
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed,  7 Nov 2018 13:20:14 +0000 (UTC)
Received: by mail-lf1-f49.google.com with SMTP id q6-v6so11428883lfh.9
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 07 Nov 2018 05:20:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:references:in-reply-to:from:date:message-id:subject:to
	:content-transfer-encoding;
	bh=y0kCASAmMSR/o+5iEvHc8leSE294AKwEEqcVDuHCWt8=;
	b=EZis7vXPJ38l1NsaB4FISVbGsoSNepkM+nKmuLterVpPAjUMlFUpzotZyqCCoA9ZYL
	2lGAtxOzwtEyqSjPVqfI4YzIXF6q72HHzQt4TQa9IOAoKe5lrZsAXh+M/iVSloPqbdvE
	gsx2uSri21+vVsIUrWLmLUE8xUYL3RD9TZvB0MprxfdclShc4lmYtaVuz1U7i48Axhpy
	vNCOaELqWLd9q0YAPxFyRoQGsCGEMVvIcfMUbb0QyFwRNANdZI4lTE3YTZYoB2Fot2Yz
	1yUg7TYRYYnBjc+NehnwloX0lOyyiT/CKB824HK9QSqFgWKrEmuuiI34OZ/fNSVzRo/J
	o2tQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:references:in-reply-to:from:date
	:message-id:subject:to:content-transfer-encoding;
	bh=y0kCASAmMSR/o+5iEvHc8leSE294AKwEEqcVDuHCWt8=;
	b=agG8Ilek3XPxvH+hch6M0K/M9VkDppOMLO6LdIHgN7kuOoiaY3Sux31h53ziA+kLMe
	KitwmshtSANSAnBAy3MCHj4xH+7mxd3kKdweC53PlumkzMeuJ6pNIJvTUahyNhuujN7h
	yfhDUoAyR98JNWiMXwLRlf8PEW0RSJaVDmRwGW1KygtzgFEh5KR61iczXVTLXw8ieuRX
	Tl8uiZcLKq6pU/6sjvLiyJ3rkdBthnMoXTNHnO0u0MQttjPYN0G+Uxo3PV7qp1b5JXLE
	Z2q5zFP1G97X3vMtiakbgWURYZlDKfPDkZT5iwEhs6QiF9QXr5ldl8hjvw8mGNVBuHU0
	7AdA==
X-Gm-Message-State: AGRZ1gIAIgs30H40PTe/LGxKILNw+SBu21lRe+WN8ewxDPt0pcoTh0y5
	tMWQOMN28uuotQS5GO3aJV1him0z0vPn+3+6++CG4ZKY
X-Google-Smtp-Source: AJdET5cQvVFbgwh/8mMveabXyPv6OQwQoFNiBlkEN3svReTn2liuKBclgIlDZx2jKOGkwkLOasXf9t811J3Q/zCDKYE=
X-Received: by 2002:a19:c4cc:: with SMTP id u195mr93559lff.141.1541596812181; 
	Wed, 07 Nov 2018 05:20:12 -0800 (PST)
MIME-Version: 1.0
References: <mailman.37.1541592011.22359.bitcoin-dev@lists.linuxfoundation.org>
In-Reply-To: <mailman.37.1541592011.22359.bitcoin-dev@lists.linuxfoundation.org>
From: =?UTF-8?B?0JDRgNGC0ZHQvCDQm9C40YLQstC40L3QvtCy0LjRhw==?=
	<theartlav@gmail.com>
Date: Wed, 7 Nov 2018 16:20:00 +0300
Message-ID: <CAJRVQkCn6Kd90q9BBkZuB2cUOUA0JuBmXcaj06RkrnnG3CVEVA@mail.gmail.com>
To: bitcoin-dev@lists.linuxfoundation.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, FROM_EXCESS_BASE64,
	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
X-Mailman-Approved-At: Wed, 07 Nov 2018 15:35:21 +0000
Subject: Re: [bitcoin-dev] Considering starting a toy full-node
 implementation. Any advice?
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: Wed, 07 Nov 2018 13:20:15 -0000

Hi there.

Been there, done that.

-Don't try to set big goals at once.
Start small and aim for small steps, i.e. by connecting to nodes, then
getting some data from them, then downloading blocks, then parsing
blocks, then building an UTXO set, etc.
My first long term goal was to simply compute the balance of an address.

-Expect to work with huge and varied sets of data.
You'll have to build and use tens of Gb of indexes, for example.
Early transactions also have all sorts of non-standard scripts, and
testnet have all sorts of weird non-standard scripts, so plan
accordingly.

-Don't write off making a wallet or mining.
The latter is easy to do on CPU on testnet and learning to make valid
blocks helps a lot in understanding how things work.
A wallet, on the other hand, gives you good understanding of keys and
transactions, especially if you want to try doing all the EC math
yourself.
I also wrote things to be generic between several forks and chains,
like Litecoin, Doge, Zcash and a bunch of now-dead alts - there is so
little difference between many of them that all it takes is a
parameter or two. Helps with perspective.
Naturally, stay away from mainnets and real money if you do your own
wallet and crypto.

-Don't get too excited when you'd see exploitable signatures.
All of them were plundered years ago, and by now no one makes mistakes
like that.
Also, there are plenty of bots which are constantly scanning the chain
for weak keys and signatures, any new ones will be gone in a few
seconds.

-Expect cthulhus. There used to be plenty of artwork and puzzles in
the early blockchain.
Here is a short write up with a few of the things i found: https www
dot ribbonfarm dot
com/2017/07/20/the-ominouslier-roar-of-the-bitcoin-wave/


For references, good ones i found and used were:
https bitcoin dot org/en/developer-reference
https en dot bitcoin dot it/wiki/Protocol_documentation
Also, BIPs contain a lot of specific details: https github dot com/bitcoin/=
bips
That should get you started, and by the time you get into the devilish
details you'll have to look at the code for reference.

No idea about 3), haven't looked at it.

Good luck and have fun.
-Artem

=D1=81=D1=80, 7 =D0=BD=D0=BE=D1=8F=D0=B1. 2018 =D0=B3. =D0=B2 15:01, <bitco=
in-dev-request@lists.linuxfoundation.org>:
>
> Date: Tue, 6 Nov 2018 23:21:11 +0200
> From: rze <rzeqeu@gmail.com>
> To: bitcoin-dev@lists.linuxfoundation.org
> Subject: [bitcoin-dev] Considering starting a toy full-node implementatio=
n. Any advice?
>
> Hello,
>
> I'm considering to start developing a toy full validating node implementa=
tion (no wallet, no mining) for educational purposes.
>
> Some questions:
>
> 1) which resource do you suggest for as a reference for the protocol?
> 2) which part do you suggest to start with?
> 3) I was thinking to use btcd as a reference since I'm not familiar with =
C++ (bitcoind)
> 4) are there any other general advice or tips for such endeavours?
>
> Thanks in advance.
>