Full DAG size, epoch scaling etc.

This commit is contained in:
2026-04-01 18:47:59 +02:00
parent 406ec95139
commit b20ba9802e
6 changed files with 400 additions and 40 deletions

View File

@@ -4,6 +4,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <constants.h>
#ifdef __cplusplus
extern "C" {
@@ -16,6 +17,7 @@ void Autolykos2_Destroy(Autolykos2Context* ctx);
bool Autolykos2_DagAllocate(Autolykos2Context* ctx, size_t bytes);
bool Autolykos2_DagAppend(Autolykos2Context* ctx, const uint8_t* data, size_t len);
bool Autolykos2_DagGenerate(Autolykos2Context* ctx, const uint8_t seed32[32]);
void Autolykos2_DagClear(Autolykos2Context* ctx);
size_t Autolykos2_DagSize(const Autolykos2Context* ctx);
@@ -24,15 +26,17 @@ bool Autolykos2_Hash(
const uint8_t* message,
size_t messageLen,
uint64_t nonce,
uint32_t height,
uint64_t height,
uint8_t outHash[32]
);
bool Autolykos2_LightHash(const uint8_t* seed, blockchain_t* chain, uint64_t nonce, uint8_t* out);
bool Autolykos2_CheckTarget(
Autolykos2Context* ctx,
const uint8_t message32[32],
uint64_t nonce,
uint32_t height,
uint64_t height,
const uint8_t target32[32],
uint8_t outHash[32]
);
@@ -40,7 +44,7 @@ bool Autolykos2_CheckTarget(
bool Autolykos2_FindNonceSingleCore(
Autolykos2Context* ctx,
const uint8_t message32[32],
uint32_t height,
uint64_t height,
const uint8_t target32[32],
uint64_t startNonce,
uint64_t maxIterations,