monero/src/cryptonote_config.h

113 lines
6.0 KiB
C
Raw Normal View History

2014-07-23 16:03:52 +03:00
// Copyright (c) 2014, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
2014-03-04 00:07:58 +02:00
#pragma once
2014-04-02 19:00:17 +03:00
#define CRYPTONOTE_MAX_BLOCK_NUMBER 500000000
#define CRYPTONOTE_MAX_BLOCK_SIZE 500000000 // block header blob limit, never used!
2014-06-26 23:42:24 +03:00
#define CRYPTONOTE_GETBLOCKTEMPLATE_MAX_BLOCK_SIZE 196608 //size of block (bytes) that is the maximum that miners will produce
2014-04-02 19:00:17 +03:00
#define CRYPTONOTE_MAX_TX_SIZE 1000000000
#define CRYPTONOTE_PUBLIC_ADDRESS_TEXTBLOB_VER 0
2014-05-25 20:06:40 +03:00
#define CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX 18 // addresses start with "4"
2014-04-18 00:21:40 +03:00
#define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW 60
2014-03-04 00:07:58 +02:00
#define CURRENT_TRANSACTION_VERSION 1
#define CURRENT_BLOCK_MAJOR_VERSION 1
2014-04-30 13:39:49 +03:00
#define CURRENT_BLOCK_MINOR_VERSION 0
2014-04-02 19:00:17 +03:00
#define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT 60*60*2
2014-03-04 00:07:58 +02:00
#define BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW 60
// MONEY_SUPPLY - total number coins to be generated
#define MONEY_SUPPLY ((uint64_t)(-1))
2014-04-18 00:21:40 +03:00
#define EMISSION_SPEED_FACTOR (20)
2014-04-02 19:00:17 +03:00
#define CRYPTONOTE_REWARD_BLOCKS_WINDOW 100
2014-04-18 00:21:40 +03:00
#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE 20000 //size of block (bytes) after which reward for block calculated using block size
2014-04-02 19:00:17 +03:00
#define CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE 600
2014-04-18 00:21:40 +03:00
#define CRYPTONOTE_DISPLAY_DECIMAL_POINT 12
2014-03-04 00:07:58 +02:00
// COIN - number of smallest units in one coin
2014-05-25 20:06:40 +03:00
#define COIN ((uint64_t)1000000000000) // pow(10, 12)
#define DEFAULT_FEE ((uint64_t)5000000000) // 5 * pow(10, 9)
2014-03-04 00:07:58 +02:00
#define ORPHANED_BLOCKS_MAX_COUNT 100
2014-04-18 00:21:40 +03:00
#define DIFFICULTY_TARGET 60 // seconds
2014-03-04 00:07:58 +02:00
#define DIFFICULTY_WINDOW 720 // blocks
#define DIFFICULTY_LAG 15 // !!!
#define DIFFICULTY_CUT 60 // timestamps to cut after sorting
#define DIFFICULTY_BLOCKS_COUNT DIFFICULTY_WINDOW + DIFFICULTY_LAG
2014-04-02 19:00:17 +03:00
#define CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_SECONDS DIFFICULTY_TARGET * CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS
#define CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS 1
2014-03-04 00:07:58 +02:00
#define DIFFICULTY_BLOCKS_ESTIMATE_TIMESPAN DIFFICULTY_TARGET //just alias
#define BLOCKS_IDS_SYNCHRONIZING_DEFAULT_COUNT 10000 //by default, blocks ids count in synchronizing
#define BLOCKS_SYNCHRONIZING_DEFAULT_COUNT 200 //by default, blocks count in blocks downloading
2014-04-02 19:00:17 +03:00
#define CRYPTONOTE_PROTOCOL_HOP_RELAX_COUNT 3 //value of hop, after which we use only announce of new block
2014-03-04 00:07:58 +02:00
#define CRYPTONOTE_MEMPOOL_TX_LIVETIME 86400 //seconds, one day
#define CRYPTONOTE_MEMPOOL_TX_FROM_ALT_BLOCK_LIVETIME 604800 //seconds, one week
2014-03-04 00:07:58 +02:00
2014-04-18 00:21:40 +03:00
#define P2P_DEFAULT_PORT 18080
#define RPC_DEFAULT_PORT 18081
2014-03-04 00:07:58 +02:00
#define COMMAND_RPC_GET_BLOCKS_FAST_MAX_COUNT 1000
#define P2P_LOCAL_WHITE_PEERLIST_LIMIT 1000
#define P2P_LOCAL_GRAY_PEERLIST_LIMIT 5000
2014-04-18 00:21:40 +03:00
#define P2P_DEFAULT_CONNECTIONS_COUNT 12
2014-03-04 00:07:58 +02:00
#define P2P_DEFAULT_HANDSHAKE_INTERVAL 60 //secondes
#define P2P_DEFAULT_PACKET_MAX_SIZE 50000000 //50000000 bytes maximum packet size
#define P2P_DEFAULT_PEERS_IN_HANDSHAKE 250
#define P2P_DEFAULT_CONNECTION_TIMEOUT 5000 //5 seconds
#define P2P_DEFAULT_PING_CONNECTION_TIMEOUT 2000 //2 seconds
2014-04-07 18:02:15 +03:00
#define P2P_DEFAULT_INVOKE_TIMEOUT 60*2*1000 //2 minutes
2014-03-04 00:07:58 +02:00
#define P2P_DEFAULT_HANDSHAKE_INVOKE_TIMEOUT 5000 //5 seconds
#define P2P_STAT_TRUSTED_PUB_KEY "8f80f9a5a434a9f1510d13336228debfee9c918ce505efe225d8c94d045fa115"
#define P2P_DEFAULT_WHITELIST_CONNECTIONS_PERCENT 70
#define ALLOW_DEBUG_COMMANDS
2014-04-18 00:21:40 +03:00
#define CRYPTONOTE_NAME "bitmonero"
2014-03-04 00:07:58 +02:00
#define CRYPTONOTE_POOLDATA_FILENAME "poolstate.bin"
#define CRYPTONOTE_BLOCKCHAINDATA_FILENAME "blockchain.bin"
#define CRYPTONOTE_BLOCKCHAINDATA_TEMP_FILENAME "blockchain.bin.tmp"
#define P2P_NET_DATA_FILENAME "p2pstate.bin"
#define MINER_CONFIG_FILE_NAME "miner_conf.json"
2014-04-30 23:50:06 +03:00
#define THREAD_STACK_SIZE 5 * 1024 * 1024
2014-03-04 00:07:58 +02:00