temoporarily changed DAG size for testing, fix TX loading, move some TX logic to Transaction_Init()

This commit is contained in:
2026-04-03 15:20:13 +02:00
parent b83f52a448
commit ae64bb9dfc
6 changed files with 30 additions and 7 deletions

View File

@@ -51,6 +51,7 @@ typedef struct {
transaction_sig_t signature;
} signed_transaction_t;
void Transaction_Init(signed_transaction_t* tx);
void Transaction_CalculateHash(const signed_transaction_t* tx, uint8_t* outHash);
void Transaction_Sign(signed_transaction_t* tx, const uint8_t* privateKey);
bool Transaction_Verify(const signed_transaction_t* tx);

View File

@@ -30,7 +30,8 @@
// Future Autolykos2 constants:
#define EPOCH_LENGTH 350000 // ~1 year at 90s
#define DAG_BASE_GROWTH (1ULL << 30) // 1 GB per epoch, adjusted by acceleration
#define DAG_BASE_SIZE (6ULL << 30) // 6 GB, adjusted per cycle based off DAG_BASE_GROWTH
//#define DAG_BASE_SIZE (6ULL << 30) // 6 GB, adjusted per cycle based off DAG_BASE_GROWTH
#define DAG_BASE_SIZE (1ULL << 30) // TEMPORARY FOR TESTING
// Swings - calculated as MIN(percentage, absolute GB) to prevent absurd swings from low hashrate or very large DAG growth
#define DAG_MAX_UP_SWING_PERCENTAGE 1.15 // 15%
#define DAG_MAX_DOWN_SWING_PERCENTAGE 0.90 // 10%