Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: burkett_38 on April 26, 2018, 11:55:59 PM



Title: Origins of IRC Bootstrapping
Post by: burkett_38 on April 26, 2018, 11:55:59 PM
I’m trying to understand the origin of bitcoin and where some of Satoshi’s ideas came from. I was curious if anyone knew of any earlier p2p software that used IRC to bootstrap? The earliest mention I could find of p2p bootstrapping using IRC was in a paper written in 2007 called “Decentralized Bootstrapping in Pervasive Applications.” [1] Has the idea been around longer than that, or is it more likely Satoshi got his ideas from these guys?
Someone had suggested to me that they believed bittorrent used that mechanism before, but i was unable to find any corroboration for that claim.

[1] M.Knoll, A.Wacker, G.Schiele, and T.Weis - "Decentralized Bootstrapping in Pervasive Applications" http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.869.9975&rep=rep1&type=pdf


Title: Re: Origins of IRC Bootstrapping
Post by: 2112 on April 27, 2018, 12:09:45 AM
The code was originally developed for command-and-control of botnets. I doubt you'll find any legitimate scientific publication as a source. You should better look through some underground hacker publications.

Alternatively, you may be able to find genuine information from the vendors of behavioral antivirus software or the network intrusion detection tools.

The code that was included in the Bitcoin client was such an exact functional copy of the botnet C&C code (e.g. identical obfuscation scheme for IPv4 addresses) that it used to trigger false positives in many of the above tools. You may want to search for those stories to narrow down which vendors to approach.


Title: Re: Origins of IRC Bootstrapping
Post by: burkett_38 on April 27, 2018, 12:26:32 AM
Bitcoin used Base58Check to encode the ip address and port[1]. The Base58 used by bitcoin was invented by Satoshi. Can you point to any specific code that used a similar IPv4 obfuscation scheme?

[1]https://github.com/trottier/original-bitcoin/blob/master/src/irc.cpp


Title: Re: Origins of IRC Bootstrapping
Post by: 2112 on April 27, 2018, 01:14:07 AM
Bitcoin used Base58Check to encode the ip address and port[1]. The Base58 used by bitcoin was invented by Satoshi. Can you point to any specific code that used a similar IPv4 obfuscation scheme?

[1]https://github.com/trottier/original-bitcoin/blob/master/src/irc.cpp
I don't have any reference beyond the personal recollection of:

(1) getting false positives from the Cisco NIDS option in the Cisco IOS 12.something
(2) second hand accounts of similar false positives from Sandvine Inc. large-scale network management tools

You will find that lots of the code in the Bitcoin client isn't completely new, but an existing code reformatted and re-factored to use Satoshi's peculiar C++ style and his collection of C preprocessor macros.

My best recollection of base58 (and other similar nearly-human-readable schemes) is from license strings for artistic 3D modeling software from Softimage or Wavefront. They were working on transmitting those license strings via fax machines and have them correctly entered on computers with artistically designed fonts with indistinguishable characters (O vs. 0, 1 vs. l, etc.).


Title: Re: Origins of IRC Bootstrapping
Post by: burkett_38 on April 27, 2018, 01:44:28 AM
It's interesting you say that. I've searched for origins of Satoshi's code many times in the past, thinking if I could just find that one time he reused an old piece of code, I could retrace some of his footsteps to better understand his thought process. I was never successful. Of course, it's entirely possible I was just looking in all the wrong places.


Title: Re: Origins of IRC Bootstrapping
Post by: 2112 on April 27, 2018, 02:16:27 AM
It's interesting you say that. I've searched for origins of Satoshi's code many times in the past, thinking if I could just find that one time he reused an old piece of code, I could retrace some of his footsteps to better understand his thought process. I was never successful. Of course, it's entirely possible I was just looking in all the wrong places.
If you searching just on the Internet then you are missing around 50 years of history of networking and software in general.

I'm not sure if it is practical for you, but a lot of information is available in printed magazines, but not in their official "articles", but in the "classified ads" and other cheap less-than-full-page advertisements. Researching those would be extremely time consuming, even if you can find the library that has those magazines undamaged with all pages available.

One more avenue for search is to look at the nearby code, not just strictly IRC-related. There were multiple methods used to discover node's own external IPv4 address. Those also aren't all invented by Satoshi, but borrowed/copied from the pre-existing code. Those were the other things that tended to trigger false-positives.

Are you a CS history researcher associated with an accredited university? Because if you are really into history of CS I may be able to put you in touch with people who may be willing to donate their personal archives fairly soon. But you would really need to be able to read obsolete media like open-reel magnetic tapes or U-Matic and SVHS video cassettes with PAL/SECAM color.


Title: Re: Origins of IRC Bootstrapping
Post by: burkett_38 on April 27, 2018, 03:04:54 AM
If you searching just on the Internet then you are missing around 50 years of history of networking and software in general.

Unfortunately, the internet is the only resource I have readily accessible.

One more avenue for search is to look at the nearby code, not just strictly IRC-related. There were multiple methods used to discover node's own external IPv4 address. Those also aren't all invented by Satoshi, but borrowed/copied from the pre-existing code. Those were the other things that tended to trigger false-positives.

There are indeed several methods used to discover a node's external IPv4 address, but I expect any engineer who has used sockets before would be able to write them. I have found no reason to think they were copied from anywhere. It's odd that they would trigger false-positives. [https://github.com/trottier/original-bitcoin/blob/92ee8d9a994391d148733da77e2bbc2f4acc43cd/src/net.cpp]

Are you a CS history researcher associated with an accredited university? Because if you are really into history of CS I may be able to put you in touch with people who may be willing to donate their personal archives fairly soon. But you would really need to be able to read obsolete media like open-reel magnetic tapes or U-Matic and SVHS video cassettes with PAL/SECAM color.

Sadly, I am not. Just a curious software engineer.


Title: Re: Origins of IRC Bootstrapping
Post by: 2112 on April 27, 2018, 03:56:47 AM
There are indeed several methods used to discover a node's external IPv4 address, but I expect any engineer who has used sockets before would be able to write them. I have found no reason to think they were copied from anywhere. It's odd that they would trigger false-positives.
I don't find that odd. In my opinion false-positives are quite common and technically an expected trade-off.

While any one ordinary skilled practitioner can write the required working code, the choice (and order!) of the external sites that it tries to contact were very peculiar. IIRC the original engineer that helped Satoshi with that code was Hungarian. In turn that code they developed triggered IDS systems when run in Germany and France, but it would not trigger them when run in the USA or Canada. When AT&T changed their IDS vendor in North America then those false-positives started popping up on AT&T U-Verse, which was then a new residential offering.

The details above are all hearsay, personally I've only experienced that problems when using old version of Cisco IDS option for Cisco IOS version that was deprecated and no longer officially supported.

If you are limited to the Internet searches, then actually try some IRC channels, especially the ones that were frequented by genjix, phantomcircuit and Mircea Popescu. I don't think they read this site anymore, but there must be people here who regularly attended the dev meeting on the appropriate IRC channels.

Edit: One piece of warning: connecting to the IRC channels from the same IPv4/IPv6 addresses that participate in Bitcoin P2P network will most likely attract vicious vulnerability scans of your hardware. So use a VPN or other means of rapidly changing your network address in case you get noticed by those who will try to help you configure and secure your network.

Edit2: By a dint of accident I'm writing this on the same laptop I used when I originally joined this forum, with just few software updates installed since then. I started my Xchat IRC client to see if I still have the list of channels I used to read then. But the vulnerability scanners killed my IRC client in less than one minute. So please be careful.