public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: "Артём Литвинович" <theartlav@gmail.com>
To: bitcoin-dev@lists.linuxfoundation.org
Subject: Re: [bitcoin-dev] Considering starting a toy full-node implementation. Any advice?
Date: Wed, 7 Nov 2018 16:20:00 +0300	[thread overview]
Message-ID: <CAJRVQkCn6Kd90q9BBkZuB2cUOUA0JuBmXcaj06RkrnnG3CVEVA@mail.gmail.com> (raw)
In-Reply-To: <mailman.37.1541592011.22359.bitcoin-dev@lists.linuxfoundation.org>

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

ср, 7 нояб. 2018 г. в 15:01, <bitcoin-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 implementation. Any advice?
>
> Hello,
>
> I'm considering to start developing a toy full validating node implementation (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.
>


       reply	other threads:[~2018-11-07 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.37.1541592011.22359.bitcoin-dev@lists.linuxfoundation.org>
2018-11-07 13:20 ` Артём Литвинович [this message]
2018-11-07 16:19   ` [bitcoin-dev] Considering starting a toy full-node implementation. Any advice? John C. Vernaleo
2018-11-06 21:21 rze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJRVQkCn6Kd90q9BBkZuB2cUOUA0JuBmXcaj06RkrnnG3CVEVA@mail.gmail.com \
    --to=theartlav@gmail.com \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox