2

who can asnwer me this for litle qustion , i find this at code

// EXCEPTION FOR BLOCK 202612     
const std::string correct_blob_hash_202612 = "3a8a2b3a29b50fc86ff73dd087ea43c6f0d6b8f936c849194d5c84c737903966";     
const std::string existing_block_id_202612 = "bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698";`

how was it calculated ' if it's new chain , this option need ? or this option only for fix some bug before hardfork ? and not need if used 6 ver hard fork ?

i want udernstand what make this exception

0

1 Answer 1

2

There was a bug in the tree_hash function used to compute the transaction Merkle tree that caused the hash of block 202612 to be bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698 instead of the correct value 3a8a2b3a29b50fc86ff73dd087ea43c6f0d6b8f936c849194d5c84c737903966.

There is a comment in the file src/crypto/tree-hash.c about this:

// The blockchain block at height 202612 http://monerochain.info/block/bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698
// contained 514 transactions, that triggered bad calculation of variable "cnt" in the original version of this function
// as from CryptoNote code.
//
// This bug applies to all CN altcoins.
//
// Mathematical bug here was first published on 14:45:34 (GMT+2) 2014-09-04 by Rafal Freeman <rfree>
// https://github.com/rfree2monero/bitmonero/commit/b417abfb7a297d09f1bbb6de29030f8de9952ac8
// and soon also applied to CryptoNote (15:10 GMT+2), and BoolBerry used not fully correct work around:
// the work around of sizeof(size_t)*8 or <<3 as used before in 2 coins and in BBL later was blocking
// exploitation on normal platforms, how ever we strongly recommend the following fix because it removes
// mistake in mathematical formula.

As block 202612 has been accepted in the blockchain with the bad hash, this bad hash is now hard coded as the "official" one instead of the mathematically correct hash.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.