Checking the Merkle Root for Block #100000 The below text is copied from the Bitcoin Developer Reference at bitcoin.org:


  If a block has three or more transactions, intermediate merkle tree rows are formed. The TXIDs are placed in order and paired, starting
  with the coinbase transaction’s TXID. Each pair is concatenated
  together as 64 raw bytes and SHA256(SHA256()) hashed to form a second
  row of hashes. If there are an odd (non-even) number of TXIDs, the
  last TXID is concatenated with a copy of itself and hashed. If there
  are more than two hashes in the second row, the process is repeated to
  create a third row (and, if necessary, repeated further to create
  additional rows). Once a row is obtained with only two hashes, those
  hashes are concatenated and hashed to produce the merkle root.


I'm trying to use this logic to recreate the merkle root for block #100000.  There are 4 transactions in this block.  I start by copying the transaction hash for the coinbase transaction and the one following back-to-back into a Sha256 calculator to get the hash.  Then I hash that hash one more time: Sha256(sha256()).  I repeat that procedure one more time with the second two transactions in the block.  Finally, I repeat the procedure again using the resulting hashes to obtain the Merkle Root.  Unfortunately, this doesn't tie to the Merkle Root shown in the block header at blockchain.info.  

Can someone explain where I went wrong?

Thanks.
You have to byte-swap the transaction ID's before hashing them, hash each child node, and byte-swap the final hashed hex value.

Transaction 1 (Coibase Transaction)
8c14f0db3df150123e6f3dbbf30f8b955a8249b62ac1d1ff16284aefa3d06d87

To Byteswap it you can use:

a = "8c14f0db3df150123e6f3dbbf30f8b955a8249b62ac1d1ff16284aefa3d06d87"
"".join(reversed([a[i:i+2] for i in range(0, len(a), 2)])) @Greg Hewgill

Byteswapped = 876dd0a3ef4a2816ffd1c12ab649825a958b0ff3bb3d6f3e1250f13ddbf0148c

Transaction 2
fff2525b8931402dd09222c50775608f75787bd2b87e56995a7bdd30f79702c4 
Byteswapped = c40297f730dd7b5a99567eb8d27b78758f607507c52292d02d4031895b52f2ff

You want to concatenate the byte-swapped transaction values of 1 and 2. Transaction 1 goes first.

876dd0a3ef4a2816ffd1c12ab649825a958b0ff3bb3d6f3e1250f13ddbf0148cc40297f730dd7b5a99567eb8d27b78758f607507c52292d02d4031895b52f2ff

To hash this hex string you can use the following code running Python in your command terminal:


  
    
      import hashlib
      
      transaction12_hex = "876dd0a3ef4a2816ffd1c12ab649825a958b0ff3bb3d6f3e1250f13ddbf0148cc40297f730dd7b5a99567eb8d27b78758f607507c52292d02d4031895b52f2ff"
      
      transaction12_bin = transaction12_hex.decode('hex')
      
      hash = hashlib.sha256(hashlib.sha256(transaction12_bin).digest()).digest()
      
      hash.encode('hex_codec')
      
      15b88c5107195bf09eb9da89b83d95b3d070079a3c5c5d3d17d0dcd873fbdacc
    
  


Transaction 3
6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4
Byteswapped = c46e239ab7d28e2c019b6d66ad8fae98a56ef1f21aeecb94d1b1718186f05963

Transaction 4
e9a66845e05d5abc0ad04ec80f774a7e585c6e8db975962d069a522137b80c1d
Byteswapped = 1d0cb83721529a062d9675b98d6e5c587e4a770fc84ed00abc5a5de04568a6e9

If you do the same thing for transaction 3 and 4 the final hash is: 49aef42d78e3e9999c9e6ec9e1dddd6cb880bf3b076a03be1318ca789089308e

Our last step is to combine the final hashed value of 1 &amp; 2 and 3 &amp; 4 and double hash it and byte-swap it.

Our answer is f3e94742aca4b5ef85488dc37c06c3282295ffec960994b2c0d5ac2a25a95766 the Merkle Root.