Skip to content

Commit

Permalink
Update CryptoNoteConfig.h
Browse files Browse the repository at this point in the history
  • Loading branch information
HashHound committed Jul 11, 2024
1 parent 2daddd7 commit 13f2125
Showing 1 changed file with 21 additions and 40 deletions.
61 changes: 21 additions & 40 deletions src/CryptoNoteConfig.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2016 The Cryptonote developers
// Copyright (c) 2011-2024 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand All @@ -14,39 +14,30 @@ namespace parameters {

const uint64_t CRYPTONOTE_MAX_BLOCK_NUMBER = 500000000;
const size_t CRYPTONOTE_MAX_BLOCK_BLOB_SIZE = 500000000;
const size_t CRYPTONOTE_MAX_TX_SIZE = 1000000000;
//TODO Currency-specific address prefix
const uint64_t CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 0x6f5b;
//TODO Choose maturity period for your currency
const size_t CRYPTONOTE_MAX_TX_SIZE = 2000000; // Adjusted to 2 MB
const uint64_t CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 0x6f5b; // Unique prefix for Dogemone
const size_t CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW = 60;
const uint64_t CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT = 60 * 60 * 2;

const size_t BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW = 60;

//TODO Specify total number of available coins
//TODO ((uint64_t)(-1)) equals to 18446744073709551616 coins
//TODO or you can define number explicitly UINT64_C(858986905600000000)
const uint64_t MONEY_SUPPLY = UINT64_C(300000000000000000);
const uint64_t MONEY_SUPPLY = UINT64_C(300000000000000000); // Total supply
const unsigned EMISSION_SPEED_FACTOR = 20;
static_assert(EMISSION_SPEED_FACTOR <= 8 * sizeof(uint64_t), "Bad EMISSION_SPEED_FACTOR");

//TODO Define number of blocks for block size median calculation
const size_t CRYPTONOTE_REWARD_BLOCKS_WINDOW = 100;
const size_t CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE = 20000; //size of block (bytes) after which reward for block calculated using block size
// Increased to 50 KB to allow more transactions per block
const size_t CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE = 50000;
const size_t CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE = 600;
//TODO Define number of digits
const size_t CRYPTONOTE_DISPLAY_DECIMAL_POINT = 9;
//TODO Define minimum fee for transactions
const uint64_t MINIMUM_FEE = 100000;
// Adjusted minimum fee to 0.01 Dogemone (10,000,000 atomic units)
const uint64_t MINIMUM_FEE = 10000000;
const uint64_t DEFAULT_DUST_THRESHOLD = MINIMUM_FEE;

//TODO Define preferred block's target time
const uint64_t DIFFICULTY_TARGET = 120; // seconds
const uint64_t DIFFICULTY_TARGET = 120; // Block time in seconds
const uint64_t EXPECTED_NUMBER_OF_BLOCKS_PER_DAY = 24 * 60 * 60 / DIFFICULTY_TARGET;
//TODO There are options to tune CryptoNote's difficulty retargeting function.
//TODO We recommend not to change it.
const size_t DIFFICULTY_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks
const size_t DIFFICULTY_CUT = 60; // timestamps to cut after sorting
const size_t DIFFICULTY_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY;
const size_t DIFFICULTY_CUT = 60;
const size_t DIFFICULTY_LAG = 15;
static_assert(2 * DIFFICULTY_CUT <= DIFFICULTY_WINDOW - 2, "Bad DIFFICULTY_WINDOW or DIFFICULTY_CUT");

Expand All @@ -57,8 +48,8 @@ const uint64_t MAX_BLOCK_SIZE_GROWTH_SPEED_DENOMINATOR = 365 * 24 * 60 * 6
const uint64_t CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS = 1;
const uint64_t CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_SECONDS = DIFFICULTY_TARGET * CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS;

const uint64_t CRYPTONOTE_MEMPOOL_TX_LIVETIME = 60 * 60 * 24; //seconds, one day
const uint64_t CRYPTONOTE_MEMPOOL_TX_FROM_ALT_BLOCK_LIVETIME = 60 * 60 * 24 * 7; //seconds, one week
const uint64_t CRYPTONOTE_MEMPOOL_TX_LIVETIME = 60 * 60 * 24; // seconds, one day
const uint64_t CRYPTONOTE_MEMPOOL_TX_FROM_ALT_BLOCK_LIVETIME = 60 * 60 * 24 * 7; // seconds, one week
const uint64_t CRYPTONOTE_NUMBER_OF_PERIODS_TO_FORGET_TX_DELETED_FROM_POOL = 7; // CRYPTONOTE_NUMBER_OF_PERIODS_TO_FORGET_TX_DELETED_FROM_POOL * CRYPTONOTE_MEMPOOL_TX_LIVETIME = time to forget tx

const size_t FUSION_TX_MAX_SIZE = CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE * 30 / 100;
Expand All @@ -74,21 +65,18 @@ const char CRYPTONOTE_BLOCKCHAIN_INDICES_FILENAME[] = "blockchainindice
const char MINER_CONFIG_FILE_NAME[] = "miner_conf.json";
} // parameters

//TODO Put here the name of your currency
const char CRYPTONOTE_NAME[] = "dogemone";
const char GENESIS_COINBASE_TX_HEX[] = "013c01ff000189a39ae8a908029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121011c257208ff577a7fe234226c02232debf56c45b0ad1508cfe8f99c18d59861e6";

const uint8_t CURRENT_TRANSACTION_VERSION = 1;
const uint8_t BLOCK_MAJOR_VERSION_1 = 1;
const uint8_t BLOCK_MINOR_VERSION_0 = 0;

const size_t BLOCKS_IDS_SYNCHRONIZING_DEFAULT_COUNT = 10000; //by default, blocks ids count in synchronizing
const size_t BLOCKS_SYNCHRONIZING_DEFAULT_COUNT = 200; //by default, blocks count in blocks downloading
const size_t BLOCKS_IDS_SYNCHRONIZING_DEFAULT_COUNT = 10000;
const size_t BLOCKS_SYNCHRONIZING_DEFAULT_COUNT = 200;
const size_t COMMAND_RPC_GET_BLOCKS_FAST_MAX_COUNT = 1000;

//TODO This port will be used by the daemon to establish connections with p2p network
const int P2P_DEFAULT_PORT = 49200;
//TODO This port will be used by the daemon to interact with simlewallet
const int RPC_DEFAULT_PORT = 53000;

const size_t P2P_LOCAL_WHITE_PEERLIST_LIMIT = 1000;
Expand All @@ -98,15 +86,14 @@ const size_t P2P_CONNECTION_MAX_WRITE_BUFFER_SIZE = 16 * 1024 * 1024;
const uint32_t P2P_DEFAULT_CONNECTIONS_COUNT = 8;
const size_t P2P_DEFAULT_WHITELIST_CONNECTIONS_PERCENT = 70;
const uint32_t P2P_DEFAULT_HANDSHAKE_INTERVAL = 60; // seconds
const uint32_t P2P_DEFAULT_PACKET_MAX_SIZE = 50000000; // 50000000 bytes maximum packet size
const uint32_t P2P_DEFAULT_PACKET_MAX_SIZE = 50000000; // 50 MB
const uint32_t P2P_DEFAULT_PEERS_IN_HANDSHAKE = 250;
const uint32_t P2P_DEFAULT_CONNECTION_TIMEOUT = 5000; // 5 seconds
const uint32_t P2P_DEFAULT_PING_CONNECTION_TIMEOUT = 2000; // 2 seconds
const uint64_t P2P_DEFAULT_INVOKE_TIMEOUT = 60 * 2 * 1000; // 2 minutes
const size_t P2P_DEFAULT_HANDSHAKE_INVOKE_TIMEOUT = 5000; // 5 seconds
const char P2P_STAT_TRUSTED_PUB_KEY[] = "8f80f9a5a434a9f1510d13336228debfee9c918ce505efe225d8c94d045fa115";

//TODO Add here your network seed nodes
const std::initializer_list<const char*> SEED_NODES = {
"45.32.154.224:49200",
"45.77.148.37:49200",
Expand All @@ -117,18 +104,12 @@ struct CheckpointData {
const char* blockId;
};

#ifdef __GNUC__
__attribute__((unused))
#endif

// You may add here other checkpoints using the following format:
// {<block height>, "<block hash>"},
const std::initializer_list<CheckpointData> CHECKPOINTS = {
{1, "0193545f4b1799f6d1acf3a66ac4331c4a2f75b83de708f4c03a05a3be9e9e08"},
{2, "99877b48dc63adaaa30f2a7d63e12e4e1b4e1d8bcab17fa3d342746c5e27027b"},
{4, "ccead4c6c3d67a68c459318ea5031a9e6e120b22a7b2715975aba0ec241bc3d1"},
{5, "8e640416f7f2aef16f27dc832b2cd352d0f25e401a4a8477e1fdde4137f5c114"},
{10, "7eefa21e77319df6c245528a5e823c53f379c6d6e65326d10b036e4c39d92498"},
//{1, "0193545f4b1799f6d1acf3a66ac4331c4a2f75b83de708f4c03a05a3be9e9e08"},
//{2, "99877b48dc63adaaa30f2a7d63e12e4e1b4e1d8bcab17fa3d342746c5e27027b"},
//{4, "ccead4c6c3d67a68c459318ea5031a9e6e120b22a7b2715975aba0ec241bc3d1"},
//{5, "8e640416f7f2aef16f27dc832b2cd352d0f25e401a4a8477e1fdde4137f5c114"},
//{10, "7eefa21e77319df6c245528a5e823c53f379c6d6e65326d10b036e4c39d92498"},
};
} // CryptoNote

Expand Down

0 comments on commit 13f2125

Please sign in to comment.