Are any hashes (Tx or block) actually stored in the blockchain?

2

1

...or is each client responsible for storing hashes for blocks and transactions in their own database? So when I send a transaction, I indicate the prev_out by its hash, and I just assume everyone on the network will know what that hash means, even though it's not specifically, literally IN the blockchain?

Is blockexplorer.com doing me a favor by listing the hash for this raw Tx? Or is that hash actually sent by the original transaction-sender? http://blockexplorer.com/rawtx/85dce726e04af12eaaa716d00c753e2b7d6eb83a04c2c20e1b71a63d9512f03a

pinhead

Posted 2013-12-04T18:59:02.633

Reputation: 2 356

Answers

3

No. Hashes are computed upon receipt of the Tx message, and stored in a database outside the blockchain by the client/node.

http://www.reddit.com/r/Bitcoin/comments/1sqa1q/techincal_do_transaction_messages_between_nodes/

pinhead

Posted 2013-12-04T18:59:02.633

Reputation: 2 356

-1

Yes.

If you're running an official bitcoin client, you more than likely have a copy of the entire blockchain downloaded to your computer.

The blockchain contains everything required to validate a transaction - no third party data sources are ever used by the core bitcoin network.

You can find the input transaction (included in block 205061) which your example (included in block 273061) references in the raw blockchain at http://blockexplorer.com/rawblock/000000000000026190ebd9560f94b8d0534c6cd6fd585bf6fdb54610e6b676c3 (Ctrl+F for 9332ffc1da5dfdaef8b82b10a49224ff4bef6468491622968c517deb9f96889c)

John

Posted 2013-12-04T18:59:02.633

Reputation: 549

Thanks for replying, but I was wondering if literally the actual 32 byte hash for each Tx is in the blockchain. I know the explorer sites can display the Tx with pretty-printed JSON and include the hash there, but in the technical pages of the Wiki, there is no actual place in the Tx message to store the hashpinhead 2013-12-04T20:07:39.810

You can use the Json-RPC call getrawtransaction [hash]. Wait for bitcoin to sync and then disconnect from the internet and try it. They're definitely in the block chain however some newer clients don't download the full chain by default.John 2013-12-04T20:36:55.750

So when I send a Tx message to my peers, part of the data I send is a hash of... The rest of the data I send?pinhead 2013-12-04T20:43:27.467

A transaction effectively contains all the input transaction hashes, all the outputs (addresses and amounts), a signature and a hash of the whole lot which becomes the transaction id.John 2013-12-04T20:45:47.327