Bitcoin Forum
April 26, 2024, 04:38:03 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: The Merkle and the Nonce  (Read 179 times)
Jet Cash (OP)
Legendary
*
Offline Offline

Activity: 2702
Merit: 2449


https://JetCash.com


View Profile WWW
July 02, 2018, 08:20:03 AM
Merited by NadiaHel (1)
 #1

It sounds like the title of a film about the EU dark angel and a sex offender (British prison slang for nonce ), but these are specific terms used in the construction of the blockchain. I'll award merits to posters providing a simple description of either or both words.

Describe a Merkle tree or Merkle root, or the Nonce in a Bitcoin blockchain

As always, no plagiarism or cut and paste answers. Also you are free to correct any posted misconceptions.

Offgrid campers allow you to enjoy life and preserve your health and wealth.
Save old Cars - my project to save old cars from scrapage schemes, and to reduce the sale of new cars.
My new Bitcoin transfer address is - bc1q9gtz8e40en6glgxwk4eujuau2fk5wxrprs6fys
1714149483
Hero Member
*
Offline Offline

Posts: 1714149483

View Profile Personal Message (Offline)

Ignore
1714149483
Reply with quote  #2

1714149483
Report to moderator
1714149483
Hero Member
*
Offline Offline

Posts: 1714149483

View Profile Personal Message (Offline)

Ignore
1714149483
Reply with quote  #2

1714149483
Report to moderator
"I'm sure that in 20 years there will either be very large transaction volume or no volume." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714149483
Hero Member
*
Offline Offline

Posts: 1714149483

View Profile Personal Message (Offline)

Ignore
1714149483
Reply with quote  #2

1714149483
Report to moderator
1714149483
Hero Member
*
Offline Offline

Posts: 1714149483

View Profile Personal Message (Offline)

Ignore
1714149483
Reply with quote  #2

1714149483
Report to moderator
RAMSHIVDEEPAK
Member
**
Offline Offline

Activity: 224
Merit: 18


View Profile
July 02, 2018, 09:37:39 AM
Last edit: July 02, 2018, 02:26:25 PM by RAMSHIVDEEPAK
 #2

    It sounds like the title of a film about the EU dark angel and a sex offender (British prison slang for nonce ), but these are specific terms used in the construction of the blockchain. I'll award merits to posters providing a simple description of either or both words.

    Describe a Merkle tree or Merkle root, or the Nonce in a Bitcoin blockchain

    As always, no plagiarism or cut and paste answers. Also you are free to correct any posted misconceptions.

    first we have to know about the HASH FUNCTION- ON WAY FUNCTION THAT TAKES THE INPUT AND GENERATE FIX LENGTH UNIQUE OUTPUT

    pairing hash transaction output using the HASH function  and  pair the output again using the hash function and continue this process till you get one unique out put,that out put is merkle root and whole procees is called merkle tree.

    t1   HASH --- H1
                                         HASH    ---  A
    t2   HASH --- H2                                                HASH  ---- m
                                         HASH    ---  B                                      HASH  --- K
    t3    HASH --- H2                                               HASH   --- n                       HASH ---- F
                                         HASH    ---  C                                      HASH  ---L              HASH -----I (merkle ROOT)                    
    t4    HASH --- H2                                               HASH   --- o                        HASH ----G
                                         HASH    ---  D                                     HASH  ---M
    t5    HASH --- H2                                                HASH   --- p
                                        HASH    ---  E
    t6    HASH --- H2  

    {WHOLE SYSTEM -merkle tree}
    sunriseme
    Newbie
    *
    Offline Offline

    Activity: 29
    Merit: 4


    View Profile
    July 02, 2018, 10:52:33 AM
    Merited by Jet Cash (1)
     #3

    My understanding is that nonce was added to the scrypt as the unique number that miners are trying to reach while solving the blocks.
    The block height has details about next wanted hash, time, block version, hash of the merckle root, timestamp and the nonce.
    Going through solutions until the right nonce is found is known as 'proof of work'.
    The reward for guessing the nonce is adding new block to the chain.
    I read that the extra-nonce field was introduced as a safety (maybe) and to keep up with the increased difficulty.
    nngella
    Member
    **
    Offline Offline

    Activity: 308
    Merit: 42


    View Profile
    July 02, 2018, 11:20:18 AM
    Last edit: July 02, 2018, 11:29:20 PM by nngella
     #4

    Before answering the question, I think it is necessary to explain first how the blockchain technology works.

    Blockchain is just like a database shared throughout the network of users and these users regularly make changes/update the network and continually being reconciled between the users.

    The best analogy that I read is a google spreadsheet available to everyone.  As one user make a change, everyone will see that change and everyone's copy will be updated(everyone has his own copy which makes it decentralized).

    What is a Merkle Tree?

    Going with the document analogy of bitcoin.  Let us say that there are 4 users who make changes to the document (blockchain) and they are W, X, Y, and Z.

    Blockchain will consolidate the changes in the manner just like below:

    Level 3                                        Change WXYZ
    Level 2          Change WX ---------------------------------Change YZ
    Level 1  Change X ----- Change W                   Change Z ----- Change Y

    Level 1 - Users W, X, Y, and Z make changes to the document
    Level 2 - blockchain consolidated the changes pairing change X and change W making an updated document with change WX.  Another pair with change Z and change Y made another updated document having a change YZ.
    Level 3 - the 2 documents (1 - change WX and 1- change ZY) are reconciled to make a single updated document having change WXYZ.  Change WXYZ contains all the changes made by the 4 users.

    The diagram above looks like a triangle or a tree hence it is called Merkle Tree.  The final document (change WXYZ) is called Merkle Root.

    vphasitha01
    Full Member
    ***
    Offline Offline

    Activity: 196
    Merit: 172


    View Profile
    July 02, 2018, 04:11:22 PM
    Merited by NadiaHel (1)
     #5

    Before I explaining the "Merkle tree" or Merkle root" it is better to explaining what is "hash".Every block in a block chain has a hash. It's like a finger print. It identify the block and all it's content and it's always unique just as like fingerprint. Once a block is created it's hash is calculated. Changing something(data) inside the block will cause hash to change, in other other words we can say hashes are very useful when you want to detect changes in the block

    So let's now move to the "Merkle tree" and Merkle root". Say we have 1600 transactions in a block( normally we can get avarage[1] as around 1600 transaction per block, however it's depend on the size of the transactions). First we put each transaction through a hash function[2] to get a transaction hash or transaction ID which is used itself to identify a transaction.

    Then we put them all into pairs and perform a hash of that pair of hashes. We do put up them again and hash them again and keep doing this until all of the transactions in a block meets at a single hash. This single hash called as " Merkle root" and the cascade network called as " Markle tree".

    That produced Markle root put in to a block header which is the part of a Bitcoin block that gets hash in process of mining. Having a Markle root in the block header, basically makes transactions temper proof. If you want to change value of it that would be reflected in the hash of that transaction or transaction ID. That change would cascade up the Markle tree to the Markle root, ultimately changing the value of Markle root. In thus in validating the block, everybody would be able to see that your transaction is not valid. It's not in a valid block since you're tempered with some how.

    So if you're want to verify a perticular transaction, you only need to look at the branches that the transaction on the Markle tree. You don't need to look at the entire Markle tree just only the branches.

    I think I have explained what i understood about "Markle tree" and "Markle root".



    [1]-Link>>>https://www.blockchain.com/charts/n-transactions-per-block
    [2]-Link>>>https://en.m.wikipedia.org/wiki/Cryptographic_hash_function
    Pages: [1]
      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!