From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 884595B1 for ; 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 ; Wed, 7 Nov 2018 13:20:14 +0000 (UTC) Received: by mail-lf1-f49.google.com with SMTP id q6-v6so11428883lfh.9 for ; 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: In-Reply-To: From: =?UTF-8?B?0JDRgNGC0ZHQvCDQm9C40YLQstC40L3QvtCy0LjRhw==?= Date: Wed, 7 Nov 2018 16:20:00 +0300 Message-ID: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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, : > > Date: Tue, 6 Nov 2018 23:21:11 +0200 > From: rze > 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. >