Quazarcoin initial commit
This commit is contained in:
parent
25d3389eae
commit
fad044e0de
8 changed files with 20 additions and 43 deletions
|
@ -43,4 +43,4 @@ add_dependencies(simplewallet version)
|
|||
|
||||
set_property(TARGET common crypto cryptonote_core rpc wallet PROPERTY FOLDER "libs")
|
||||
set_property(TARGET daemon simplewallet connectivity_tool simpleminer PROPERTY FOLDER "prog")
|
||||
set_property(TARGET daemon PROPERTY OUTPUT_NAME "bytecoind")
|
||||
set_property(TARGET daemon PROPERTY OUTPUT_NAME "quazarcoind")
|
||||
|
|
|
@ -95,13 +95,12 @@ void cn_slow_hash(const void *data, size_t length, char *hash) {
|
|||
memcpy(text, state.init, INIT_SIZE_BYTE);
|
||||
memcpy(aes_key, state.hs.b, AES_KEY_SIZE);
|
||||
aes_ctx = oaes_alloc();
|
||||
|
||||
oaes_key_import_data(aes_ctx, aes_key, AES_KEY_SIZE);
|
||||
for (i = 0; i < MEMORY / INIT_SIZE_BYTE; i++) {
|
||||
for (j = 0; j < INIT_SIZE_BLK; j++) {
|
||||
oaes_key_import_data(aes_ctx, aes_key, AES_KEY_SIZE);
|
||||
for (j = 0; j < INIT_SIZE_BLK; j++)
|
||||
oaes_pseudo_encrypt_ecb(aes_ctx, &text[AES_BLOCK_SIZE * j]);
|
||||
/*memcpy(aes_key, &text[AES_BLOCK_SIZE * j], AES_KEY_SIZE);*/
|
||||
memcpy(aes_key, state.hs.b, AES_KEY_SIZE);
|
||||
}
|
||||
|
||||
memcpy(&long_state[i * INIT_SIZE_BYTE], text, INIT_SIZE_BYTE);
|
||||
}
|
||||
|
||||
|
@ -137,17 +136,15 @@ void cn_slow_hash(const void *data, size_t length, char *hash) {
|
|||
}
|
||||
|
||||
memcpy(text, state.init, INIT_SIZE_BYTE);
|
||||
oaes_key_import_data(aes_ctx, &state.hs.b[32], AES_KEY_SIZE);
|
||||
for (i = 0; i < MEMORY / INIT_SIZE_BYTE; i++) {
|
||||
for (j = 0; j < INIT_SIZE_BLK; j++) {
|
||||
/*oaes_key_import_data(aes_ctx, &long_state[i * INIT_SIZE_BYTE + j * AES_BLOCK_SIZE], AES_KEY_SIZE);*/
|
||||
oaes_key_import_data(aes_ctx, &state.hs.b[32], AES_KEY_SIZE);
|
||||
xor_blocks(&text[j * AES_BLOCK_SIZE], &long_state[i * INIT_SIZE_BYTE + j * AES_BLOCK_SIZE]);
|
||||
oaes_pseudo_encrypt_ecb(aes_ctx, &text[j * AES_BLOCK_SIZE]);
|
||||
}
|
||||
}
|
||||
memcpy(state.init, text, INIT_SIZE_BYTE);
|
||||
hash_permutation(&state.hs);
|
||||
/*memcpy(hash, &state, 32);*/
|
||||
extra_hashes[state.hs.b[0] & 3](&state, 200, hash);
|
||||
oaes_free(&aes_ctx);
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#define CRYPTONOTE_MAX_BLOCK_SIZE 500000000 // block header blob limit, never used!
|
||||
#define CRYPTONOTE_MAX_TX_SIZE 1000000000
|
||||
#define CRYPTONOTE_PUBLIC_ADDRESS_TEXTBLOB_VER 0
|
||||
#define CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX 6 // addresses start with "2"
|
||||
#define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW 10
|
||||
#define CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX 2 // addresses start with "2"
|
||||
#define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW 60
|
||||
#define CURRENT_TRANSACTION_VERSION 1
|
||||
#define CURRENT_BLOCK_MAJOR_VERSION 1
|
||||
#define CURRENT_BLOCK_MINOR_VERSION 0
|
||||
|
@ -19,11 +19,12 @@
|
|||
|
||||
// MONEY_SUPPLY - total number coins to be generated
|
||||
#define MONEY_SUPPLY ((uint64_t)(-1))
|
||||
#define EMISSION_SPEED_FACTOR (21)
|
||||
|
||||
#define CRYPTONOTE_REWARD_BLOCKS_WINDOW 100
|
||||
#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE 10000 //size of block (bytes) after which reward for block calculated using block size
|
||||
#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE 20000 //size of block (bytes) after which reward for block calculated using block size
|
||||
#define CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE 600
|
||||
#define CRYPTONOTE_DISPLAY_DECIMAL_POINT 8
|
||||
#define CRYPTONOTE_DISPLAY_DECIMAL_POINT 12
|
||||
// COIN - number of smallest units in one coin
|
||||
#define COIN ((uint64_t)100000000) // pow(10, 8)
|
||||
#define DEFAULT_FEE ((uint64_t)1000000) // pow(10, 6)
|
||||
|
@ -51,8 +52,8 @@
|
|||
#define CRYPTONOTE_PROTOCOL_HOP_RELAX_COUNT 3 //value of hop, after which we use only announce of new block
|
||||
|
||||
|
||||
#define P2P_DEFAULT_PORT 8080
|
||||
#define RPC_DEFAULT_PORT 8081
|
||||
#define P2P_DEFAULT_PORT 23080
|
||||
#define RPC_DEFAULT_PORT 23081
|
||||
#define COMMAND_RPC_GET_BLOCKS_FAST_MAX_COUNT 1000
|
||||
|
||||
#define P2P_LOCAL_WHITE_PEERLIST_LIMIT 1000
|
||||
|
@ -66,12 +67,12 @@
|
|||
#define P2P_DEFAULT_PING_CONNECTION_TIMEOUT 2000 //2 seconds
|
||||
#define P2P_DEFAULT_INVOKE_TIMEOUT 60*2*1000 //2 minutes
|
||||
#define P2P_DEFAULT_HANDSHAKE_INVOKE_TIMEOUT 5000 //5 seconds
|
||||
#define P2P_STAT_TRUSTED_PUB_KEY "8f80f9a5a434a9f1510d13336228debfee9c918ce505efe225d8c94d045fa115"
|
||||
#define P2P_STAT_TRUSTED_PUB_KEY "fede02571de64623093f19e08a3b791e0ffe4d39d968c7cdc51cb8d37e6a2a0d"
|
||||
#define P2P_DEFAULT_WHITELIST_CONNECTIONS_PERCENT 70
|
||||
|
||||
#define ALLOW_DEBUG_COMMANDS
|
||||
|
||||
#define CRYPTONOTE_NAME "bytecoin"
|
||||
#define CRYPTONOTE_NAME "quazarcoin"
|
||||
#define CRYPTONOTE_POOLDATA_FILENAME "poolstate.bin"
|
||||
#define CRYPTONOTE_BLOCKCHAINDATA_FILENAME "blockchain.bin"
|
||||
#define CRYPTONOTE_BLOCKCHAINDATA_TEMP_FILENAME "blockchain.bin.tmp"
|
||||
|
|
|
@ -12,19 +12,6 @@
|
|||
namespace cryptonote {
|
||||
inline bool create_checkpoints(cryptonote::checkpoints& checkpoints)
|
||||
{
|
||||
ADD_CHECKPOINT(79000, "cae33204e624faeb64938d80073bb7bbacc27017dc63f36c5c0f313cad455a02");
|
||||
ADD_CHECKPOINT(140000, "993059fb6ab92db7d80d406c67a52d9c02d873ca34b6290a12b744c970208772");
|
||||
ADD_CHECKPOINT(200000, "a5f74c7542077df6859f48b5b1f9c3741f29df38f91a47e14c94b5696e6c3073");
|
||||
ADD_CHECKPOINT(230580, "32bd7cb6c68a599cf2861941f29002a5e203522b9af54f08dfced316f6459103");
|
||||
ADD_CHECKPOINT(260000, "f68e70b360ca194f48084da7a7fd8e0251bbb4b5587f787ca65a6f5baf3f5947");
|
||||
ADD_CHECKPOINT(300000, "8e80861713f68354760dc10ea6ea79f5f3ff28f39b3f0835a8637463b09d70ff");
|
||||
ADD_CHECKPOINT(390285, "e00bdc9bf407aeace2f3109de11889ed25894bf194231d075eddaec838097eb7");
|
||||
ADD_CHECKPOINT(417000, "2dc96f8fc4d4a4d76b3ed06722829a7ab09d310584b8ecedc9b578b2c458a69f");
|
||||
ADD_CHECKPOINT(427193, "00feabb08f2d5759ed04fd6b799a7513187478696bba2db2af10d4347134e311");
|
||||
ADD_CHECKPOINT(453537, "d17de6916c5aa6ffcae575309c80b0f8fdcd0a84b5fa8e41a841897d4b5a4e97");
|
||||
ADD_CHECKPOINT(462250, "13468d210a5ec884cf839f0259f247ccf3efef0414ac45172033d32c739beb3e");
|
||||
ADD_CHECKPOINT(468000, "251bcbd398b1f593193a7210934a3d87f692b2cb0c45206150f59683dd7e9ba1");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace cryptonote {
|
|||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
bool get_block_reward(size_t median_size, size_t current_block_size, uint64_t already_generated_coins, uint64_t &reward) {
|
||||
uint64_t base_reward = (MONEY_SUPPLY - already_generated_coins) >> 18;
|
||||
uint64_t base_reward = (MONEY_SUPPLY - already_generated_coins) >> EMISSION_SPEED_FACTOR;
|
||||
|
||||
//make it soft
|
||||
if (median_size < CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE) {
|
||||
|
|
|
@ -626,7 +626,7 @@ namespace cryptonote
|
|||
std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb);
|
||||
|
||||
//hard code coinbase tx in genesis block, because "tru" generating tx use random, but genesis should be always the same
|
||||
std::string genesis_coinbase_tx_hex = "010a01ff0001ffffffffffff0f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121013c086a48c15fb637a96991bc6d53caf77068b5ba6eeb3c82357228c49790584a";
|
||||
std::string genesis_coinbase_tx_hex = "013c01ff0001ffffffffffff01029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121014c52c089aceeab13a8399d61408b337bace367fe5de10318bb4ca45259b76314";
|
||||
|
||||
blobdata tx_bl;
|
||||
string_tools::parse_hexstr_to_binbuff(genesis_coinbase_tx_hex, tx_bl);
|
||||
|
|
|
@ -192,16 +192,8 @@ namespace nodetool
|
|||
template<class t_payload_net_handler>
|
||||
bool node_server<t_payload_net_handler>::init(const boost::program_options::variables_map& vm)
|
||||
{
|
||||
ADD_HARDCODED_SEED_NODE("seed.bytecoin.org:8080");
|
||||
ADD_HARDCODED_SEED_NODE("85.25.201.95:8080");
|
||||
ADD_HARDCODED_SEED_NODE("85.25.196.145:8080");
|
||||
ADD_HARDCODED_SEED_NODE("85.25.196.146:8080");
|
||||
ADD_HARDCODED_SEED_NODE("85.25.196.144:8080");
|
||||
ADD_HARDCODED_SEED_NODE("5.199.168.138:8080");
|
||||
ADD_HARDCODED_SEED_NODE("62.75.236.152:8080");
|
||||
ADD_HARDCODED_SEED_NODE("85.25.194.245:8080");
|
||||
ADD_HARDCODED_SEED_NODE("95.211.224.160:8080");
|
||||
ADD_HARDCODED_SEED_NODE("144.76.200.44:8080");
|
||||
ADD_HARDCODED_SEED_NODE("68.232.187.194:23080");
|
||||
ADD_HARDCODED_SEED_NODE("66.85.133.150:23080");
|
||||
|
||||
bool res = handle_command_line(vm);
|
||||
CHECK_AND_ASSERT_MES(res, false, "Failed to handle command line");
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
namespace nodetool
|
||||
{
|
||||
const static boost::uuids::uuid BYTECOIN_NETWORK = { { 0x11 ,0x10, 0x01, 0x11 , 0x11, 0x00 , 0x01, 0x01, 0x10, 0x11, 0x00, 0x12, 0x10, 0x11, 0x01, 0x10} }; //Bender's nightmare
|
||||
const static boost::uuids::uuid BYTECOIN_NETWORK = { { 0xAA ,0x10, 0xCC, 0x00 , 0x11, 0x00 , 0x01, 0x21, 0x10, 0xC0, 0x10, 0x12, 0x12, 0x55, 0x01, 0x1F} }; //Bender's nightmare
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue