MintcoinCommunity / Mintcoin-Desktop-Wallet

Wallet for MintCoin, a community proof-of-stake crypto-currency, running on Linux, Windows, or macOS
MIT License
46 stars 45 forks source link

aarch64 support #112

Closed shane-kerr closed 3 years ago

shane-kerr commented 4 years ago

Getting MintCoin working on the aarch64 CPU requires a few changes:

  1. The atomic pointer code used by LevelDB needed to be updated.
  2. The Makefile needed to be updated to remove the SSE optimizations (which are x86/amd64 only).
  3. An implementation of Scrypt that works on the CPU was needed (I used a C-based version here, which is portable and should work on any CPU, but may be slower than a hand-crafted assembly version).

The code to support aarch64 on LevelDB was found here:

https://github.com/google/leveldb/commit/c4c38f9c1f3bb405fe22a79c5611438f91208d09

The C implementation of Scrypt was found here:

https://github.com/pooler/cpuminer/blob/8da0556cec32819d967734527a8e0f1d8efb0671/scrypt.c#L420

(I think that this is defined in an IETF RFC as well, but using this seemed easiest.)