Pages:
Author

Topic: Bitcoin source from November 2008. (Read 15362 times)

newbie
Activity: 6
Merit: 14
March 10, 2024, 08:21:50 AM
#60
A write up and examination of this code can be found here https://stacker.news/items/458544/r/BITC0IN
full member
Activity: 140
Merit: 107
February 25, 2014, 04:04:31 PM
#59
you're right. I've spent a lot of time tracing the history and it is definitely very worth preserving.

I have renamed the repo to bitcoinArchive: https://github.com/benjyz/bitcoinArchive

I've added the 0.1 tar, which originally was from here: https://bitcointalksearch.org/topic/v01-68121

this is the md5sum of the directory, which contains the windows exe and dll:
dca1095f053a0c2dc90b19c92bd1ec00  bitcoin-0.1.0.tgz

I've also added some original posts from the mailing list. If anyone wants to add something...

see also:
http://p2pfoundation.ning.com/profile/SatoshiNakamoto

the bitcoin/github starts with 0.2.6

legendary
Activity: 1120
Merit: 1164
February 25, 2014, 02:20:18 PM
#58
yes. I restored the full version with header files in the bitcoin0.1 folder. it looks like a small auction system as Mike said above. it's only 260 lines.

https://github.com/benjyz/bitcoin0.1/blob/master/bitcoin0.1_version/market.cpp

so there are 3 versions in the repo (probably should be separate trees):

* the root folder only contains the main files for study purposes
* the nov08 version
* the full 0.1 version with headers and unused parts like the market.cpp

Awesome thanks!

Where exactly did you get this code from? Might be good to add some notes about the source of it in the README. If you have, say, zip files good to put them in the repo for archival purposes. (this is important history after all)
hero member
Activity: 714
Merit: 500
Martijn Meijering
February 25, 2014, 01:52:38 PM
#57
It would be fun to see what would be needed to get the oldest version to compile and run. You could fill in the blanks with stuff from later versions and then remove what isn't needed to make it work.
full member
Activity: 140
Merit: 107
February 25, 2014, 12:44:24 PM
#56
yes. I restored the full version with header files in the bitcoin0.1 folder. it looks like a small auction system as Mike said above. it's only 260 lines.

https://github.com/benjyz/bitcoin0.1/blob/master/bitcoin0.1_version/market.cpp

so there are 3 versions in the repo (probably should be separate trees):

* the root folder only contains the main files for study purposes
* the nov08 version
* the full 0.1 version with headers and unused parts like the market.cpp
legendary
Activity: 1120
Merit: 1164
February 25, 2014, 12:24:09 PM
#55
I've got the 0.1 version and the nov08 version on github. blogs are not a good CVS.

https://github.com/benjyz/bitcoin0.1/tree/master/nov08


the main files from the 0.1 source code in 7000 LOC.

    2660 ./main.cpp
    1127 ./script.cpp
    1020 ./net.cpp
    604 ./db.cpp
    554 ./sha.cpp
    373 ./util.cpp
    265 ./irc.cpp
    264 ./market.cpp
    6867 total


market.cpp? I don't see that in your repo - do you actually have a copy of it?
hero member
Activity: 802
Merit: 1003
GCVMMWH
February 25, 2014, 11:37:11 AM
#54
I've got the 0.1 version and the nov08 version on github. blogs are not a good CVS.

https://github.com/benjyz/bitcoin0.1/tree/master/nov08


the main files from the 0.1 source code in 7000 LOC.

    2660 ./main.cpp
    1127 ./script.cpp
    1020 ./net.cpp
    604 ./db.cpp
    554 ./sha.cpp
    373 ./util.cpp
    265 ./irc.cpp
    264 ./market.cpp
    6867 total


Cool, thanks for doing this. I still think it should also be added to the official repo, but whatever I suppose...  Roll Eyes
full member
Activity: 140
Merit: 107
February 21, 2014, 01:59:17 PM
#53
IRC is the easiest way to bootstrap messaging.

this is a nice overview over the nodes: http://getaddr.bitnodes.io/  if the information is correct there are 104729 nodes connected, from 183 countries.

see also torrent protocol bootstrap:

http://www.bittorrent.org/beps/bep_0005.html
legendary
Activity: 1974
Merit: 1077
Honey badger just does not care
legendary
Activity: 1512
Merit: 1036
legendary
Activity: 1974
Merit: 1077
Honey badger just does not care
February 21, 2014, 11:36:58 AM
#50
I've got the 0.1 version and the nov08 version on github. blogs are not a good CVS.

https://github.com/benjyz/bitcoin0.1/tree/master/nov08


the main files from the 0.1 source code in 7000 LOC.

    2660 ./main.cpp
    1127 ./script.cpp
    1020 ./net.cpp
    604 ./db.cpp
    554 ./sha.cpp
    373 ./util.cpp
    265 ./irc.cpp
    264 ./market.cpp
    6867 total

Original bitcoin software had IRC client included?
https://github.com/benjyz/bitcoin0.1/blob/master/irc.cpp

What was the idea behind this?
full member
Activity: 140
Merit: 107
February 21, 2014, 11:19:31 AM
#49
I've got the 0.1 version and the nov08 version on github. blogs are not a good CVS.

https://github.com/benjyz/bitcoin0.1/tree/master/nov08


the main files from the 0.1 source code in 7000 LOC.

    2660 ./main.cpp
    1127 ./script.cpp
    1020 ./net.cpp
    604 ./db.cpp
    554 ./sha.cpp
    373 ./util.cpp
    265 ./irc.cpp
    264 ./market.cpp
    6867 total
sr. member
Activity: 406
Merit: 251
http://altoidnerd.com
February 21, 2014, 02:29:54 AM
#48
I'll post these on my blog, for historical reasons.  Unless anyone has a problem with it.

I will link and source this discussion.

hero member
Activity: 802
Merit: 1003
GCVMMWH
February 03, 2014, 02:30:58 PM
#47
Very cool. Maybe this can be tagged and added as a "release" @ https://github.com/bitcoin/bitcoin for archival purposes?
legendary
Activity: 924
Merit: 1132
February 03, 2014, 01:08:12 PM
#46

This is because a script (in an orphaned block) may reveal information pertinent to the continuing blockchain.
What are you thinking of that a (spending) script could reveal? A hash preimage?

In principle, a script could reveal anything that was known to the spender prior to the transaction where the spend was made, or anything that could be derived from that knowledge and examination of the blockchain. A hash preimage, a key to decrypt some other binary blob, an arbitrary  secret encoded to be read by someone else's private key, a "go" signal for some irreversible real-world operation, etc.

It would suck to get a "go" signal from a script, go down to the bank, and prepare to do your part in an escrow agreement by cashing out a bunch of bonds early (at a loss) so you have cash, then come back home and discover that the "go" signal happened in an orphaned chain.  On the one hand, poor logistical planning to do your business that way.  On the other, there are sometimes reasons to do weird shit like that, and doing weird shit like that would inspire attacks designed to have exactly the false-signal effect described.

We think of scripts as returning a single bit.  Either the spend succeeds or not.  But remember the value that success or failure depends on is a binary blob the size of a key, and everybody checking the blockchain can read it.
hero member
Activity: 714
Merit: 500
Martijn Meijering
February 03, 2014, 08:30:32 AM
#45
It would be nice if scripts had access to just the information in the transaction itself and that does not need access to block height or any other data from the rest of the blockchain. Things like number and amounts of the inputs, output scripts etc.
hero member
Activity: 714
Merit: 500
Martijn Meijering
February 03, 2014, 08:28:04 AM
#44
I agree with your general point, but this jumped out:

This is because a script may reveal information pertinent to the continuing blockchain. If it does so in an orphaned block, then that information is revealed when it ought not have been.

What are you thinking of that a (spending) script could reveal? A hash preimage?
hero member
Activity: 714
Merit: 500
Martijn Meijering
February 03, 2014, 08:24:33 AM
#43
Wow this is messed up, the whole thing is unsigned integers; it's all addition.

Double entry accounting is all unsigned integers and addition too. :-)
full member
Activity: 196
Merit: 100
iseebitcoins.com
February 03, 2014, 06:52:21 AM
#42
Wow thank you for posting this was fun to read  Grin
legendary
Activity: 1120
Merit: 1164
February 03, 2014, 05:31:15 AM
#41
Yeah, I figured there are hairy problems about scripts depending on arbitrary other transactions.  Maybe Satoshi gave up on making script really work because he didn't know if he could do it right.  Best to get a solid foundation first.

Heck, having transactions depend on other transactions in a block is a potential scalability problem because it makes it non-trivial to process blocks and update the UTXO set in parallel, especially in a lossely coupled manner. (ie multiple co-operating nodes)
Pages:
Jump to: