Bitcoin Forum
March 29, 2024, 12:01:29 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: Bitcoin source from November 2008.  (Read 15130 times)
Peter Todd
Legendary
*
expert
Offline Offline

Activity: 1120
Merit: 1147


View Profile
February 03, 2014, 10: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)

"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711713689
Hero Member
*
Offline Offline

Posts: 1711713689

View Profile Personal Message (Offline)

Ignore
1711713689
Reply with quote  #2

1711713689
Report to moderator
zulu860
Full Member
***
Offline Offline

Activity: 196
Merit: 100

iseebitcoins.com


View Profile WWW
February 03, 2014, 11:52:21 AM
 #42

Wow thank you for posting this was fun to read  Grin

Bitcoins: 157TGFQRUWuBC5pREHcpkXfgCWGrQ9Zti6   iseebitcoins.com
Zimstake: EDEtRKNMUMZrsMCxTKvnz8U2Y84NPQDS2r
Cannabiscoin: CGj3H5AgJKTNeiPCsv2akbQiSSGUjcRjBE
mmeijeri
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500

Martijn Meijering


View Profile
February 03, 2014, 01:24:33 PM
 #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. :-)

ROI is not a verb, the term you're looking for is 'to break even'.
mmeijeri
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500

Martijn Meijering


View Profile
February 03, 2014, 01:28:04 PM
 #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?

ROI is not a verb, the term you're looking for is 'to break even'.
mmeijeri
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500

Martijn Meijering


View Profile
February 03, 2014, 01:30:32 PM
 #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.

ROI is not a verb, the term you're looking for is 'to break even'.
Cryddit (OP)
Legendary
*
Offline Offline

Activity: 924
Merit: 1122


View Profile
February 03, 2014, 06: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.
Joe_Bauers
Hero Member
*****
Offline Offline

Activity: 802
Merit: 1003


GCVMMWH


View Profile
February 03, 2014, 07:30:58 PM
Last edit: February 04, 2014, 12:54:41 AM by Joe_Bauers
 #47

Very cool. Maybe this can be tagged and added as a "release" @ https://github.com/bitcoin/bitcoin for archival purposes?
Altoidnerd
Sr. Member
****
Offline Offline

Activity: 406
Merit: 251


http://altoidnerd.com


View Profile WWW
February 21, 2014, 07: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.


Do you even mine?
http://altoidnerd.com 
12gKRdrz7yy7erg5apUvSRGemypTUvBRuJ
benjyz
Full Member
***
Offline Offline

Activity: 140
Merit: 102


View Profile
February 21, 2014, 04:19:31 PM
Merited by ABCbits (2)
 #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
itod
Legendary
*
Offline Offline

Activity: 1974
Merit: 1075


^ Will code for Bitcoins


View Profile
February 21, 2014, 04:36:58 PM
 #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?
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
February 21, 2014, 05:02:07 PM
 #51

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

What was the idea behind this?

https://en.bitcoin.it/wiki/Network#IRC
itod
Legendary
*
Offline Offline

Activity: 1974
Merit: 1075


^ Will code for Bitcoins


View Profile
February 21, 2014, 05:17:17 PM
 #52


Cool, thanks, didn't knew that.
benjyz
Full Member
***
Offline Offline

Activity: 140
Merit: 102


View Profile
February 21, 2014, 06: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
Joe_Bauers
Hero Member
*****
Offline Offline

Activity: 802
Merit: 1003


GCVMMWH


View Profile
February 25, 2014, 04:37:11 PM
 #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
Peter Todd
Legendary
*
expert
Offline Offline

Activity: 1120
Merit: 1147


View Profile
February 25, 2014, 05: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?

benjyz
Full Member
***
Offline Offline

Activity: 140
Merit: 102


View Profile
February 25, 2014, 05: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
mmeijeri
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500

Martijn Meijering


View Profile
February 25, 2014, 06: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.

ROI is not a verb, the term you're looking for is 'to break even'.
Peter Todd
Legendary
*
expert
Offline Offline

Activity: 1120
Merit: 1147


View Profile
February 25, 2014, 07: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)

benjyz
Full Member
***
Offline Offline

Activity: 140
Merit: 102


View Profile
February 25, 2014, 09: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://bitcointalk.org/index.php?topic=68121.0

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

BitcoinArbiter
Newbie
*
Offline Offline

Activity: 6
Merit: 12


View Profile
March 10, 2024, 01:21:50 PM
Merited by ABCbits (2)
 #60

A write up and examination of this code can be found here https://stacker.news/items/458544/r/BITC0IN
Pages: « 1 2 [3]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!