Bitcoin Forum
December 02, 2016, 06:23:12 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Merkle root, hashing and other stuff - need little help.  (Read 3747 times)
kstepyra
Jr. Member
*
Offline Offline

Activity: 52


View Profile
May 23, 2011, 05:51:34 PM
 #1

Hi,

I am making an presentation about BTC's, and i am stuck in hashing blocks.
As far as i know - blocks contain informations about transactions, prev. hash, actual hash and merkle root of transactions(and other stuff which can be checked in blockexplorer ie.).
Problem is in - how and WHEN is the merkle root computed, and how is new hash computed?

I mean - it's like this? :

hash of block n+1 = hash(hash of block[n] + merkle root of transactions from current block(transaction[0] + transaction[1] +...+ transaction[n]) + nonce)

?
When any transaction appears in the network - what happens? It automatically change merkle root that is put into hashing algorithm to find number under desired target?
Or how does it go?

and how is transaction validation working? for example i've got 50 coins from block 10000 and now it's block 130000 and i want to spend it for something.
program check for all blocks between 10k and 130k that i actually own that money? and how he does that? step by step will be nice

Thanks for any advice:)

Jakub
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480702992
Hero Member
*
Offline Offline

Posts: 1480702992

View Profile Personal Message (Offline)

Ignore
1480702992
Reply with quote  #2

1480702992
Report to moderator
1480702992
Hero Member
*
Offline Offline

Posts: 1480702992

View Profile Personal Message (Offline)

Ignore
1480702992
Reply with quote  #2

1480702992
Report to moderator
1480702992
Hero Member
*
Offline Offline

Posts: 1480702992

View Profile Personal Message (Offline)

Ignore
1480702992
Reply with quote  #2

1480702992
Report to moderator
theymos
Administrator
Legendary
*
Offline Offline

Activity: 2492


View Profile
May 24, 2011, 01:07:05 AM
 #2

Read more wiki.

How the Merkle root is calculated:
https://en.bitcoin.it/wiki/Dump_format#CBlock

When it's calculated:
https://en.bitcoin.it/wiki/Block_hashing_algorithm

Transaction verification:
https://en.bitcoin.it/wiki/Transactions

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
kstepyra
Jr. Member
*
Offline Offline

Activity: 52


View Profile
May 24, 2011, 07:59:52 PM
 #3

Awesome response, thanks a lot Smiley hope this project stays a lot of time.
ElectricMucus
Legendary
*
Offline Offline

Activity: 1540


Drama Junkie


View Profile
August 19, 2011, 11:04:53 PM
 #4

I'm sorry to bump this but the documentation on the wiki is vague at best. Is there a more throw thing somewhere or do I have to read the code to understand how the format works?

thanks!

First they ignore you, then they laugh at you, then they keep laughing, then they start choking on their laughter, and then they go and catch their breath. Then they start laughing even more.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!