Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: jonone100 on June 01, 2011, 12:49:15 PM



Title: Can you help me understand something about blocks & transactions?
Post by: jonone100 on June 01, 2011, 12:49:15 PM
Hello. First I got to congatulate everyone involved in the bitcoin project - you're an inspiration. I'm keen to write something for my blog that explains some of the technical aspects of bitcoin in a non-technical way, hopefully exploring the nature of money along the way. I've spent a while reading up and trying to understand things. The bit I seem to get stuck on time and time again is the relationship between transactions and blocks.

Any clarification you can give would be very much appreciated. Here's my problem:


I read in the wikipedia article that generating nodes have no obligation to include transactions when they create a block.

However in the bitcoin wiki/blocks section it says 'Bitcoin transactions are broadcast to the network by the sender, and all peers generating coins collect them and add them to the block they're working on'

I also read that the totality of transactions are hashed (with individual transactions NOT being hashed). (I assume this means ALL transaction since genesis, rather than in an individual block?).

So when you say nodes have no obligation to include transactions, does it mean that they can just use the last transaction hash and work from there?


Thanks
Jon


Title: Re: Can you help me understand something about blocks & transactions?
Post by: Meni Rosenfeld on June 01, 2011, 01:06:02 PM
I read in the wikipedia article that generating nodes have no obligation to include transactions when they create a block.
Correct.

However in the bitcoin wiki/blocks section it says 'Bitcoin transactions are broadcast to the network by the sender, and all peers generating coins collect them and add them to the block they're working on'
They can add them if they want to, and currently they generally do. But they don't have to.

I also read that the totality of transactions are hashed (with individual transactions NOT being hashed). (I assume this means ALL transaction since genesis, rather than in an individual block?).
Every transaction has a hash which identifies it. In addition, all the transactions in an individual block are structured as a Merkle tree, and its root hash is included in the block header as the "Merkle root".

So when you say nodes have no obligation to include transactions, does it mean that they can just use the last transaction hash and work from there?
They don't use any "last transaction hash". They just build a block where the only transaction is reward generation, with a Merkle root to match.

 here (http://blockexplorer.com/block/00000000000005a1ae3ea4e2d0630286b778f7e7324b46693159d8b1390171a0) is a recent example of a block where the only transaction is generation.


Title: Re: Can you help me understand something about blocks & transactions?
Post by: jonone100 on June 02, 2011, 10:25:30 AM
Thanks very much for the clarification. Most Helpful.