5

I know someone who is having some trouble with an IBM 390x CPU (which is big endian), and an altcoin. They are able to compile, but unable to start syncing as they get this error when the daemon tries to verify the first block:

// Check proof of work matches claimed amount
if (UintToArith256(hash) > bnTarget)
    return error("CheckProofOfWork(): hash doesn't match nBits");  

I believe Bitcoin has supported big endian CPUs since v0.11, so I am just curious if Monero does as well?

1 Answer 1

2

Yes, it should compile and sync.

Endianess is relevant is several parts of the Monero source code:

  • SHA256 (hash function)

  • Skein (also a hash function)

  • int-util.h (various small utily functions acting on integers)

  • LMDB (blockchain database)

The definition of BYTE_ORDER varies from one operating system to an other.
Some of these libraries (SHA512 and LMDB) are external and other files come from Cryptonote so they use various ways to determine the BYTE_ORDER.

In case of Big Endian, it may be needed to edit src/platform/msc/sys/param.h, external/db_drivers/liblmdb/mdb.c and/or external/unbound/compat/sha512.c if the symbol can't be determined otherwise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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