Skip to content

Commit

Permalink
testnet configs
Browse files Browse the repository at this point in the history
krypdkat authored and Franziska-Mueller committed Jan 6, 2025
1 parent 94e2e0b commit 342b78d
Showing 3 changed files with 53 additions and 39 deletions.
30 changes: 15 additions & 15 deletions src/private_settings.h
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
// Do NOT share the data of "Private Settings" section with anybody!!!

#define OPERATOR "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
#define OPERATOR "MEFKYFCDXDUILCAJKOIKWQAPENJDUHSSYPBRWFOTLALILAYWQFDSITJELLHG"

static unsigned char computorSeeds[][55 + 1] = {
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -22,20 +22,20 @@ static const unsigned char whiteListPeers[][4] = {
{127, 0, 0, 1}, // REMOVE THIS ENTRY AND REPLACE IT WITH YOUR OWN IP ADDRESSES
};

#define LOG_QU_TRANSFERS 0 // "0" disables logging, "1" enables it
#define LOG_BURNINGS 0
#define LOG_DUST_BURNINGS 0
#define LOG_SPECTRUM_STATS 0
#define LOG_ASSET_ISSUANCES 0
#define LOG_ASSET_OWNERSHIP_CHANGES 0
#define LOG_ASSET_POSSESSION_CHANGES 0
#define LOG_CONTRACT_ERROR_MESSAGES 0
#define LOG_CONTRACT_WARNING_MESSAGES 0
#define LOG_CONTRACT_INFO_MESSAGES 0
#define LOG_CONTRACT_DEBUG_MESSAGES 0
#define LOG_CUSTOM_MESSAGES 0
#define LOG_QU_TRANSFERS 1 // "0" disables logging, "1" enables it
#define LOG_BURNINGS 1
#define LOG_DUST_BURNINGS 1
#define LOG_SPECTRUM_STATS 1
#define LOG_ASSET_ISSUANCES 1
#define LOG_ASSET_OWNERSHIP_CHANGES 1
#define LOG_ASSET_POSSESSION_CHANGES 1
#define LOG_CONTRACT_ERROR_MESSAGES 1
#define LOG_CONTRACT_WARNING_MESSAGES 1
#define LOG_CONTRACT_INFO_MESSAGES 1
#define LOG_CONTRACT_DEBUG_MESSAGES 1
#define LOG_CUSTOM_MESSAGES 1
static unsigned long long logReaderPasscodes[4] = {
0, 0, 0, 0 // REMOVE THIS ENTRY AND REPLACE IT WITH YOUR OWN RANDOM NUMBERS IN [0..18446744073709551615] RANGE IF LOGGING IS ENABLED
1, 2, 3, 4 // REMOVE THIS ENTRY AND REPLACE IT WITH YOUR OWN RANDOM NUMBERS IN [0..18446744073709551615] RANGE IF LOGGING IS ENABLED
};

// Mode for auto save ticks:
@@ -47,4 +47,4 @@ static unsigned long long logReaderPasscodes[4] = {
// Perform state persisting when your node is misaligned will also make your node misaligned after resuming.
// Thus, picking various TICK_STORAGE_AUTOSAVE_TICK_PERIOD numbers across AUX nodes is recommended.
// some suggested prime numbers you can try: 971 977 983 991 997
#define TICK_STORAGE_AUTOSAVE_TICK_PERIOD 1000
#define TICK_STORAGE_AUTOSAVE_TICK_PERIOD 10
18 changes: 11 additions & 7 deletions src/public_settings.h
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
// random seed is now obtained from spectrumDigests

#define MAX_NUMBER_OF_PROCESSORS 32
#define NUMBER_OF_SOLUTION_PROCESSORS 12 // do not increase this, because there may be issues due to too fast ticking
#define NUMBER_OF_SOLUTION_PROCESSORS 6 // do not increase this, because there may be issues due to too fast ticking

// Number of buffers available for executing contract functions in parallel; having more means reserving a bit more RAM (+1 = +32 MB)
// and less waiting in request processors if there are more parallel contract function requests. The maximum value that may make sense
@@ -23,11 +23,11 @@
// Number of ticks from prior epoch that are kept after seamless epoch transition. These can be requested after transition.
#define TICKS_TO_KEEP_FROM_PRIOR_EPOCH 100

#define TARGET_TICK_DURATION 1500
#define TRANSACTION_SPARSENESS 1
#define TARGET_TICK_DURATION 7000
#define TRANSACTION_SPARSENESS 4

// Below are 2 variables that are used for auto-F5 feature:
#define AUTO_FORCE_NEXT_TICK_THRESHOLD 0ULL // Multiplier of TARGET_TICK_DURATION for the system to detect "F5 case" | set to 0 to disable
#define AUTO_FORCE_NEXT_TICK_THRESHOLD 3ULL // Multiplier of TARGET_TICK_DURATION for the system to detect "F5 case" | set to 0 to disable
// to prevent bad actor causing misalignment.
// depends on actual tick time of the network, operators should set this number randomly in this range [12, 26]
// eg: If AUTO_FORCE_NEXT_TICK_THRESHOLD is 8 and TARGET_TICK_DURATION is 2, then the system will start "auto F5 procedure" after 16 seconds after receveing 451+ votes
@@ -56,7 +56,9 @@
#define EPOCH 143
#define TICK 18330000

#define ARBITRATOR "AFZPUAIYVPNUYGJRQVLUKOPPVLHAZQTGLYAAUUNBXFTVTAMSBKQBLEIEPCVJ"
// random seed is now obtained from spectrumDigests

#define ARBITRATOR "MEFKYFCDXDUILCAJKOIKWQAPENJDUHSSYPBRWFOTLALILAYWQFDSITJELLHG"

static unsigned short SYSTEM_FILE_NAME[] = L"system";
static unsigned short SYSTEM_END_OF_EPOCH_FILE_NAME[] = L"system.eoe";
@@ -71,14 +73,14 @@ static unsigned short CONTRACT_FILE_NAME[] = L"contract????.???";
#define MAX_DURATION 9000000
#define NUMBER_OF_OPTIMIZATION_STEPS 60
#define NEURON_VALUE_LIMIT 1LL
#define SOLUTION_THRESHOLD_DEFAULT 135
#define SOLUTION_THRESHOLD_DEFAULT 87

#define SOLUTION_SECURITY_DEPOSIT 1000000

// include commonly needed definitions
#include "network_messages/common_def.h"

#define MAX_NUMBER_OF_TICKS_PER_EPOCH (((((60 * 60 * 24 * 7) / (TARGET_TICK_DURATION / 1000)) + NUMBER_OF_COMPUTORS - 1) / NUMBER_OF_COMPUTORS) * NUMBER_OF_COMPUTORS)
#define MAX_NUMBER_OF_TICKS_PER_EPOCH (((((60 * 60 * 24 * 1) / (TARGET_TICK_DURATION / 1000)) + NUMBER_OF_COMPUTORS - 1) / NUMBER_OF_COMPUTORS) * NUMBER_OF_COMPUTORS)
#define FIRST_TICK_TRANSACTION_OFFSET sizeof(unsigned long long)
#define MAX_TRANSACTION_SIZE (MAX_INPUT_SIZE + sizeof(Transaction) + SIGNATURE_SIZE)

@@ -87,3 +89,5 @@ static unsigned short CONTRACT_FILE_NAME[] = L"contract????.???";

#define STACK_SIZE 4194304
#define TRACK_MAX_STACK_BUFFER_SIZE

#define TESTNET_EPOCH_DURATION 1000
44 changes: 27 additions & 17 deletions src/qubic.cpp
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@
#define MAX_UNIVERSE_SIZE 1073741824
#define MESSAGE_DISSEMINATION_THRESHOLD 1000000000
#define PEER_REFRESHING_PERIOD 120000ULL
#define PORT 21841
#define PORT 31841
#define SYSTEM_DATA_SAVING_PERIOD 300000ULL
#define TICK_TRANSACTIONS_PUBLICATION_OFFSET 2 // Must be only 2
#define TICK_VOTE_COUNTER_PUBLICATION_OFFSET 4 // Must be at least 3+: 1+ for tx propagration + 1 for tickData propagration + 1 for vote propagration
@@ -2874,6 +2874,12 @@ static void endEpoch()
for (unsigned int i = 0; i < NUMBER_OF_COMPUTORS; i++)
{
unsigned long long vote_count = voteCounter.getVoteCount(i);
if (system.tick - system.initialTick <= NUMBER_OF_COMPUTORS)
{
// Due to the validity check requring 675*451 votes, which assumes at least 676 ticks in the epoch, all vote counts are 0 if the epoch has less ticks.
// This is a workaround to prevent that no computor gets revenue in this case.
vote_count = 1;
}
if (vote_count != 0)
{
unsigned long long final_score = vote_count * revenueScore[i];
@@ -4126,8 +4132,9 @@ static void tickProcessor(void*)
if (tickDataSuits)
{
const int dayIndex = ::dayIndex(etalonTick.year, etalonTick.month, etalonTick.day);
if ((dayIndex == 738570 + system.epoch * 7 && etalonTick.hour >= 12)
|| dayIndex > 738570 + system.epoch * 7)
// if ((dayIndex == 738570 + system.epoch * 7 && etalonTick.hour >= 12)
// || dayIndex > 738570 + system.epoch * 7)
if (system.tick - system.initialTick >= TESTNET_EPOCH_DURATION)
{
// start seamless epoch transition
epochTransitionState = 1;
@@ -4971,20 +4978,23 @@ static void logInfo()
}
else
{
const CHAR16 alphabet[26][2] = { L"A", L"B", L"C", L"D", L"E", L"F", L"G", L"H", L"I", L"J", L"K", L"L", L"M", L"N", L"O", L"P", L"Q", L"R", L"S", L"T", L"U", L"V", L"W", L"X", L"Y", L"Z" };
for (unsigned int i = 0; i < numberOfOwnComputorIndices; i++)
{
appendText(message, alphabet[ownComputorIndices[i] / 26]);
appendText(message, alphabet[ownComputorIndices[i] % 26]);
if (i < (unsigned int)(numberOfOwnComputorIndices - 1))
{
appendText(message, L"+");
}
else
{
appendText(message, L".");
}
}
appendText(message, L"[Owning ");
appendNumber(message, numberOfOwnComputorIndices, false);
appendText(message, L" indices]");
// const CHAR16 alphabet[26][2] = { L"A", L"B", L"C", L"D", L"E", L"F", L"G", L"H", L"I", L"J", L"K", L"L", L"M", L"N", L"O", L"P", L"Q", L"R", L"S", L"T", L"U", L"V", L"W", L"X", L"Y", L"Z" };
// for (unsigned int i = 0; i < numberOfOwnComputorIndices; i++)
// {
// appendText(message, alphabet[ownComputorIndices[i] / 26]);
// appendText(message, alphabet[ownComputorIndices[i] % 26]);
// if (i < (unsigned int)(numberOfOwnComputorIndices - 1))
// {
// appendText(message, L"+");
// }
// else
// {
// appendText(message, L".");
// }
// }
}
logToConsole(message);

0 comments on commit 342b78d

Please sign in to comment.