Integrated PoW changes for AEON
Added option to force PoW Version Updated donate address
This commit is contained in:
parent
7c0ed8b8c2
commit
470bf67833
6 changed files with 53 additions and 28 deletions
|
@ -36,8 +36,8 @@
|
|||
template <size_t NUM_HASH_BLOCKS>
|
||||
static void cryptonight_aesni(const void *input, size_t size, void *output, cryptonight_ctx *ctx) {
|
||||
# if !defined(XMRIG_ARMv7)
|
||||
if (reinterpret_cast<const uint8_t*>(input)[0] > 6) {
|
||||
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, false, NUM_HASH_BLOCKS>::hashV7(input, size, output, ctx);
|
||||
if (reinterpret_cast<const uint8_t*>(input)[0] > 6 || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2) {
|
||||
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, false, NUM_HASH_BLOCKS>::hashPowV2(input, size, output, ctx);
|
||||
} else {
|
||||
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, false, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
||||
}
|
||||
|
@ -46,9 +46,8 @@ static void cryptonight_aesni(const void *input, size_t size, void *output, cryp
|
|||
|
||||
template <size_t NUM_HASH_BLOCKS>
|
||||
static void cryptonight_softaes(const void *input, size_t size, void *output, cryptonight_ctx *ctx) {
|
||||
if (reinterpret_cast<const uint8_t*>(input)[0] > 6)
|
||||
{
|
||||
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, true, NUM_HASH_BLOCKS>::hashV7(input, size, output, ctx);
|
||||
if (reinterpret_cast<const uint8_t*>(input)[0] > 6 || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2) {
|
||||
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, true, NUM_HASH_BLOCKS>::hashPowV2(input, size, output, ctx);
|
||||
} else {
|
||||
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, true, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
||||
}
|
||||
|
@ -57,13 +56,21 @@ static void cryptonight_softaes(const void *input, size_t size, void *output, cr
|
|||
template <size_t NUM_HASH_BLOCKS>
|
||||
static void cryptonight_lite_aesni(const void *input, size_t size, void *output, cryptonight_ctx *ctx) {
|
||||
# if !defined(XMRIG_ARMv7)
|
||||
CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, false, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
||||
if (reinterpret_cast<const uint8_t*>(input)[0] > 1 || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2) {
|
||||
CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, false, NUM_HASH_BLOCKS>::hashPowV2(input, size, output, ctx);
|
||||
} else {
|
||||
CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, false, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
template <size_t NUM_HASH_BLOCKS>
|
||||
static void cryptonight_lite_softaes(const void *input, size_t size, void *output, cryptonight_ctx *ctx) {
|
||||
CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, true, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
||||
if (reinterpret_cast<const uint8_t*>(input)[0] > 1 || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2) {
|
||||
CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, true, NUM_HASH_BLOCKS>::hashPowV2(input, size, output, ctx);
|
||||
} else {
|
||||
CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, true, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
||||
}
|
||||
}
|
||||
|
||||
void (*cryptonight_hash_ctx[MAX_NUM_HASH_BLOCKS])(const void *input, size_t size, void *output, cryptonight_ctx *ctx);
|
||||
|
@ -71,7 +78,6 @@ void (*cryptonight_hash_ctx[MAX_NUM_HASH_BLOCKS])(const void *input, size_t size
|
|||
template <size_t HASH_FACTOR>
|
||||
void setCryptoNightHashMethods(Options::Algo algo, bool aesni)
|
||||
{
|
||||
|
||||
switch (algo) {
|
||||
case Options::ALGO_CRYPTONIGHT:
|
||||
if (aesni) {
|
||||
|
|
|
@ -462,7 +462,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -537,7 +537,7 @@ public:
|
|||
extra_hashes[ctx->state[0][0] & 3](ctx->state[0], 200, static_cast<char*>(output));
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -705,7 +705,7 @@ public:
|
|||
extra_hashes[ctx->state[1][0] & 3](ctx->state[1], 200, static_cast<char*>(output) + 32);
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -948,7 +948,7 @@ public:
|
|||
extra_hashes[ctx->state[2][0] & 3](ctx->state[2], 200, static_cast<char*>(output) + 64);
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -1266,7 +1266,7 @@ public:
|
|||
extra_hashes[ctx->state[3][0] & 3](ctx->state[3], 200, static_cast<char*>(output) + 96);
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -1656,7 +1656,7 @@ public:
|
|||
extra_hashes[ctx->state[4][0] & 3](ctx->state[4], 200, static_cast<char*>(output) + 128);
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
|
|
@ -421,7 +421,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -493,7 +493,7 @@ public:
|
|||
extra_hashes[ctx->state[0][0] & 3](ctx->state[0], 200, static_cast<char*>(output));
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -656,7 +656,7 @@ public:
|
|||
extra_hashes[ctx->state[1][0] & 3](ctx->state[1], 200, static_cast<char*>(output) + 32);
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -895,7 +895,7 @@ public:
|
|||
extra_hashes[ctx->state[2][0] & 3](ctx->state[2], 200, static_cast<char*>(output) + 64);
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -1209,7 +1209,7 @@ public:
|
|||
extra_hashes[ctx->state[3][0] & 3](ctx->state[3], 200, static_cast<char*>(output) + 96);
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
@ -1595,7 +1595,7 @@ public:
|
|||
extra_hashes[ctx->state[4][0] & 3](ctx->state[4], 200, static_cast<char*>(output) + 128);
|
||||
}
|
||||
|
||||
inline static void hashV7(const void* __restrict__ input,
|
||||
inline static void hashPowV2(const void* __restrict__ input,
|
||||
size_t size,
|
||||
void* __restrict__ output,
|
||||
cryptonight_ctx* __restrict__ ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue