From e3999735508132f0e3e36887622237c2d0c01d81 Mon Sep 17 00:00:00 2001 From: Albert Werner Date: Sat, 21 Jun 2014 17:41:43 +0400 Subject: [PATCH 1/9] Initial commit --- src/CMakeLists.txt | 4 +- src/common/base58.cpp | 2 +- src/common/base58.h | 2 +- src/common/boost_serialization_helper.h | 2 +- src/common/command_line.cpp | 2 +- src/common/command_line.h | 2 +- src/common/int-util.h | 2 +- src/common/pod-class.h | 2 +- ...unordered_containers_boost_serialization.h | 2 +- src/common/util.cpp | 2 +- src/common/util.h | 2 +- src/common/varint.h | 2 +- src/connectivity_tool/conn_tool.cpp | 2 +- src/crypto/chacha8.h | 2 +- src/crypto/crypto-ops-data.c | 2 +- src/crypto/crypto-ops.c | 2 +- src/crypto/crypto-ops.h | 2 +- src/crypto/crypto.cpp | 2 +- src/crypto/crypto.h | 2 +- src/crypto/generic-ops.h | 2 +- src/crypto/hash-extra-blake.c | 2 +- src/crypto/hash-extra-groestl.c | 2 +- src/crypto/hash-extra-jh.c | 2 +- src/crypto/hash-extra-skein.c | 2 +- src/crypto/hash-ops.h | 2 +- src/crypto/hash.c | 2 +- src/crypto/hash.h | 2 +- src/crypto/initializer.h | 2 +- src/crypto/slow-hash.c | 2 +- src/cryptonote_config.h | 43 ++-- src/cryptonote_core/SwappedMap.cpp | 4 + src/cryptonote_core/SwappedMap.h | 4 + src/cryptonote_core/SwappedVector.cpp | 4 + src/cryptonote_core/SwappedVector.h | 4 + src/cryptonote_core/account.cpp | 2 +- src/cryptonote_core/account.h | 2 +- .../account_boost_serialization.h | 2 +- src/cryptonote_core/blockchain_storage.cpp | 206 +----------------- src/cryptonote_core/blockchain_storage.h | 6 +- .../blockchain_storage_boost_serialization.h | 2 +- src/cryptonote_core/checkpoints.cpp | 2 +- src/cryptonote_core/checkpoints.h | 2 +- src/cryptonote_core/checkpoints_create.h | 18 +- src/cryptonote_core/connection_context.h | 2 +- src/cryptonote_core/cryptonote_basic.h | 2 +- src/cryptonote_core/cryptonote_basic_impl.cpp | 2 +- src/cryptonote_core/cryptonote_basic_impl.h | 2 +- .../cryptonote_boost_serialization.h | 2 +- src/cryptonote_core/cryptonote_core.cpp | 2 +- src/cryptonote_core/cryptonote_core.h | 2 +- .../cryptonote_format_utils.cpp | 11 +- src/cryptonote_core/cryptonote_format_utils.h | 2 +- src/cryptonote_core/cryptonote_stat_info.h | 2 +- src/cryptonote_core/difficulty.cpp | 2 +- src/cryptonote_core/difficulty.h | 2 +- src/cryptonote_core/miner.cpp | 2 +- src/cryptonote_core/miner.h | 2 +- src/cryptonote_core/tx_extra.h | 2 +- src/cryptonote_core/tx_pool.cpp | 2 +- src/cryptonote_core/tx_pool.h | 2 +- src/cryptonote_core/verification_context.h | 2 +- src/cryptonote_protocol/blobdatatype.h | 2 +- .../cryptonote_protocol_defs.h | 2 +- .../cryptonote_protocol_handler.h | 2 +- .../cryptonote_protocol_handler.inl | 2 +- .../cryptonote_protocol_handler_common.h | 2 +- src/daemon/daemon.cpp | 2 +- src/daemon/daemon_commands_handler.h | 2 +- src/miner/simpleminer.cpp | 2 +- src/miner/simpleminer.h | 2 +- src/miner/simpleminer_protocol_defs.h | 2 +- src/miner/target_helper.h | 2 +- src/p2p/net_node.h | 2 +- src/p2p/net_node.inl | 20 +- src/p2p/net_node_common.h | 2 +- src/p2p/net_peerlist.h | 2 +- src/p2p/net_peerlist_boost_serialization.h | 2 +- src/p2p/p2p_networks.h | 4 +- src/p2p/p2p_protocol_defs.h | 2 +- src/p2p/stdafx.h | 2 +- src/rpc/core_rpc_server.cpp | 2 +- src/rpc/core_rpc_server.h | 2 +- src/rpc/core_rpc_server_commands_defs.h | 2 +- src/rpc/core_rpc_server_error_codes.h | 2 +- src/serialization/binary_archive.h | 2 +- src/serialization/binary_utils.h | 2 +- src/serialization/crypto.h | 2 +- src/serialization/debug_archive.h | 2 +- src/serialization/json_archive.h | 2 +- src/serialization/json_utils.h | 2 +- src/serialization/serialization.h | 2 +- src/serialization/string.h | 2 +- src/serialization/variant.h | 2 +- src/serialization/vector.h | 2 +- src/simplewallet/password_container.cpp | 2 +- src/simplewallet/password_container.h | 2 +- src/simplewallet/simplewallet.cpp | 2 +- src/simplewallet/simplewallet.h | 2 +- src/wallet/wallet2.cpp | 2 +- src/wallet/wallet2.h | 2 +- src/wallet/wallet_errors.h | 2 +- src/wallet/wallet_rpc_server.cpp | 2 +- src/wallet/wallet_rpc_server.h | 2 +- src/wallet/wallet_rpc_server_commans_defs.h | 2 +- src/wallet/wallet_rpc_server_error_codes.h | 2 +- tests/core_proxy/core_proxy.cpp | 2 +- tests/core_proxy/core_proxy.h | 2 +- tests/core_tests/block_reward.cpp | 2 +- tests/core_tests/block_reward.h | 2 +- tests/core_tests/block_validation.cpp | 2 +- tests/core_tests/block_validation.h | 2 +- tests/core_tests/chain_split_1.cpp | 2 +- tests/core_tests/chain_split_1.h | 2 +- tests/core_tests/chain_switch_1.cpp | 2 +- tests/core_tests/chain_switch_1.h | 2 +- tests/core_tests/chaingen.cpp | 2 +- tests/core_tests/chaingen.h | 2 +- tests/core_tests/chaingen001.cpp | 2 +- tests/core_tests/chaingen_main.cpp | 2 +- tests/core_tests/chaingen_tests_list.h | 2 +- tests/core_tests/double_spend.cpp | 2 +- tests/core_tests/double_spend.h | 2 +- tests/core_tests/integer_overflow.cpp | 2 +- tests/core_tests/integer_overflow.h | 2 +- tests/core_tests/ring_signature_1.cpp | 2 +- tests/core_tests/ring_signature_1.h | 2 +- tests/core_tests/transaction_tests.cpp | 2 +- tests/core_tests/transaction_tests.h | 2 +- tests/core_tests/tx_validation.cpp | 2 +- tests/core_tests/tx_validation.h | 2 +- tests/crypto/crypto-ops-data.c | 2 +- tests/crypto/crypto-ops.c | 2 +- tests/crypto/crypto-tests.h | 2 +- tests/crypto/crypto.cpp | 2 +- tests/crypto/hash.c | 2 +- tests/crypto/main.cpp | 2 +- tests/crypto/random.c | 2 +- tests/daemon_tests/transfers.cpp | 2 +- tests/difficulty/difficulty.cpp | 2 +- tests/functional_tests/main.cpp | 2 +- .../transactions_flow_test.cpp | 2 +- .../functional_tests/transactions_flow_test.h | 2 +- ...ransactions_generation_from_blockchain.cpp | 2 +- .../transactions_generation_from_blockchain.h | 2 +- tests/hash-target.cpp | 2 +- tests/hash/main.cpp | 2 +- tests/io.h | 2 +- tests/net_load_tests/clt.cpp | 2 +- tests/net_load_tests/net_load_tests.h | 2 +- tests/net_load_tests/srv.cpp | 2 +- .../performance_tests/check_ring_signature.h | 2 +- tests/performance_tests/cn_slow_hash.h | 2 +- tests/performance_tests/construct_tx.h | 2 +- tests/performance_tests/derive_public_key.h | 2 +- tests/performance_tests/derive_secret_key.h | 2 +- .../generate_key_derivation.h | 2 +- tests/performance_tests/generate_key_image.h | 2 +- .../generate_key_image_helper.h | 2 +- tests/performance_tests/is_out_to_acc.h | 2 +- tests/performance_tests/main.cpp | 2 +- tests/performance_tests/multi_tx_test_base.h | 2 +- tests/performance_tests/performance_tests.h | 2 +- tests/performance_tests/performance_utils.h | 2 +- tests/performance_tests/single_tx_test_base.h | 2 +- tests/unit_tests/base58.cpp | 2 +- tests/unit_tests/block_reward.cpp | 2 +- tests/unit_tests/chacha8.cpp | 2 +- tests/unit_tests/checkpoints.cpp | 2 +- .../decompose_amount_into_digits.cpp | 2 +- tests/unit_tests/epee_boosted_tcp_server.cpp | 2 +- .../epee_levin_protocol_handler_async.cpp | 2 +- tests/unit_tests/get_xtype_from_string.cpp | 2 +- tests/unit_tests/main.cpp | 2 +- tests/unit_tests/mul_div.cpp | 2 +- tests/unit_tests/parse_amount.cpp | 2 +- tests/unit_tests/serialization.cpp | 2 +- tests/unit_tests/test_format_utils.cpp | 2 +- tests/unit_tests/test_peerlist.cpp | 2 +- tests/unit_tests/test_protocol_pack.cpp | 2 +- tests/unit_tests/unit_tests_utils.h | 2 +- 180 files changed, 238 insertions(+), 426 deletions(-) mode change 100644 => 100755 src/cryptonote_core/blockchain_storage.cpp mode change 100644 => 100755 src/cryptonote_core/blockchain_storage.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f890fcda91..04ff230e43 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,4 +43,6 @@ 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") +#TODO Specify the name of daemon for your currency +#set_property(TARGET daemon PROPERTY OUTPUT_NAME "cryptonoted") + diff --git a/src/common/base58.cpp b/src/common/base58.cpp index 454c0db676..fecca43249 100644 --- a/src/common/base58.cpp +++ b/src/common/base58.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/base58.h b/src/common/base58.h index 4055f62baf..4436550dd3 100644 --- a/src/common/base58.h +++ b/src/common/base58.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/boost_serialization_helper.h b/src/common/boost_serialization_helper.h index 0bf9248028..cdd5ceaec7 100644 --- a/src/common/boost_serialization_helper.h +++ b/src/common/boost_serialization_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/command_line.cpp b/src/common/command_line.cpp index 0b90345d95..5be588d897 100644 --- a/src/common/command_line.cpp +++ b/src/common/command_line.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/command_line.h b/src/common/command_line.h index 860653772f..bd3726e65b 100644 --- a/src/common/command_line.h +++ b/src/common/command_line.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/int-util.h b/src/common/int-util.h index db9e9bea7d..15cd1e9906 100644 --- a/src/common/int-util.h +++ b/src/common/int-util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/pod-class.h b/src/common/pod-class.h index c07edb2089..e1989356e7 100644 --- a/src/common/pod-class.h +++ b/src/common/pod-class.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/unordered_containers_boost_serialization.h b/src/common/unordered_containers_boost_serialization.h index 84fa73b924..45101a60af 100644 --- a/src/common/unordered_containers_boost_serialization.h +++ b/src/common/unordered_containers_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/util.cpp b/src/common/util.cpp index c9c470851c..5a1f50cb85 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/util.h b/src/common/util.h index 8a1f4b0414..0af40e2808 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/common/varint.h b/src/common/varint.h index e62470fdfa..a607d83205 100644 --- a/src/common/varint.h +++ b/src/common/varint.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/connectivity_tool/conn_tool.cpp b/src/connectivity_tool/conn_tool.cpp index 6743b4ae81..3d37f3117b 100644 --- a/src/connectivity_tool/conn_tool.cpp +++ b/src/connectivity_tool/conn_tool.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/chacha8.h b/src/crypto/chacha8.h index e4fe467992..7d1e39f375 100644 --- a/src/crypto/chacha8.h +++ b/src/crypto/chacha8.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/crypto-ops-data.c b/src/crypto/crypto-ops-data.c index 48bfe21a22..a3ded0c827 100644 --- a/src/crypto/crypto-ops-data.c +++ b/src/crypto/crypto-ops-data.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/crypto-ops.c b/src/crypto/crypto-ops.c index 97e7df50e1..919eb983bf 100644 --- a/src/crypto/crypto-ops.c +++ b/src/crypto/crypto-ops.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/crypto-ops.h b/src/crypto/crypto-ops.h index 9d07fc8b02..4639b517d6 100644 --- a/src/crypto/crypto-ops.h +++ b/src/crypto/crypto-ops.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/crypto.cpp b/src/crypto/crypto.cpp index f5f525700c..e25c966d66 100644 --- a/src/crypto/crypto.cpp +++ b/src/crypto/crypto.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h index 61641fbcfc..253ab98b9c 100644 --- a/src/crypto/crypto.h +++ b/src/crypto/crypto.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/generic-ops.h b/src/crypto/generic-ops.h index 8cade72a87..378500c247 100644 --- a/src/crypto/generic-ops.h +++ b/src/crypto/generic-ops.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/hash-extra-blake.c b/src/crypto/hash-extra-blake.c index 2eeb520208..50df08aa27 100644 --- a/src/crypto/hash-extra-blake.c +++ b/src/crypto/hash-extra-blake.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/hash-extra-groestl.c b/src/crypto/hash-extra-groestl.c index 7918cfc530..9d7b8b4306 100644 --- a/src/crypto/hash-extra-groestl.c +++ b/src/crypto/hash-extra-groestl.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/hash-extra-jh.c b/src/crypto/hash-extra-jh.c index 15c271b2a2..9bbe77c52d 100644 --- a/src/crypto/hash-extra-jh.c +++ b/src/crypto/hash-extra-jh.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/hash-extra-skein.c b/src/crypto/hash-extra-skein.c index 92361e6db4..60fbcccdca 100644 --- a/src/crypto/hash-extra-skein.c +++ b/src/crypto/hash-extra-skein.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/hash-ops.h b/src/crypto/hash-ops.h index 9e6c821efb..7a2a3d29a0 100644 --- a/src/crypto/hash-ops.h +++ b/src/crypto/hash-ops.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/hash.c b/src/crypto/hash.c index a3989d88c3..c86418d70e 100644 --- a/src/crypto/hash.c +++ b/src/crypto/hash.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/hash.h b/src/crypto/hash.h index fb65494b67..a5903cd035 100644 --- a/src/crypto/hash.h +++ b/src/crypto/hash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/initializer.h b/src/crypto/initializer.h index 8c84621bf3..611ae16c13 100644 --- a/src/crypto/initializer.h +++ b/src/crypto/initializer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index 468ba644be..06ef46d53a 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 958639a0ec..10ed771328 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -8,8 +8,10 @@ #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 +//TODO Define the first letter of your currency address +#define CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX +//TODO Choose maturity period for your currency +#define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW #define CURRENT_TRANSACTION_VERSION 1 #define CURRENT_BLOCK_MAJOR_VERSION 1 #define CURRENT_BLOCK_MINOR_VERSION 0 @@ -17,22 +19,26 @@ #define BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW 60 -// MONEY_SUPPLY - total number coins to be generated -#define MONEY_SUPPLY ((uint64_t)(-1)) +//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) +#define MONEY_SUPPLY #define EMISSION_SPEED_FACTOR (18) #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_COINBASE_BLOB_RESERVED_SIZE 600 #define CRYPTONOTE_DISPLAY_DECIMAL_POINT 8 -// 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) - +//TODO Define number of smallest units in one coin +#define COIN +//TODO Define default fee for transactions +#define DEFAULT_FEE +//TODO There are options to tune CryptoNote's difficulty retargeting function. +//TODO We recommend not to change it. #define DIFFICULTY_TARGET 120 // seconds #define DIFFICULTY_WINDOW 720 // blocks -#define DIFFICULTY_LAG 15 // !!! +#define DIFFICULTY_LAG 15 #define DIFFICULTY_CUT 60 // timestamps to cut after sorting #define DIFFICULTY_BLOCKS_COUNT DIFFICULTY_WINDOW + DIFFICULTY_LAG @@ -41,16 +47,17 @@ #define CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS 1 -#define DIFFICULTY_BLOCKS_ESTIMATE_TIMESPAN DIFFICULTY_TARGET //just alias +#define DIFFICULTY_BLOCKS_ESTIMATE_TIMESPAN DIFFICULTY_TARGET #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 #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 +//TODO This port will be used by the daemon to establish connections with p2p network +#define P2P_DEFAULT_PORT +//TODO This port will be used by the daemon to interact with simlewallet +#define RPC_DEFAULT_PORT #define COMMAND_RPC_GET_BLOCKS_FAST_MAX_COUNT 1000 #define P2P_LOCAL_WHITE_PEERLIST_LIMIT 1000 @@ -69,10 +76,12 @@ #define ALLOW_DEBUG_COMMANDS -#define CRYPTONOTE_NAME "bytecoin" +//TODO Put here the name of your currency +#define CRYPTONOTE_NAME +#define CRYPTONOTE_BLOCKS_FILENAME "blocks.dat" +#define CRYPTONOTE_BLOCKINDEXES_FILENAME "blockindexes.dat" +#define CRYPTONOTE_BLOCKSCACHE_FILENAME "blockscache.dat" #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" diff --git a/src/cryptonote_core/SwappedMap.cpp b/src/cryptonote_core/SwappedMap.cpp index 44ed6ef26d..d0b7aca109 100755 --- a/src/cryptonote_core/SwappedMap.cpp +++ b/src/cryptonote_core/SwappedMap.cpp @@ -1 +1,5 @@ +// Copyright (c) 2011-2014 The Cryptonote developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "SwappedMap.h" diff --git a/src/cryptonote_core/SwappedMap.h b/src/cryptonote_core/SwappedMap.h index f03bf5c949..d1faf60714 100755 --- a/src/cryptonote_core/SwappedMap.h +++ b/src/cryptonote_core/SwappedMap.h @@ -1,3 +1,7 @@ +// Copyright (c) 2011-2014 The Cryptonote developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #pragma once #include diff --git a/src/cryptonote_core/SwappedVector.cpp b/src/cryptonote_core/SwappedVector.cpp index df4e51568e..5c59a20220 100755 --- a/src/cryptonote_core/SwappedVector.cpp +++ b/src/cryptonote_core/SwappedVector.cpp @@ -1 +1,5 @@ +// Copyright (c) 2011-2014 The Cryptonote developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "SwappedVector.h" diff --git a/src/cryptonote_core/SwappedVector.h b/src/cryptonote_core/SwappedVector.h index 7285c7fe82..027fad58f8 100755 --- a/src/cryptonote_core/SwappedVector.h +++ b/src/cryptonote_core/SwappedVector.h @@ -1,3 +1,7 @@ +// Copyright (c) 2011-2014 The Cryptonote developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #pragma once #include diff --git a/src/cryptonote_core/account.cpp b/src/cryptonote_core/account.cpp index ba39b9b775..aa2efe80d0 100644 --- a/src/cryptonote_core/account.cpp +++ b/src/cryptonote_core/account.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/account.h b/src/cryptonote_core/account.h index 8b525da978..1e4dcddd40 100644 --- a/src/cryptonote_core/account.h +++ b/src/cryptonote_core/account.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/account_boost_serialization.h b/src/cryptonote_core/account_boost_serialization.h index 9cc36d14a6..261cea512d 100644 --- a/src/cryptonote_core/account_boost_serialization.h +++ b/src/cryptonote_core/account_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/blockchain_storage.cpp b/src/cryptonote_core/blockchain_storage.cpp old mode 100644 new mode 100755 index f569e5062c..214d77331e --- a/src/cryptonote_core/blockchain_storage.cpp +++ b/src/cryptonote_core/blockchain_storage.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -17,18 +17,6 @@ #include "file_io_utils.h" #include "common/boost_serialization_helper.h" -//namespace { -// std::string hashHex(const crypto::hash& hash) { -// std::string result; -// for (size_t i = 0; i < crypto::HASH_SIZE; ++i) { -// result += "0123456789ABCDEF"[static_cast(hash.data[i]) >> 4]; -// result += "0123456789ABCDEF"[static_cast(hash.data[i]) & 15]; -// } -// -// return result; -// } -//} - namespace { std::string appendPath(const std::string& path, const std::string& fileName) { std::string result = path; @@ -61,8 +49,6 @@ namespace cryptonote { uint64_t m_keeper_block_height; size_t m_blob_size; std::vector m_global_output_indexes; - - template void serialize(archive_t & ar, unsigned int version); }; struct block_extended_info { @@ -71,37 +57,7 @@ namespace cryptonote { size_t block_cumulative_size; difficulty_type cumulative_difficulty; uint64_t already_generated_coins; - - template void serialize(archive_t & ar, unsigned int version); }; - - template void transaction_chain_entry::serialize(archive_t & ar, unsigned int version) { - ar & tx; - ar & m_keeper_block_height; - ar & m_blob_size; - ar & m_global_output_indexes; - } - - template void block_extended_info::serialize(archive_t & ar, unsigned int version) { - ar & bl; - ar & height; - ar & cumulative_difficulty; - ar & block_cumulative_size; - ar & already_generated_coins; - } -} - -template void cryptonote::blockchain_storage::Transaction::serialize(Archive& archive, unsigned int version) { - archive & tx; -} - -template void cryptonote::blockchain_storage::Block::serialize(Archive& archive, unsigned int version) { - archive & bl; - archive & height; - archive & block_cumulative_size; - archive & cumulative_difficulty; - archive & already_generated_coins; - archive & transactions; } template void cryptonote::blockchain_storage::TransactionIndex::serialize(Archive& archive, unsigned int version) { @@ -109,87 +65,6 @@ template void cryptonote::blockchain_storage::TransactionIndex::s archive & transaction; } -namespace cryptonote { -#define CURRENT_BLOCKCHAIN_STORAGE_ARCHIVE_VER 13 - - template void blockchain_storage::serialize(archive_t & ar, const unsigned int version) { - CRITICAL_REGION_LOCAL(m_blockchain_lock); - if (version < 12) { - LOG_PRINT_L0("Detected blockchain of unsupported version, migration is not possible."); - return; - } - - LOG_PRINT_L0("Blockchain of previous version detected, migrating. This may take several minutes, please be patient..."); - - std::vector blocks; - ar & blocks; - - { - std::unordered_map blocks_index; - ar & blocks_index; - } - - std::unordered_map transactions; - ar & transactions; - - { - std::unordered_set spent_keys; - ar & spent_keys; - } - - { - std::unordered_map alternative_chains; - ar & alternative_chains; - } - - { - std::map>> outputs; - ar & outputs; - } - - { - std::unordered_map invalid_blocks; - ar & invalid_blocks; - } - - size_t current_block_cumul_sz_limit; - ar & current_block_cumul_sz_limit; - LOG_PRINT_L0("Old blockchain storage:" << ENDL << - "blocks: " << blocks.size() << ENDL << - "transactions: " << transactions.size() << ENDL << - "current_block_cumul_sz_limit: " << current_block_cumul_sz_limit); - - Block block; - Transaction transaction; - for (uint32_t b = 0; b < blocks.size(); ++b) { - block.bl = blocks[b].bl; - block.height = b; - block.block_cumulative_size = blocks[b].block_cumulative_size; - block.cumulative_difficulty = blocks[b].cumulative_difficulty; - block.already_generated_coins = blocks[b].already_generated_coins; - block.transactions.resize(1 + blocks[b].bl.tx_hashes.size()); - block.transactions[0].tx = blocks[b].bl.miner_tx; - TransactionIndex transactionIndex = { b, 0 }; - pushTransaction(block, get_transaction_hash(blocks[b].bl.miner_tx), transactionIndex); - for (uint32_t t = 0; t < blocks[b].bl.tx_hashes.size(); ++t) { - block.transactions[1 + t].tx = transactions[blocks[b].bl.tx_hashes[t]].tx; - transactionIndex.transaction = 1 + t; - pushTransaction(block, blocks[b].bl.tx_hashes[t], transactionIndex); - } - - pushBlock(block); - } - - update_next_comulative_size_limit(); - if (m_current_block_cumul_sz_limit != current_block_cumul_sz_limit) { - LOG_ERROR("Migration was unsuccessful."); - } - } -} - -BOOST_CLASS_VERSION(cryptonote::blockchain_storage, CURRENT_BLOCKCHAIN_STORAGE_ARCHIVE_VER) - - bool blockchain_storage::have_tx(const crypto::hash &id) { CRITICAL_REGION_LOCAL(m_blockchain_lock); return m_transactionMap.find(id) != m_transactionMap.end(); @@ -209,19 +84,16 @@ bool blockchain_storage::init(const std::string& config_folder) { CRITICAL_REGION_LOCAL(m_blockchain_lock); m_config_folder = config_folder; LOG_PRINT_L0("Loading blockchain..."); - if (!m_blocks.open(appendPath(config_folder, "blocks.dat"), appendPath(config_folder, "blockindexes.dat"), 1024)) { + if (!m_blocks.open(appendPath(config_folder, CRYPTONOTE_BLOCKS_FILENAME), appendPath(config_folder, CRYPTONOTE_BLOCKINDEXES_FILENAME), 1024)) { return false; } if (m_blocks.empty()) { - const std::string filename = appendPath(m_config_folder, CRYPTONOTE_BLOCKCHAINDATA_FILENAME); - if (!tools::unserialize_obj_from_file(*this, filename)) { - LOG_PRINT_L0("Can't load blockchain storage from file."); - } + LOG_PRINT_L0("Can't load blockchain storage from file."); } else { bool rebuild = true; try { - std::ifstream file(appendPath(config_folder, "blockscache.dat"), std::ios::binary); + std::ifstream file(appendPath(config_folder, CRYPTONOTE_BLOCKSCACHE_FILENAME), std::ios::binary); boost::archive::binary_iarchive archive(file); crypto::hash lastBlockHash; archive & lastBlockHash; @@ -282,7 +154,7 @@ bool blockchain_storage::init(const std::string& config_folder) { bool blockchain_storage::store_blockchain() { try { - std::ofstream file(appendPath(m_config_folder, "blockscache.dat"), std::ios::binary); + std::ofstream file(appendPath(m_config_folder, CRYPTONOTE_BLOCKSCACHE_FILENAME), std::ios::binary); boost::archive::binary_oarchive archive(file); crypto::hash lastBlockHash = get_block_hash(m_blocks.back().bl); archive & lastBlockHash; @@ -290,73 +162,9 @@ bool blockchain_storage::store_blockchain() { archive & m_transactionMap; archive & m_spent_keys; archive & m_outputs; + LOG_PRINT_L0("Saved blockchain cache."); } catch (std::exception& e) { - LOG_ERROR("Failed to save blockchain, " << e.what()); - } - - //{ - // std::ofstream file(appendPath(m_config_folder, "blockscache2.dat"), std::ios::binary); - - // crypto::hash lastBlockHash = get_block_hash(m_blocks.back().bl); - // file.write(reinterpret_cast(&lastBlockHash), sizeof(lastBlockHash)); - - // uint32_t blockMapSize = m_blockMap.size(); - // file.write(reinterpret_cast(&blockMapSize), sizeof(blockMapSize)); - // for (auto& i : m_blockMap) { - // crypto::hash blockHash = i.first; - // file.write(reinterpret_cast(&blockHash), sizeof(blockHash)); - - // uint32_t blockIndex = i.second; - // file.write(reinterpret_cast(&blockIndex), sizeof(blockIndex)); - // } - - // uint32_t transactionMapSize = m_transactionMap.size(); - // file.write(reinterpret_cast(&transactionMapSize), sizeof(transactionMapSize)); - // for (auto& i : m_transactionMap) { - // crypto::hash transactionHash = i.first; - // file.write(reinterpret_cast(&transactionHash), sizeof(transactionHash)); - - // uint32_t blockIndex = i.second.block; - // file.write(reinterpret_cast(&blockIndex), sizeof(blockIndex)); - - // uint32_t transactionIndex = i.second.transaction; - // file.write(reinterpret_cast(&transactionIndex), sizeof(transactionIndex)); - // } - - // uint32_t spentKeysSize = m_spent_keys.size(); - // file.write(reinterpret_cast(&spentKeysSize), sizeof(spentKeysSize)); - // for (auto& i : m_spent_keys) { - // crypto::key_image key = i; - // file.write(reinterpret_cast(&key), sizeof(key)); - // } - - // uint32_t outputsSize = m_outputs.size(); - // file.write(reinterpret_cast(&outputsSize), sizeof(outputsSize)); - // for (auto& i : m_outputs) { - // uint32_t indexesSize = i.second.size(); - // file.write(reinterpret_cast(&indexesSize), sizeof(indexesSize)); - // for (auto& j : i.second) { - // uint32_t blockIndex = j.first.block; - // file.write(reinterpret_cast(&blockIndex), sizeof(blockIndex)); - - // uint32_t transactionIndex = j.first.transaction; - // file.write(reinterpret_cast(&transactionIndex), sizeof(transactionIndex)); - - // uint32_t outputIndex = j.second; - // file.write(reinterpret_cast(&outputIndex), sizeof(outputIndex)); - // } - // } - //} - - { - //std::ofstream file(appendPath(m_config_folder, "blockscache3.dat"), std::ios::binary); - //binary_archive archive(file); - //crypto::hash lastBlockHash = get_block_hash(m_blocks.back().bl); - //do_serialize(archive, lastBlockHash); - //do_serialize(archive, m_blockMap); - //do_serialize(archive, m_transactionMap); - //do_serialize(archive, m_spent_keys); - //do_serialize(archive, m_outputs); + LOG_ERROR("Failed to save blockchain cache, " << e.what()); } return true; diff --git a/src/cryptonote_core/blockchain_storage.h b/src/cryptonote_core/blockchain_storage.h old mode 100644 new mode 100755 index 1cbb3dabdc..4890c65659 --- a/src/cryptonote_core/blockchain_storage.h +++ b/src/cryptonote_core/blockchain_storage.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -105,8 +105,6 @@ namespace cryptonote { transaction tx; std::vector m_global_output_indexes; - template void serialize(archive_t & ar, unsigned int version); - BEGIN_SERIALIZE_OBJECT() FIELD(tx) FIELD(m_global_output_indexes) @@ -121,8 +119,6 @@ namespace cryptonote { uint64_t already_generated_coins; std::vector transactions; - template void serialize(Archive& archive, unsigned int version); - BEGIN_SERIALIZE_OBJECT() FIELD(bl) VARINT_FIELD(height) diff --git a/src/cryptonote_core/blockchain_storage_boost_serialization.h b/src/cryptonote_core/blockchain_storage_boost_serialization.h index 3f0c94b390..77e4c7261c 100644 --- a/src/cryptonote_core/blockchain_storage_boost_serialization.h +++ b/src/cryptonote_core/blockchain_storage_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/checkpoints.cpp b/src/cryptonote_core/checkpoints.cpp index 33a2d29864..532e23cfeb 100644 --- a/src/cryptonote_core/checkpoints.cpp +++ b/src/cryptonote_core/checkpoints.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/checkpoints.h b/src/cryptonote_core/checkpoints.h index 1bc055d913..8db10bf937 100644 --- a/src/cryptonote_core/checkpoints.h +++ b/src/cryptonote_core/checkpoints.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/checkpoints_create.h b/src/cryptonote_core/checkpoints_create.h index 60e20e24be..854375808e 100644 --- a/src/cryptonote_core/checkpoints_create.h +++ b/src/cryptonote_core/checkpoints_create.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -12,22 +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"); - ADD_CHECKPOINT(480200, "363544ac9920c778b815c2fdbcbca70a0d79b21f662913a42da9b49e859f0e5b"); - ADD_CHECKPOINT(484500, "5cdf2101a0a62a0ab2a1ca0c15a6212b21f6dbdc42a0b7c0bcf65ca40b7a14fb"); - ADD_CHECKPOINT(506000, "3d54c1132f503d98d3f0d78bb46a4503c1a19447cb348361a2232e241cb45a3c"); - return true; } } diff --git a/src/cryptonote_core/connection_context.h b/src/cryptonote_core/connection_context.h index 53cac992d0..f334b14cc7 100644 --- a/src/cryptonote_core/connection_context.h +++ b/src/cryptonote_core/connection_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/cryptonote_basic.h b/src/cryptonote_core/cryptonote_basic.h index 007e62bbdf..8546329cbc 100644 --- a/src/cryptonote_core/cryptonote_basic.h +++ b/src/cryptonote_core/cryptonote_basic.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/cryptonote_basic_impl.cpp b/src/cryptonote_core/cryptonote_basic_impl.cpp index 348384c8fc..0fef9a895f 100644 --- a/src/cryptonote_core/cryptonote_basic_impl.cpp +++ b/src/cryptonote_core/cryptonote_basic_impl.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/cryptonote_basic_impl.h b/src/cryptonote_core/cryptonote_basic_impl.h index 27251ef54e..270eff6511 100644 --- a/src/cryptonote_core/cryptonote_basic_impl.h +++ b/src/cryptonote_core/cryptonote_basic_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/cryptonote_boost_serialization.h b/src/cryptonote_core/cryptonote_boost_serialization.h index 80c4978444..a0a9cd9155 100644 --- a/src/cryptonote_core/cryptonote_boost_serialization.h +++ b/src/cryptonote_core/cryptonote_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 2e46c99bd8..a5a06fa097 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/cryptonote_core.h b/src/cryptonote_core/cryptonote_core.h index 056aa0743c..e4a2764dbf 100644 --- a/src/cryptonote_core/cryptonote_core.h +++ b/src/cryptonote_core/cryptonote_core.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index 5b6fadf25d..8592fed488 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -622,15 +622,20 @@ namespace cryptonote //genesis block bl = boost::value_initialized(); - + //TODO Uncomment this code block on teh first network lounch. It will generate and print you genesis block's hash. + //TODO Then you must copy it and put to genesis_coinbase_tx_hex variable + /* account_public_address ac = boost::value_initialized(); std::vector sz; construct_miner_tx(0, 0, 0, 0, 0, ac, bl.miner_tx); // zero fee in genesis blobdata txb = tx_to_blob(bl.miner_tx); std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb); + std::cout << "Genesis block hex: " << hex_to_represent << endl; + */ //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"; + //TODO After you obtain hash of the genesis block put it here and recompile sources! + std::string genesis_coinbase_tx_hex = ""; blobdata tx_bl; string_tools::parse_hexstr_to_binbuff(genesis_coinbase_tx_hex, tx_bl); diff --git a/src/cryptonote_core/cryptonote_format_utils.h b/src/cryptonote_core/cryptonote_format_utils.h index 662e160ea3..01939536c5 100644 --- a/src/cryptonote_core/cryptonote_format_utils.h +++ b/src/cryptonote_core/cryptonote_format_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/cryptonote_stat_info.h b/src/cryptonote_core/cryptonote_stat_info.h index 9d406748cd..0cdee0f7b4 100644 --- a/src/cryptonote_core/cryptonote_stat_info.h +++ b/src/cryptonote_core/cryptonote_stat_info.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/difficulty.cpp b/src/cryptonote_core/difficulty.cpp index 3dde6ad6c1..2774c50582 100644 --- a/src/cryptonote_core/difficulty.cpp +++ b/src/cryptonote_core/difficulty.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/difficulty.h b/src/cryptonote_core/difficulty.h index aad1e27ca1..d38580e3f0 100644 --- a/src/cryptonote_core/difficulty.h +++ b/src/cryptonote_core/difficulty.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/miner.cpp b/src/cryptonote_core/miner.cpp index fdc1545746..8d06c90d85 100644 --- a/src/cryptonote_core/miner.cpp +++ b/src/cryptonote_core/miner.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/miner.h b/src/cryptonote_core/miner.h index 61c063ddf8..3d38fb4b4a 100644 --- a/src/cryptonote_core/miner.h +++ b/src/cryptonote_core/miner.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/tx_extra.h b/src/cryptonote_core/tx_extra.h index 37a04a41e7..bf96482361 100644 --- a/src/cryptonote_core/tx_extra.h +++ b/src/cryptonote_core/tx_extra.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 24e5752ad6..d88faf0c5c 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h index 26d273aa70..8f3deb791b 100644 --- a/src/cryptonote_core/tx_pool.h +++ b/src/cryptonote_core/tx_pool.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_core/verification_context.h b/src/cryptonote_core/verification_context.h index 210cc2d5b1..09f40aecfb 100644 --- a/src/cryptonote_core/verification_context.h +++ b/src/cryptonote_core/verification_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_protocol/blobdatatype.h b/src/cryptonote_protocol/blobdatatype.h index 23111f0487..80c6d4c2fd 100644 --- a/src/cryptonote_protocol/blobdatatype.h +++ b/src/cryptonote_protocol/blobdatatype.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_protocol/cryptonote_protocol_defs.h b/src/cryptonote_protocol/cryptonote_protocol_defs.h index d646a7f6fe..f1f25d4b52 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_defs.h +++ b/src/cryptonote_protocol/cryptonote_protocol_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.h b/src/cryptonote_protocol/cryptonote_protocol_handler.h index 80538677cd..8129ab0b80 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 2584f10971..793a9cfbe7 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler_common.h b/src/cryptonote_protocol/cryptonote_protocol_handler_common.h index f1ced5050d..d2b71247cd 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler_common.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler_common.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 329f44e7fe..22871b1565 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/daemon/daemon_commands_handler.h b/src/daemon/daemon_commands_handler.h index 81d34b473c..7b701e7e5a 100644 --- a/src/daemon/daemon_commands_handler.h +++ b/src/daemon/daemon_commands_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/miner/simpleminer.cpp b/src/miner/simpleminer.cpp index a1c1ad5c68..40ca514a07 100644 --- a/src/miner/simpleminer.cpp +++ b/src/miner/simpleminer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/miner/simpleminer.h b/src/miner/simpleminer.h index 803ea12fba..43e1596d26 100644 --- a/src/miner/simpleminer.h +++ b/src/miner/simpleminer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/miner/simpleminer_protocol_defs.h b/src/miner/simpleminer_protocol_defs.h index 06b6a90535..bc48f52e97 100644 --- a/src/miner/simpleminer_protocol_defs.h +++ b/src/miner/simpleminer_protocol_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/miner/target_helper.h b/src/miner/target_helper.h index 5ac6eed143..08827e135a 100644 --- a/src/miner/target_helper.h +++ b/src/miner/target_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index 5a03b049f1..74b9490f10 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 5c60be0af6..89ae6ddd1c 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -193,16 +193,8 @@ namespace nodetool template bool node_server::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"); + //TODO add seed for your network + //ADD_HARDCODED_SEED_NODE("your_seed_ip.com:8080"); bool res = handle_command_line(vm); CHECK_AND_ASSERT_MES(res, false, "Failed to handle command line"); @@ -376,7 +368,7 @@ namespace nodetool return; } - if(rsp.node_data.network_id != BYTECOIN_NETWORK) + if(rsp.node_data.network_id != CRYPTONOTE_NETWORK) { LOG_ERROR_CCONTEXT("COMMAND_HANDSHAKE Failed, wrong network! (" << epee::string_tools::get_str_from_guid_a(rsp.node_data.network_id) << "), closing connection."); return; @@ -784,7 +776,7 @@ namespace nodetool node_data.my_port = m_external_port ? m_external_port : m_listenning_port; else node_data.my_port = 0; - node_data.network_id = BYTECOIN_NETWORK; + node_data.network_id = CRYPTONOTE_NETWORK; return true; } //----------------------------------------------------------------------------------- @@ -1004,7 +996,7 @@ namespace nodetool template int node_server::handle_handshake(int command, typename COMMAND_HANDSHAKE::request& arg, typename COMMAND_HANDSHAKE::response& rsp, p2p_connection_context& context) { - if(arg.node_data.network_id != BYTECOIN_NETWORK) + if(arg.node_data.network_id != CRYPTONOTE_NETWORK) { LOG_PRINT_CCONTEXT_L0("WRONG NETWORK AGENT CONNECTED! id=" << epee::string_tools::get_str_from_guid_a(arg.node_data.network_id)); diff --git a/src/p2p/net_node_common.h b/src/p2p/net_node_common.h index 17ae20cbe8..24e7e47e73 100644 --- a/src/p2p/net_node_common.h +++ b/src/p2p/net_node_common.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/p2p/net_peerlist.h b/src/p2p/net_peerlist.h index ea541fcbc2..dcd6fed5c9 100644 --- a/src/p2p/net_peerlist.h +++ b/src/p2p/net_peerlist.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/p2p/net_peerlist_boost_serialization.h b/src/p2p/net_peerlist_boost_serialization.h index 23a253f252..b8e3e7da92 100644 --- a/src/p2p/net_peerlist_boost_serialization.h +++ b/src/p2p/net_peerlist_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/p2p/p2p_networks.h b/src/p2p/p2p_networks.h index 3fa4090066..1d7bcbf78c 100644 --- a/src/p2p/p2p_networks.h +++ b/src/p2p/p2p_networks.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -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 CRYPTONOTE_NETWORK = { { 0x11 ,0x10, 0x01, 0x11 , 0x11, 0x00 , 0x01, 0x01, 0x10, 0x11, 0x00, 0x12, 0x10, 0x11, 0x01, 0x10} }; } diff --git a/src/p2p/p2p_protocol_defs.h b/src/p2p/p2p_protocol_defs.h index fdf784f495..89387ba1fb 100644 --- a/src/p2p/p2p_protocol_defs.h +++ b/src/p2p/p2p_protocol_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/p2p/stdafx.h b/src/p2p/stdafx.h index 1cc72f811c..35684fcd5e 100644 --- a/src/p2p/stdafx.h +++ b/src/p2p/stdafx.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 07f4a1cb9d..86540fe2e7 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/rpc/core_rpc_server.h b/src/rpc/core_rpc_server.h index 7b14e741a8..65655a8a95 100644 --- a/src/rpc/core_rpc_server.h +++ b/src/rpc/core_rpc_server.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index d67ebfdd7a..ed671d6f83 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/rpc/core_rpc_server_error_codes.h b/src/rpc/core_rpc_server_error_codes.h index 10785f8aba..c732603538 100644 --- a/src/rpc/core_rpc_server_error_codes.h +++ b/src/rpc/core_rpc_server_error_codes.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/binary_archive.h b/src/serialization/binary_archive.h index f28e45c0c1..72c2e5ad97 100644 --- a/src/serialization/binary_archive.h +++ b/src/serialization/binary_archive.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/binary_utils.h b/src/serialization/binary_utils.h index 00bb1741d6..3e2eae6d49 100644 --- a/src/serialization/binary_utils.h +++ b/src/serialization/binary_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/crypto.h b/src/serialization/crypto.h index 6e683e6298..db587b37b0 100644 --- a/src/serialization/crypto.h +++ b/src/serialization/crypto.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/debug_archive.h b/src/serialization/debug_archive.h index 08baee0169..0c8fde6ba8 100644 --- a/src/serialization/debug_archive.h +++ b/src/serialization/debug_archive.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/json_archive.h b/src/serialization/json_archive.h index 49ad74d412..902c582129 100644 --- a/src/serialization/json_archive.h +++ b/src/serialization/json_archive.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/json_utils.h b/src/serialization/json_utils.h index 24f5c11a81..1ce0a8199c 100644 --- a/src/serialization/json_utils.h +++ b/src/serialization/json_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/serialization.h b/src/serialization/serialization.h index 7024fdc03f..92175a3324 100644 --- a/src/serialization/serialization.h +++ b/src/serialization/serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/string.h b/src/serialization/string.h index 437cf1c778..780ab7fcd6 100644 --- a/src/serialization/string.h +++ b/src/serialization/string.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/variant.h b/src/serialization/variant.h index 3b92fde202..b8235ac295 100644 --- a/src/serialization/variant.h +++ b/src/serialization/variant.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialization/vector.h b/src/serialization/vector.h index d074723525..8363be4638 100644 --- a/src/serialization/vector.h +++ b/src/serialization/vector.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/simplewallet/password_container.cpp b/src/simplewallet/password_container.cpp index 0b9dc1cdff..66db560cde 100644 --- a/src/simplewallet/password_container.cpp +++ b/src/simplewallet/password_container.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/simplewallet/password_container.h b/src/simplewallet/password_container.h index 2e99d9a62f..5c7133aef5 100644 --- a/src/simplewallet/password_container.h +++ b/src/simplewallet/password_container.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 4c6a736025..e6dceb378b 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 2500553f09..0d2b4d5cac 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 111b761171..83ab6e7c87 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index d2016f6961..ee053891d7 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h index 7189ca9f28..747005828d 100644 --- a/src/wallet/wallet_errors.h +++ b/src/wallet/wallet_errors.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index f1766c3b44..502dabd212 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/wallet_rpc_server.h b/src/wallet/wallet_rpc_server.h index db49df574c..f7ed43de89 100644 --- a/src/wallet/wallet_rpc_server.h +++ b/src/wallet/wallet_rpc_server.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/wallet_rpc_server_commans_defs.h b/src/wallet/wallet_rpc_server_commans_defs.h index b99d92ca28..92846722ed 100644 --- a/src/wallet/wallet_rpc_server_commans_defs.h +++ b/src/wallet/wallet_rpc_server_commans_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/wallet_rpc_server_error_codes.h b/src/wallet/wallet_rpc_server_error_codes.h index 7fa536dac9..11ec50c3ff 100644 --- a/src/wallet/wallet_rpc_server_error_codes.h +++ b/src/wallet/wallet_rpc_server_error_codes.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_proxy/core_proxy.cpp b/tests/core_proxy/core_proxy.cpp index caf4bf8377..f0a6eb2e15 100644 --- a/tests/core_proxy/core_proxy.cpp +++ b/tests/core_proxy/core_proxy.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h index d5be53f1da..aaf8abee18 100644 --- a/tests/core_proxy/core_proxy.h +++ b/tests/core_proxy/core_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/block_reward.cpp b/tests/core_tests/block_reward.cpp index 7950738a67..204fcafcde 100644 --- a/tests/core_tests/block_reward.cpp +++ b/tests/core_tests/block_reward.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/block_reward.h b/tests/core_tests/block_reward.h index 506d7466c6..b0b69e0546 100644 --- a/tests/core_tests/block_reward.h +++ b/tests/core_tests/block_reward.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/block_validation.cpp b/tests/core_tests/block_validation.cpp index 57e1471330..91c4b5afdf 100644 --- a/tests/core_tests/block_validation.cpp +++ b/tests/core_tests/block_validation.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/block_validation.h b/tests/core_tests/block_validation.h index fe5b859a7e..df9f99c358 100644 --- a/tests/core_tests/block_validation.h +++ b/tests/core_tests/block_validation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/chain_split_1.cpp b/tests/core_tests/chain_split_1.cpp index bd598852e6..e820bb120c 100644 --- a/tests/core_tests/chain_split_1.cpp +++ b/tests/core_tests/chain_split_1.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/chain_split_1.h b/tests/core_tests/chain_split_1.h index df7efea82b..8289bc306d 100644 --- a/tests/core_tests/chain_split_1.h +++ b/tests/core_tests/chain_split_1.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/chain_switch_1.cpp b/tests/core_tests/chain_switch_1.cpp index 8e9a2c1dbf..abfd848800 100644 --- a/tests/core_tests/chain_switch_1.cpp +++ b/tests/core_tests/chain_switch_1.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/chain_switch_1.h b/tests/core_tests/chain_switch_1.h index 05e84e6cff..449d526e20 100644 --- a/tests/core_tests/chain_switch_1.h +++ b/tests/core_tests/chain_switch_1.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp index 124800db78..222c6d6ea0 100644 --- a/tests/core_tests/chaingen.cpp +++ b/tests/core_tests/chaingen.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index 3d47edeef6..09aedb78f0 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/chaingen001.cpp b/tests/core_tests/chaingen001.cpp index f79420e691..cee347723f 100644 --- a/tests/core_tests/chaingen001.cpp +++ b/tests/core_tests/chaingen001.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/chaingen_main.cpp b/tests/core_tests/chaingen_main.cpp index e6f287d74f..8eff20f628 100644 --- a/tests/core_tests/chaingen_main.cpp +++ b/tests/core_tests/chaingen_main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/chaingen_tests_list.h b/tests/core_tests/chaingen_tests_list.h index d56f78121e..383ea768f6 100644 --- a/tests/core_tests/chaingen_tests_list.h +++ b/tests/core_tests/chaingen_tests_list.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/double_spend.cpp b/tests/core_tests/double_spend.cpp index 9a007ce261..9852ae1427 100644 --- a/tests/core_tests/double_spend.cpp +++ b/tests/core_tests/double_spend.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/double_spend.h b/tests/core_tests/double_spend.h index e43cc2ed34..1f1c79310a 100644 --- a/tests/core_tests/double_spend.h +++ b/tests/core_tests/double_spend.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/integer_overflow.cpp b/tests/core_tests/integer_overflow.cpp index 5c619e97c9..319cabb317 100644 --- a/tests/core_tests/integer_overflow.cpp +++ b/tests/core_tests/integer_overflow.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/integer_overflow.h b/tests/core_tests/integer_overflow.h index 0e00ada323..f093cbfc65 100644 --- a/tests/core_tests/integer_overflow.h +++ b/tests/core_tests/integer_overflow.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/ring_signature_1.cpp b/tests/core_tests/ring_signature_1.cpp index bfdaf38f00..d62b95a053 100644 --- a/tests/core_tests/ring_signature_1.cpp +++ b/tests/core_tests/ring_signature_1.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/ring_signature_1.h b/tests/core_tests/ring_signature_1.h index 1d74f68026..7f1c8bcd5a 100644 --- a/tests/core_tests/ring_signature_1.h +++ b/tests/core_tests/ring_signature_1.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/transaction_tests.cpp b/tests/core_tests/transaction_tests.cpp index 635c41503e..56c7caab1e 100644 --- a/tests/core_tests/transaction_tests.cpp +++ b/tests/core_tests/transaction_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/transaction_tests.h b/tests/core_tests/transaction_tests.h index 460192802d..3e3dbac2ec 100644 --- a/tests/core_tests/transaction_tests.h +++ b/tests/core_tests/transaction_tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/tx_validation.cpp b/tests/core_tests/tx_validation.cpp index 93cb68c95d..98e8bcefc7 100644 --- a/tests/core_tests/tx_validation.cpp +++ b/tests/core_tests/tx_validation.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/core_tests/tx_validation.h b/tests/core_tests/tx_validation.h index e1939c0492..13748d3120 100644 --- a/tests/core_tests/tx_validation.h +++ b/tests/core_tests/tx_validation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/crypto/crypto-ops-data.c b/tests/crypto/crypto-ops-data.c index 5622acd03f..5b11f5390f 100644 --- a/tests/crypto/crypto-ops-data.c +++ b/tests/crypto/crypto-ops-data.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/crypto/crypto-ops.c b/tests/crypto/crypto-ops.c index b21e2e03a4..cbd517a1b1 100644 --- a/tests/crypto/crypto-ops.c +++ b/tests/crypto/crypto-ops.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/crypto/crypto-tests.h b/tests/crypto/crypto-tests.h index 80f658228c..26acb75448 100644 --- a/tests/crypto/crypto-tests.h +++ b/tests/crypto/crypto-tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/crypto/crypto.cpp b/tests/crypto/crypto.cpp index cbc5879ca1..ffb11210c4 100644 --- a/tests/crypto/crypto.cpp +++ b/tests/crypto/crypto.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/crypto/hash.c b/tests/crypto/hash.c index 6981f2be95..b952890632 100644 --- a/tests/crypto/hash.c +++ b/tests/crypto/hash.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/crypto/main.cpp b/tests/crypto/main.cpp index 5cb5c9ceba..9fb48c326c 100644 --- a/tests/crypto/main.cpp +++ b/tests/crypto/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/crypto/random.c b/tests/crypto/random.c index 05d7cf5ff7..d14dfeddf7 100644 --- a/tests/crypto/random.c +++ b/tests/crypto/random.c @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/daemon_tests/transfers.cpp b/tests/daemon_tests/transfers.cpp index 23b8b8335a..d87cf540f8 100644 --- a/tests/daemon_tests/transfers.cpp +++ b/tests/daemon_tests/transfers.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/difficulty/difficulty.cpp b/tests/difficulty/difficulty.cpp index 2af2f79769..bc30607d0e 100644 --- a/tests/difficulty/difficulty.cpp +++ b/tests/difficulty/difficulty.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/functional_tests/main.cpp b/tests/functional_tests/main.cpp index 330e7ef2fe..e1cbac3e6d 100644 --- a/tests/functional_tests/main.cpp +++ b/tests/functional_tests/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/functional_tests/transactions_flow_test.cpp b/tests/functional_tests/transactions_flow_test.cpp index 4c6d5b07f4..b96f4fc0c2 100644 --- a/tests/functional_tests/transactions_flow_test.cpp +++ b/tests/functional_tests/transactions_flow_test.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/functional_tests/transactions_flow_test.h b/tests/functional_tests/transactions_flow_test.h index 8f9061b92e..a8786db9f3 100644 --- a/tests/functional_tests/transactions_flow_test.h +++ b/tests/functional_tests/transactions_flow_test.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/functional_tests/transactions_generation_from_blockchain.cpp b/tests/functional_tests/transactions_generation_from_blockchain.cpp index de2ef541f2..de88d5c9f4 100644 --- a/tests/functional_tests/transactions_generation_from_blockchain.cpp +++ b/tests/functional_tests/transactions_generation_from_blockchain.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/functional_tests/transactions_generation_from_blockchain.h b/tests/functional_tests/transactions_generation_from_blockchain.h index 64438488cc..0cc2224aef 100644 --- a/tests/functional_tests/transactions_generation_from_blockchain.h +++ b/tests/functional_tests/transactions_generation_from_blockchain.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/hash-target.cpp b/tests/hash-target.cpp index 208bb04a80..0234695cc2 100644 --- a/tests/hash-target.cpp +++ b/tests/hash-target.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/hash/main.cpp b/tests/hash/main.cpp index 6c898c9fc7..e730cfee56 100644 --- a/tests/hash/main.cpp +++ b/tests/hash/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/io.h b/tests/io.h index 64f2bae77d..c59e7ef971 100644 --- a/tests/io.h +++ b/tests/io.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/net_load_tests/clt.cpp b/tests/net_load_tests/clt.cpp index 9c153a2999..bf5a506c15 100644 --- a/tests/net_load_tests/clt.cpp +++ b/tests/net_load_tests/clt.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/net_load_tests/net_load_tests.h b/tests/net_load_tests/net_load_tests.h index 3d95698354..4a29b0f73c 100644 --- a/tests/net_load_tests/net_load_tests.h +++ b/tests/net_load_tests/net_load_tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/net_load_tests/srv.cpp b/tests/net_load_tests/srv.cpp index 52895c9dd3..6444062e11 100644 --- a/tests/net_load_tests/srv.cpp +++ b/tests/net_load_tests/srv.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/check_ring_signature.h b/tests/performance_tests/check_ring_signature.h index dafa172e37..e9ef3d0abb 100644 --- a/tests/performance_tests/check_ring_signature.h +++ b/tests/performance_tests/check_ring_signature.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/cn_slow_hash.h b/tests/performance_tests/cn_slow_hash.h index ec001326e3..16691154a8 100644 --- a/tests/performance_tests/cn_slow_hash.h +++ b/tests/performance_tests/cn_slow_hash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/construct_tx.h b/tests/performance_tests/construct_tx.h index 1e70059410..ceb344148e 100644 --- a/tests/performance_tests/construct_tx.h +++ b/tests/performance_tests/construct_tx.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/derive_public_key.h b/tests/performance_tests/derive_public_key.h index ec9d64e092..dfa0118975 100644 --- a/tests/performance_tests/derive_public_key.h +++ b/tests/performance_tests/derive_public_key.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/derive_secret_key.h b/tests/performance_tests/derive_secret_key.h index bd915846da..4315a7d5bd 100644 --- a/tests/performance_tests/derive_secret_key.h +++ b/tests/performance_tests/derive_secret_key.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/generate_key_derivation.h b/tests/performance_tests/generate_key_derivation.h index c2fce687d5..dd7f7b63dc 100644 --- a/tests/performance_tests/generate_key_derivation.h +++ b/tests/performance_tests/generate_key_derivation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/generate_key_image.h b/tests/performance_tests/generate_key_image.h index f6a00ffe35..f8d26038ef 100644 --- a/tests/performance_tests/generate_key_image.h +++ b/tests/performance_tests/generate_key_image.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/generate_key_image_helper.h b/tests/performance_tests/generate_key_image_helper.h index 1c072f4430..cc41838c6c 100644 --- a/tests/performance_tests/generate_key_image_helper.h +++ b/tests/performance_tests/generate_key_image_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/is_out_to_acc.h b/tests/performance_tests/is_out_to_acc.h index 4a33c25fbe..cde341f6ff 100644 --- a/tests/performance_tests/is_out_to_acc.h +++ b/tests/performance_tests/is_out_to_acc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp index 72ee2ca6ca..b6a0a195dc 100644 --- a/tests/performance_tests/main.cpp +++ b/tests/performance_tests/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/multi_tx_test_base.h b/tests/performance_tests/multi_tx_test_base.h index c919bdf2d2..3105fa8805 100644 --- a/tests/performance_tests/multi_tx_test_base.h +++ b/tests/performance_tests/multi_tx_test_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/performance_tests.h b/tests/performance_tests/performance_tests.h index c7efe93f13..5fdfd2bd76 100644 --- a/tests/performance_tests/performance_tests.h +++ b/tests/performance_tests/performance_tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/performance_utils.h b/tests/performance_tests/performance_utils.h index 45ca5b27b1..28a3408b50 100644 --- a/tests/performance_tests/performance_utils.h +++ b/tests/performance_tests/performance_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/performance_tests/single_tx_test_base.h b/tests/performance_tests/single_tx_test_base.h index 1c1fe655ba..c26091299f 100644 --- a/tests/performance_tests/single_tx_test_base.h +++ b/tests/performance_tests/single_tx_test_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/base58.cpp b/tests/unit_tests/base58.cpp index 87afd5d0e3..f2d73a3b85 100644 --- a/tests/unit_tests/base58.cpp +++ b/tests/unit_tests/base58.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/block_reward.cpp b/tests/unit_tests/block_reward.cpp index 2381d36861..1d9c9c7150 100644 --- a/tests/unit_tests/block_reward.cpp +++ b/tests/unit_tests/block_reward.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/chacha8.cpp b/tests/unit_tests/chacha8.cpp index e3eeae5cfc..20889443d5 100644 --- a/tests/unit_tests/chacha8.cpp +++ b/tests/unit_tests/chacha8.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/checkpoints.cpp b/tests/unit_tests/checkpoints.cpp index 0d7bd4de99..06cabb741d 100644 --- a/tests/unit_tests/checkpoints.cpp +++ b/tests/unit_tests/checkpoints.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/decompose_amount_into_digits.cpp b/tests/unit_tests/decompose_amount_into_digits.cpp index 319b39e2f0..447a265d57 100644 --- a/tests/unit_tests/decompose_amount_into_digits.cpp +++ b/tests/unit_tests/decompose_amount_into_digits.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/epee_boosted_tcp_server.cpp b/tests/unit_tests/epee_boosted_tcp_server.cpp index 1e606163d2..27578f6a0a 100644 --- a/tests/unit_tests/epee_boosted_tcp_server.cpp +++ b/tests/unit_tests/epee_boosted_tcp_server.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/epee_levin_protocol_handler_async.cpp b/tests/unit_tests/epee_levin_protocol_handler_async.cpp index da22d9d2d4..b08c9da4c2 100644 --- a/tests/unit_tests/epee_levin_protocol_handler_async.cpp +++ b/tests/unit_tests/epee_levin_protocol_handler_async.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/get_xtype_from_string.cpp b/tests/unit_tests/get_xtype_from_string.cpp index dd4d2e4190..cf6ccc7f4b 100644 --- a/tests/unit_tests/get_xtype_from_string.cpp +++ b/tests/unit_tests/get_xtype_from_string.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/main.cpp b/tests/unit_tests/main.cpp index 65bf247d8b..e9976b9945 100644 --- a/tests/unit_tests/main.cpp +++ b/tests/unit_tests/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/mul_div.cpp b/tests/unit_tests/mul_div.cpp index 291e4f191e..713bfe5a1c 100644 --- a/tests/unit_tests/mul_div.cpp +++ b/tests/unit_tests/mul_div.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/parse_amount.cpp b/tests/unit_tests/parse_amount.cpp index 7d0b640880..039f3e8602 100644 --- a/tests/unit_tests/parse_amount.cpp +++ b/tests/unit_tests/parse_amount.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp index 616509d82c..3f73d8fdcd 100644 --- a/tests/unit_tests/serialization.cpp +++ b/tests/unit_tests/serialization.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/test_format_utils.cpp b/tests/unit_tests/test_format_utils.cpp index 4dd8775914..9041604a0a 100644 --- a/tests/unit_tests/test_format_utils.cpp +++ b/tests/unit_tests/test_format_utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/test_peerlist.cpp b/tests/unit_tests/test_peerlist.cpp index bd58ca7537..2d1bf5c283 100644 --- a/tests/unit_tests/test_peerlist.cpp +++ b/tests/unit_tests/test_peerlist.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/test_protocol_pack.cpp b/tests/unit_tests/test_protocol_pack.cpp index 18c7bc78b2..0389e1e2e4 100644 --- a/tests/unit_tests/test_protocol_pack.cpp +++ b/tests/unit_tests/test_protocol_pack.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/tests/unit_tests/unit_tests_utils.h b/tests/unit_tests/unit_tests_utils.h index 9eebb7ed99..b9c858c9ea 100644 --- a/tests/unit_tests/unit_tests_utils.h +++ b/tests/unit_tests/unit_tests_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. From 2f44547e0dc4a5ffd3da14caa6b605d422d62573 Mon Sep 17 00:00:00 2001 From: Albert Werner Date: Tue, 24 Jun 2014 23:30:02 +0400 Subject: [PATCH 2/9] Minor fixies in comments --- src/cryptonote_config.h | 7 +++++-- src/cryptonote_core/blockchain_storage.cpp | 5 +++++ src/cryptonote_core/cryptonote_format_utils.cpp | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 10ed771328..25fd1caad9 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -25,18 +25,21 @@ #define MONEY_SUPPLY #define EMISSION_SPEED_FACTOR (18) +//TODO Define number of blocks for block size median calculation #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_COINBASE_BLOB_RESERVED_SIZE 600 -#define CRYPTONOTE_DISPLAY_DECIMAL_POINT 8 +//TODO Define number of digits +#define CRYPTONOTE_DISPLAY_DECIMAL_POINT //TODO Define number of smallest units in one coin #define COIN //TODO Define default fee for transactions #define DEFAULT_FEE +//TODO Define preferred block's target time +#define DIFFICULTY_TARGET 120 // seconds //TODO There are options to tune CryptoNote's difficulty retargeting function. //TODO We recommend not to change it. -#define DIFFICULTY_TARGET 120 // seconds #define DIFFICULTY_WINDOW 720 // blocks #define DIFFICULTY_LAG 15 #define DIFFICULTY_CUT 60 // timestamps to cut after sorting diff --git a/src/cryptonote_core/blockchain_storage.cpp b/src/cryptonote_core/blockchain_storage.cpp index 214d77331e..b8d86f7f3c 100755 --- a/src/cryptonote_core/blockchain_storage.cpp +++ b/src/cryptonote_core/blockchain_storage.cpp @@ -82,6 +82,11 @@ uint64_t blockchain_storage::get_current_blockchain_height() { bool blockchain_storage::init(const std::string& config_folder) { CRITICAL_REGION_LOCAL(m_blockchain_lock); + if (!config_folder.empty() && !tools::create_directories_if_necessary(config_folder)) { + LOG_ERROR("Failed to create data directory: " << m_config_folder); + return false; + } + m_config_folder = config_folder; LOG_PRINT_L0("Loading blockchain..."); if (!m_blocks.open(appendPath(config_folder, CRYPTONOTE_BLOCKS_FILENAME), appendPath(config_folder, CRYPTONOTE_BLOCKINDEXES_FILENAME), 1024)) { diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index 8592fed488..4456b9033f 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -622,7 +622,7 @@ namespace cryptonote //genesis block bl = boost::value_initialized(); - //TODO Uncomment this code block on teh first network lounch. It will generate and print you genesis block's hash. + //TODO Uncomment this code block on the first network launch. It will generate and print you genesis block's hash. //TODO Then you must copy it and put to genesis_coinbase_tx_hex variable /* account_public_address ac = boost::value_initialized(); @@ -630,10 +630,10 @@ namespace cryptonote construct_miner_tx(0, 0, 0, 0, 0, ac, bl.miner_tx); // zero fee in genesis blobdata txb = tx_to_blob(bl.miner_tx); std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb); - std::cout << "Genesis block hex: " << hex_to_represent << endl; + std::cout << "Genesis coinbase tx hex: " << hex_to_represent << std::endl; */ - //hard code coinbase tx in genesis block, because "tru" generating tx use random, but genesis should be always the same + //hard code coinbase tx in genesis block, because "true" generating tx use random, but genesis should be always the same //TODO After you obtain hash of the genesis block put it here and recompile sources! std::string genesis_coinbase_tx_hex = ""; From 9a0a44a816b091132e9e49fa2674f1fd1193ad1d Mon Sep 17 00:00:00 2001 From: Albert Werner Date: Tue, 24 Jun 2014 23:35:25 +0400 Subject: [PATCH 3/9] Update README, add forking guide --- README | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 160 insertions(+), 1 deletion(-) diff --git a/README b/README index 87a89c5871..051cbea0be 100644 --- a/README +++ b/README @@ -1,4 +1,163 @@ --= Building CryptoNote =- +== Preparation == + +1. Create an account on github.com + +2. Fork https://github.com/cryptonotefoundation/cryptonote repository + +3. Buy one or two Ubuntu-based dedicated servers (at least 8Gb of RAM) for seed nodes. + + +== First step. Give a name to your coin == + +Good name must be unique. Check uniqueness with google and mapofcoins.com or any other similar service. + +Name must be specified twice: + +- in file src/cryptonote_config.h - CRYPTONOTE_NAME macro + +Example: +#define CRYPTONOTE_NAME "furiouscoin" + +- in CMakeList.txt file - set_property(TARGET daemon PROPERTY OUTPUT_NAME "YOURCOINNAMEd") + +Example: +set_property(TARGET daemon PROPERTY OUTPUT_NAME "furiouscoind") + +Note: You should also change a repository name. + + +== Second step. Emission logic == + +1. Total money supply (src/cryptonote_config.h) + +Total amount of coins to be emitted. Most of CryptoNote based coins use (uint64_t)(-1) (equals to 18446744073709551616). You can define number explicitly (for example UINT64_C(858986905600000000)). + +Example: +#define MONEY_SUPPLY ((uint64_t)(-1)) + +2. Emission curve (src/cryptonote_config.h) + +Be default CryptoNote provides emission formula with slight decrease of block reward with each block. This is different from Bitcoin where block reward halves every 4 years. + +EMISSION_SPEED_FACTOR macro defines emission curve slope. This parameter is required to calulate block reward. + +Example: +#define EMISSION_SPEED_FACTOR (18) + +3. Difficulty target (src/cryptonote_config.h) + +Difficulty target is an ideal time period between blocks. In case an average time between blocks becomes less than difficulty target, the difficulty increases. Difficulty target is measured in seconds. + +Difficulty target directly influences several aspects of coin's behavior: + +- transaction confirmation speed: the longer the time between the blocks is, the slower transaction confirmation is +- emission speed: the longer the time between the blocks is the slower the emission process is +- orphan rate: chains with very fast blocks have greater orphan rate + +For most coins difficulty target is 60 or 120 seconds. + +Example: +#define DIFFICULTY_TARGET 120 + +4. Block reward formula + +In case you are not satisfied with CryptoNote default implementation of block reward logic you can also change it. The implementation is in src/cryptonote_core/cryptonote_basic_impl.cpp: + +bool get_block_reward(size_t median_size, size_t current_block_size, uint64_t already_generated_coins, uint64_t &reward) + +This function has two parts: + +- basic block reward calculation + +uint64_t base_reward = (MONEY_SUPPLY - already_generated_coins) >> EMISSION_SPEED_FACTOR; + +- big block penalty calculation + +This is the way CryptoNote protects the block chain from transaction flooding attacks and preserves opportunities for organic network growth at the same time. + +Only the first part of this function is directly related to the emission logic. You can change it the way you want. See MonetaVerde and DuckNote as the examples where this function is modified. + + +== Third step. Networking == + +1. Default ports for P2P and RPC networking (src/cryptonote_config.h) + +P2P port is used by daemons to talk to each other through P2P protocol. +RPC port is used by wallet and other programs to talk to daemon. + +It's better to choose ports that aren't used by other software or coins. See known TCP ports lists: + +- http://www.speedguide.net/ports.php +- http://www.networksorcery.com/enp/protocol/ip/ports00000.htm +- http://keir.net/portlist.html + +Example: + +#define P2P_DEFAULT_PORT 17236 +#define RPC_DEFAULT_PORT 18236 + + +2. Network identifier (src/p2p/p2p_networks.h) + +This identifier is used in network packages in order not to mix two different cryptocoin networks. Change all the bytes to random values for your network: + +const static boost::uuids::uuid CRYPTONOTE_NETWORK = { { 0xA1 ,0x1A, 0xA1, 0x1A , 0xA1, 0x0A , 0xA1, 0x0A, 0xA0, 0x1A, 0xA0, 0x1A, 0xA0, 0x1A, 0xA1, 0x1A} }; + + +3. Seed nodes (src/p2p/net_node.inl) + +Add ip addresses of your seed nodes to the beginning of "node_server::init(const boost::program_options::variables_map& vm)" function. + +Example: +ADD_HARDCODED_SEED_NODE("111.11.11.11:17236"); +ADD_HARDCODED_SEED_NODE("222.22.22.22:17236"); + + +== Fourth step. Transaction fee and related parameters == + +1. Default transaction fee (src/cryptonote_config.h) + +Zero default fee can lead to transaction flooding. Transactions cheaper than the default transaction fee wouldn't be accepted by daemons. 100000 value for DEFAULT_FEE is usually enough. + +Example: +#define DEFAULT_FEE 100000 + + +2. Penalty free block size (src/cryptonote_config.h) + +CryptoNote protects chain from tx flooding by reducing block reward for blocks larger than the median block size. However, this rule applies for blocks larger than CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE bytes. + +Example: +#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE 20000 + + +== Fifth step. Genesis block == + +Now your coin code is almost ready. You need to generate the coinbase transaction for your genesis block. Uncomment the following code in "generate_genesis_block(block& bl)" function in src/cryptonote_core/cryptonote_format_utils.cpp: + + /* + account_public_address ac = boost::value_initialized(); + std::vector sz; + construct_miner_tx(0, 0, 0, 0, 0, ac, bl.miner_tx); // zero fee in genesis + blobdata txb = tx_to_blob(bl.miner_tx); + std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb); + std::cout << "Genesis block hex: " << hex_tx_represent << std::endl; + */ + +Compile and run the daemon. As soon as it prints line starting with "Genesis coinbase tx hex: " copy the hex representation of the coinbase tx and paste it into generate_genesis_block function: + +Genesis coinbase tx hex: 013c01ff0001ffffffffffff0f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121012cfb466857c5762cdd97e242b08b7e239ab35807f5024d4785a33d9ebdba68b0 + +-> + +std::string genesis_coinbase_tx_hex = "013c01ff0001ffffffffffff0f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121012cfb466857c5762cdd97e242b08b7e239ab35807f5024d4785a33d9ebdba68b0"; + +Comment the coinbase tx generation code back and recompile everything again. + +You coin code is ready now. Make an announcement for the potential users and enjoy! + + +== Building CryptoNote == On *nix: From f4769d87ad606b63484ef76ef57f50b5ac117d0a Mon Sep 17 00:00:00 2001 From: Albert Werner Date: Thu, 10 Jul 2014 20:47:56 +0400 Subject: [PATCH 4/9] Added testnet flag in daemon --- src/cryptonote_config.h | 2 +- src/cryptonote_core/blockchain_storage.cpp | 40 ++++++++++++++++--- src/cryptonote_core/blockchain_storage.h | 3 +- src/cryptonote_core/cryptonote_core.cpp | 4 +- src/cryptonote_core/cryptonote_core.h | 2 +- .../cryptonote_format_utils.cpp | 14 ++++++- src/cryptonote_core/cryptonote_format_utils.h | 3 +- src/daemon/daemon.cpp | 17 ++++++-- src/p2p/net_node.h | 5 ++- src/p2p/net_node.inl | 20 ++++++---- src/simplewallet/simplewallet.cpp | 21 ++++++---- src/simplewallet/simplewallet.h | 4 +- src/version.h.in | 4 +- src/wallet/Wallet.cpp | 2 +- src/wallet/wallet2.cpp | 35 ++++++++++++---- src/wallet/wallet2.h | 7 +++- tests/core_proxy/core_proxy.cpp | 4 +- tests/core_tests/chaingen.h | 2 +- 18 files changed, 135 insertions(+), 54 deletions(-) diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 25fd1caad9..6035288c9a 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -8,7 +8,7 @@ #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 -//TODO Define the first letter of your currency address +//TODO Currency-specific address prefix #define CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX //TODO Choose maturity period for your currency #define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW diff --git a/src/cryptonote_core/blockchain_storage.cpp b/src/cryptonote_core/blockchain_storage.cpp index fb0663f78e..87d53c02a4 100755 --- a/src/cryptonote_core/blockchain_storage.cpp +++ b/src/cryptonote_core/blockchain_storage.cpp @@ -80,7 +80,7 @@ uint64_t blockchain_storage::get_current_blockchain_height() { return m_blocks.size(); } -bool blockchain_storage::init(const std::string& config_folder, bool load_existing) { +bool blockchain_storage::init(const std::string& config_folder, bool load_existing, bool testnet) { CRITICAL_REGION_LOCAL(m_blockchain_lock); if (!config_folder.empty() && !tools::create_directories_if_necessary(config_folder)) { LOG_ERROR("Failed to create data directory: " << m_config_folder); @@ -149,11 +149,24 @@ bool blockchain_storage::init(const std::string& config_folder, bool load_existi if (m_blocks.empty()) { LOG_PRINT_L0("Blockchain not loaded, generating genesis block."); - block bl = ::boost::value_initialized(); - block_verification_context bvc = boost::value_initialized(); - generate_genesis_block(bl); - add_new_block(bl, bvc); - CHECK_AND_ASSERT_MES(!bvc.m_verifivation_failed, false, "Failed to add genesis block to blockchain"); + + if (!storeGenesisBlock(testnet)) { + return false; + } + } else { + cryptonote::block b; + if (testnet) { + generateTestnetGenesisBlock(b); + } else { + generateGenesisBlock(b); + } + + crypto::hash genesis_hash = get_block_hash(m_blocks[0].bl); + crypto::hash testnet_genesis_hash = get_block_hash(b); + if (genesis_hash != testnet_genesis_hash) { + LOG_ERROR("Failed to init: genesis block mismatch. Probably you set --testnet flag with data dir with non-test blockchain or another network."); + return false; + } } uint64_t timestamp_diff = time(NULL) - m_blocks.back().bl.timestamp; @@ -163,6 +176,21 @@ bool blockchain_storage::init(const std::string& config_folder, bool load_existi return true; } +bool blockchain_storage::storeGenesisBlock(bool testnet) { + block bl = ::boost::value_initialized(); + block_verification_context bvc = boost::value_initialized(); + + if (testnet) { + generateTestnetGenesisBlock(bl); + } else { + generateGenesisBlock(bl); + } + + add_new_block(bl, bvc); + CHECK_AND_ASSERT_MES(!bvc.m_verifivation_failed, false, "Failed to add genesis block to blockchain"); + return true; +} + bool blockchain_storage::store_blockchain() { try { std::ofstream file(appendPath(m_config_folder, CRYPTONOTE_BLOCKSCACHE_FILENAME), std::ios::binary); diff --git a/src/cryptonote_core/blockchain_storage.h b/src/cryptonote_core/blockchain_storage.h index a67cf52032..e8946865cc 100755 --- a/src/cryptonote_core/blockchain_storage.h +++ b/src/cryptonote_core/blockchain_storage.h @@ -18,7 +18,7 @@ namespace cryptonote { {}; bool init() { return init(tools::get_default_data_dir(), true); } - bool init(const std::string& config_folder, bool load_existing); + bool init(const std::string& config_folder, bool load_existing, bool testnet = false); bool deinit(); void set_checkpoints(checkpoints&& chk_pts) { m_checkpoints = chk_pts; } @@ -182,6 +182,7 @@ namespace cryptonote { bool pushTransaction(Block& block, const crypto::hash& transactionHash, TransactionIndex transactionIndex); void popTransaction(const transaction& transaction, const crypto::hash& transactionHash); void popTransactions(const Block& block, const crypto::hash& minerTransactionHash); + bool storeGenesisBlock(bool testnet); }; diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 5c456d41ce..6065eafd52 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -90,14 +90,14 @@ namespace cryptonote return m_blockchain_storage.get_alternative_blocks_count(); } //----------------------------------------------------------------------------------------------- - bool core::init(const boost::program_options::variables_map& vm, bool load_existing) + bool core::init(const boost::program_options::variables_map& vm, bool load_existing, bool testnet) { bool r = handle_command_line(vm); r = m_mempool.init(m_config_folder); CHECK_AND_ASSERT_MES(r, false, "Failed to initialize memory pool"); - r = m_blockchain_storage.init(m_config_folder, load_existing); + r = m_blockchain_storage.init(m_config_folder, load_existing, testnet); CHECK_AND_ASSERT_MES(r, false, "Failed to initialize blockchain storage"); r = m_miner.init(vm); diff --git a/src/cryptonote_core/cryptonote_core.h b/src/cryptonote_core/cryptonote_core.h index b573438dbd..921f83f2dd 100644 --- a/src/cryptonote_core/cryptonote_core.h +++ b/src/cryptonote_core/cryptonote_core.h @@ -43,7 +43,7 @@ namespace cryptonote miner& get_miner(){return m_miner;} static void init_options(boost::program_options::options_description& desc); - bool init(const boost::program_options::variables_map& vm, bool load_existing); + bool init(const boost::program_options::variables_map& vm, bool load_existing, bool testnet); bool set_genesis_block(const block& b); bool deinit(); uint64_t get_current_blockchain_height(); diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index afd5b9fdab..a44b060d84 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -617,7 +617,7 @@ namespace cryptonote return p; } //--------------------------------------------------------------- - bool generate_genesis_block(block& bl) + bool generateGenesisBlock(block& bl) { //genesis block bl = boost::value_initialized(); @@ -630,7 +630,7 @@ namespace cryptonote construct_miner_tx(0, 0, 0, 0, 0, ac, bl.miner_tx); // zero fee in genesis blobdata txb = tx_to_blob(bl.miner_tx); std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb); - std::cout << "Genesis coinbase tx hex: " << hex_to_represent << std::endl; + std::cout << "Genesis coinbase tx hex: " << hex_tx_represent << std::endl; */ //hard code coinbase tx in genesis block, because "true" generating tx use random, but genesis should be always the same @@ -648,6 +648,16 @@ namespace cryptonote //miner::find_nonce_for_given_block(bl, 1, 0); return true; } + + bool generateTestnetGenesisBlock(cryptonote::block& b) { + if (!generateGenesisBlock(b)) { + return false; + } + + b.nonce += 1; + return true; + } + //--------------------------------------------------------------- bool get_block_longhash(crypto::cn_context &context, const block& b, crypto::hash& res, uint64_t height) { diff --git a/src/cryptonote_core/cryptonote_format_utils.h b/src/cryptonote_core/cryptonote_format_utils.h index d3c089800c..9477e1a642 100644 --- a/src/cryptonote_core/cryptonote_format_utils.h +++ b/src/cryptonote_core/cryptonote_format_utils.h @@ -79,7 +79,8 @@ namespace cryptonote crypto::hash get_block_hash(const block& b); bool get_block_longhash(crypto::cn_context &context, const block& b, crypto::hash& res, uint64_t height); crypto::hash get_block_longhash(crypto::cn_context &context, const block& b, uint64_t height); - bool generate_genesis_block(block& bl); + bool generateGenesisBlock(block& bl); + bool generateTestnetGenesisBlock(block& bl); bool parse_and_validate_block_from_blob(const blobdata& b_blob, block& b); bool get_inputs_money_amount(const transaction& tx, uint64_t& money); uint64_t get_outs_money_amount(const transaction& tx); diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index b86edd1b2e..660cb7844b 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -36,6 +36,8 @@ namespace const command_line::arg_descriptor arg_log_file = {"log-file", "", ""}; const command_line::arg_descriptor arg_log_level = {"log-level", "", LOG_LEVEL_0}; const command_line::arg_descriptor arg_console = {"no-console", "Disable daemon console commands"}; + const command_line::arg_descriptor arg_testnet_on = {"testnet", "Used to deploy test nets. Checkpoints and hardcoded seeds are ignored, " + "network id is changed. Use it with --data-dir flag. The wallet must be launched with --testnet flag.", false}; } bool command_line_preprocessor(const boost::program_options::variables_map& vm); @@ -66,7 +68,7 @@ int main(int argc, char* argv[]) command_line::add_arg(desc_cmd_sett, arg_log_file); command_line::add_arg(desc_cmd_sett, arg_log_level); command_line::add_arg(desc_cmd_sett, arg_console); - + command_line::add_arg(desc_cmd_sett, arg_testnet_on); cryptonote::core::init_options(desc_cmd_sett); cryptonote::core_rpc_server::init_options(desc_cmd_sett); @@ -134,7 +136,14 @@ int main(int argc, char* argv[]) //create objects and link them cryptonote::core ccore(NULL); - ccore.set_checkpoints(std::move(checkpoints)); + + bool testnet_mode = command_line::get_arg(vm, arg_testnet_on); + if (testnet_mode) { + LOG_PRINT_L0("Starting in testnet mode!"); + } else { + ccore.set_checkpoints(std::move(checkpoints)); + } + cryptonote::t_cryptonote_protocol_handler cprotocol(ccore, NULL); nodetool::node_server > p2psrv(cprotocol); cryptonote::core_rpc_server rpc_server(ccore, p2psrv); @@ -144,7 +153,7 @@ int main(int argc, char* argv[]) //initialize objects LOG_PRINT_L0("Initializing p2p server..."); - res = p2psrv.init(vm); + res = p2psrv.init(vm, testnet_mode); CHECK_AND_ASSERT_MES(res, 1, "Failed to initialize p2p server."); LOG_PRINT_L0("P2p server initialized OK"); @@ -160,7 +169,7 @@ int main(int argc, char* argv[]) //initialize core here LOG_PRINT_L0("Initializing core..."); - res = ccore.init(vm, true); + res = ccore.init(vm, true, testnet_mode); CHECK_AND_ASSERT_MES(res, 1, "Failed to initialize core"); LOG_PRINT_L0("Core initialized OK"); diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index 74b9490f10..05fe1b0430 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -53,13 +53,13 @@ namespace nodetool public: typedef t_payload_net_handler payload_net_handler; // Some code - node_server(t_payload_net_handler& payload_handler):m_payload_handler(payload_handler), m_allow_local_ip(false), m_hide_my_port(false) + node_server(t_payload_net_handler& payload_handler):m_payload_handler(payload_handler), m_allow_local_ip(false), m_hide_my_port(false), m_network_id(CRYPTONOTE_NETWORK) {} static void init_options(boost::program_options::options_description& desc); bool run(); - bool init(const boost::program_options::variables_map& vm); + bool init(const boost::program_options::variables_map& vm, bool testnet); bool deinit(); bool send_stop_signal(); uint32_t get_this_peer_port(){return m_listenning_port;} @@ -203,6 +203,7 @@ namespace nodetool uint64_t m_peer_livetime; //keep connections to initiate some interactions net_server m_net_server; + boost::uuids::uuid m_network_id; }; } diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 89ae6ddd1c..00f9852447 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -50,7 +50,8 @@ namespace nodetool command_line::add_arg(desc, arg_p2p_add_priority_node); command_line::add_arg(desc, arg_p2p_add_exclusive_node); command_line::add_arg(desc, arg_p2p_seed_node); - command_line::add_arg(desc, arg_p2p_hide_my_port); } + command_line::add_arg(desc, arg_p2p_hide_my_port); + } //----------------------------------------------------------------------------------- template bool node_server::init_config() @@ -191,10 +192,14 @@ namespace nodetool #define ADD_HARDCODED_SEED_NODE(addr) append_net_address(m_seed_nodes, addr); //----------------------------------------------------------------------------------- template - bool node_server::init(const boost::program_options::variables_map& vm) + bool node_server::init(const boost::program_options::variables_map& vm, bool testnet) { - //TODO add seed for your network - //ADD_HARDCODED_SEED_NODE("your_seed_ip.com:8080"); + if (!testnet) { + //TODO add seed for your network + //ADD_HARDCODED_SEED_NODE("your_seed_ip.com:8080"); + } else { + m_network_id.data[0] += 1; + } bool res = handle_command_line(vm); CHECK_AND_ASSERT_MES(res, false, "Failed to handle command line"); @@ -368,7 +373,7 @@ namespace nodetool return; } - if(rsp.node_data.network_id != CRYPTONOTE_NETWORK) + if(rsp.node_data.network_id != m_network_id) { LOG_ERROR_CCONTEXT("COMMAND_HANDSHAKE Failed, wrong network! (" << epee::string_tools::get_str_from_guid_a(rsp.node_data.network_id) << "), closing connection."); return; @@ -776,7 +781,7 @@ namespace nodetool node_data.my_port = m_external_port ? m_external_port : m_listenning_port; else node_data.my_port = 0; - node_data.network_id = CRYPTONOTE_NETWORK; + node_data.network_id = m_network_id; return true; } //----------------------------------------------------------------------------------- @@ -996,9 +1001,8 @@ namespace nodetool template int node_server::handle_handshake(int command, typename COMMAND_HANDSHAKE::request& arg, typename COMMAND_HANDSHAKE::response& rsp, p2p_connection_context& context) { - if(arg.node_data.network_id != CRYPTONOTE_NETWORK) + if(arg.node_data.network_id != m_network_id) { - LOG_PRINT_CCONTEXT_L0("WRONG NETWORK AGENT CONNECTED! id=" << epee::string_tools::get_str_from_guid_a(arg.node_data.network_id)); drop_connection(context); return 1; diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index b01c8d2d90..f9c5985130 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -40,6 +40,7 @@ namespace const command_line::arg_descriptor arg_password = {"password", "Wallet password", "", true}; const command_line::arg_descriptor arg_daemon_port = {"daemon-port", "Use daemon instance at port instead of 8081", 0}; const command_line::arg_descriptor arg_log_level = {"set_log", "", 0, true}; + const command_line::arg_descriptor arg_testnet = {"testnet", "Used to deploy test nets. The daemon must be launched with --testnet flag", false}; const command_line::arg_descriptor< std::vector > arg_command = {"command", ""}; @@ -266,6 +267,8 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm) if (m_daemon_address.empty()) m_daemon_address = std::string("http://") + m_daemon_host + ":" + std::to_string(m_daemon_port); + bool testnet = command_line::get_arg(vm, arg_testnet); + tools::password_container pwd_container; if (command_line::has_arg(vm, arg_password)) { @@ -283,12 +286,12 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm) if (!m_generate_new.empty()) { - bool r = new_wallet(m_generate_new, pwd_container.password()); + bool r = new_wallet(m_generate_new, pwd_container.password(), testnet); CHECK_AND_ASSERT_MES(r, false, "account creation failed"); } else { - bool r = open_wallet(m_wallet_file, pwd_container.password()); + bool r = open_wallet(m_wallet_file, pwd_container.password(), testnet); CHECK_AND_ASSERT_MES(r, false, "could not open account"); } @@ -324,11 +327,11 @@ bool simple_wallet::try_connect_to_daemon() return true; } //---------------------------------------------------------------------------------------------------- -bool simple_wallet::new_wallet(const string &wallet_file, const std::string& password) +bool simple_wallet::new_wallet(const string &wallet_file, const std::string& password, bool testnet) { m_wallet_file = wallet_file; - m_wallet.reset(new tools::wallet2()); + m_wallet.reset(new tools::wallet2(testnet)); m_wallet->callback(this); try { @@ -355,10 +358,10 @@ bool simple_wallet::new_wallet(const string &wallet_file, const std::string& pas return true; } //---------------------------------------------------------------------------------------------------- -bool simple_wallet::open_wallet(const string &wallet_file, const std::string& password) +bool simple_wallet::open_wallet(const string &wallet_file, const std::string& password, bool testnet) { m_wallet_file = wallet_file; - m_wallet.reset(new tools::wallet2()); + m_wallet.reset(new tools::wallet2(testnet)); m_wallet->callback(this); try @@ -899,6 +902,7 @@ int main(int argc, char* argv[]) command_line::add_arg(desc_params, arg_daemon_port); command_line::add_arg(desc_params, arg_command); command_line::add_arg(desc_params, arg_log_level); + command_line::add_arg(desc_params, arg_testnet); tools::wallet_rpc_server::init_options(desc_params); po::positional_options_description positional_options; @@ -914,7 +918,7 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - success_msg_writer() << "bytecoin wallet v" << PROJECT_VERSION_LONG; + success_msg_writer() << CRYPTONOTE_NAME " wallet v" << PROJECT_VERSION_LONG; success_msg_writer() << "Usage: simplewallet [--wallet-file=|--generate-new-wallet=] [--daemon-address=:] []"; success_msg_writer() << desc_all << '\n' << w.get_commands_str(); return false; @@ -968,6 +972,7 @@ int main(int argc, char* argv[]) return 1; } + bool testnet = command_line::get_arg(vm, arg_testnet); std::string wallet_file = command_line::get_arg(vm, arg_wallet_file); std::string wallet_password = command_line::get_arg(vm, arg_password); std::string daemon_address = command_line::get_arg(vm, arg_daemon_address); @@ -980,7 +985,7 @@ int main(int argc, char* argv[]) if (daemon_address.empty()) daemon_address = std::string("http://") + daemon_host + ":" + std::to_string(daemon_port); - tools::wallet2 wal; + tools::wallet2 wal(testnet); try { LOG_PRINT_L0("Loading wallet..."); diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 0d2b4d5cac..95fdecfa77 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -39,8 +39,8 @@ namespace cryptonote bool run_console_handler(); - bool new_wallet(const std::string &wallet_file, const std::string& password); - bool open_wallet(const std::string &wallet_file, const std::string& password); + bool new_wallet(const std::string &wallet_file, const std::string& password, bool testnet); + bool open_wallet(const std::string &wallet_file, const std::string& password, bool testnet); bool close_wallet(); bool help(const std::vector &args = std::vector()); diff --git a/src/version.h.in b/src/version.h.in index 62316da3fd..7812a19d6f 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -1,4 +1,4 @@ #define BUILD_COMMIT_ID "@VERSION@" -#define PROJECT_VERSION "0.8.11" -#define PROJECT_VERSION_BUILD_NO "65" +#define PROJECT_VERSION "1.0.0" +#define PROJECT_VERSION_BUILD_NO "1" #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO "(" BUILD_COMMIT_ID ")" diff --git a/src/wallet/Wallet.cpp b/src/wallet/Wallet.cpp index a327e1a2b4..15e790cd57 100644 --- a/src/wallet/Wallet.cpp +++ b/src/wallet/Wallet.cpp @@ -106,7 +106,7 @@ void Wallet::initAndGenerate(const std::string& password) { void Wallet::storeGenesisBlock() { cryptonote::block b; - cryptonote::generate_genesis_block(b); + cryptonote::generateGenesisBlock(b); m_blockchain.push_back(get_block_hash(b)); } diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 5cfe5d7243..4f323eb822 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -373,9 +373,6 @@ bool wallet2::clear() { m_blockchain.clear(); m_transfers.clear(); - cryptonote::block b; - cryptonote::generate_genesis_block(b); - m_blockchain.push_back(get_block_hash(b)); m_local_bc_height = 1; return true; } @@ -455,6 +452,10 @@ void wallet2::generate(const std::string& wallet_, const std::string& password) r = file_io_utils::save_string_to_file(m_wallet_file + ".address.txt", m_account.get_public_address_str()); if(!r) LOG_PRINT_RED_L0("String with address text not saved"); + cryptonote::block b; + generateGenesis(b); + m_blockchain.push_back(get_block_hash(b)); + store(); } //---------------------------------------------------------------------------------------------------- @@ -527,15 +528,25 @@ void wallet2::load(const std::string& wallet_, const std::string& password) m_account_public_address.m_view_public_key != m_account.get_keys().m_account_address.m_view_public_key, error::wallet_files_doesnt_correspond, m_keys_file, m_wallet_file); - if(m_blockchain.empty()) - { - cryptonote::block b; - cryptonote::generate_genesis_block(b); - m_blockchain.push_back(get_block_hash(b)); + cryptonote::block genesis; + generateGenesis(genesis); + crypto::hash genesisHash = get_block_hash(genesis); + + if (m_blockchain.empty()) { + m_blockchain.push_back(genesisHash); + } else { + checkGenesis(genesisHash); } + m_local_bc_height = m_blockchain.size(); } //---------------------------------------------------------------------------------------------------- +void wallet2::checkGenesis(const crypto::hash& genesisHash) { + std::string what("Genesis block missmatch. You probably use wallet without testnet flag with blockchain from test network or vice versa"); + + THROW_WALLET_EXCEPTION_IF(genesisHash != m_blockchain[0], error::wallet_internal_error, what); +} +//---------------------------------------------------------------------------------------------------- void wallet2::store() { bool r = tools::serialize_obj_to_file(*this, m_wallet_file); @@ -690,4 +701,12 @@ void wallet2::transfer(const std::vector& dsts transfer(dsts, fake_outputs_count, unlock_time, fee, extra, tx); } //---------------------------------------------------------------------------------------------------- +void wallet2::generateGenesis(cryptonote::block& b) { + if (m_testnet) { + cryptonote::generateTestnetGenesisBlock(b); + } else { + cryptonote::generateGenesisBlock(b); + } +} +//---------------------------------------------------------------------------------------------------- } diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 778e1766fc..e1d4dd10ca 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -53,9 +53,9 @@ namespace tools class wallet2 { - wallet2(const wallet2&) : m_run(true), m_callback(0) {}; + wallet2(const wallet2&) : m_run(true), m_callback(0), m_testnet(false) {}; public: - wallet2() : m_run(true), m_callback(0) {}; + wallet2(bool testnet = false) : m_run(true), m_callback(0), m_testnet(testnet) {}; struct transfer_details { uint64_t m_block_height; @@ -162,6 +162,8 @@ namespace tools bool prepare_file_names(const std::string& file_path); void process_unconfirmed(const cryptonote::transaction& tx); void add_unconfirmed_tx(const cryptonote::transaction& tx, uint64_t change_amount); + void generateGenesis(cryptonote::block& b); + void checkGenesis(const crypto::hash& genesis_hash); //throws cryptonote::account_base m_account; std::string m_daemon_address; @@ -181,6 +183,7 @@ namespace tools std::atomic m_run; i_wallet2_callback* m_callback; + bool m_testnet; }; } BOOST_CLASS_VERSION(tools::wallet2, 7) diff --git a/tests/core_proxy/core_proxy.cpp b/tests/core_proxy/core_proxy.cpp index d3ff7444b4..25b6648604 100644 --- a/tests/core_proxy/core_proxy.cpp +++ b/tests/core_proxy/core_proxy.cpp @@ -86,7 +86,7 @@ int main(int argc, char* argv[]) //initialize objects LOG_PRINT_L0("Initializing p2p server..."); - bool res = p2psrv.init(vm); + bool res = p2psrv.init(vm, false); CHECK_AND_ASSERT_MES(res, 1, "Failed to initialize p2p server."); LOG_PRINT_L0("P2p server initialized OK"); @@ -198,7 +198,7 @@ bool tests::proxy_core::get_blockchain_top(uint64_t& height, crypto::hash& top_i } bool tests::proxy_core::init(const boost::program_options::variables_map& /*vm*/) { - generate_genesis_block(m_genesis); + generateGenesisBlock(m_genesis); crypto::hash h = get_block_hash(m_genesis); add_block(h, get_block_longhash(m_cn_context, m_genesis, 0), m_genesis, block_to_blob(m_genesis)); return true; diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index 2350c9311e..773b11c027 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -461,7 +461,7 @@ inline bool do_replay_events(std::vector& events) cryptonote::cryptonote_protocol_stub pr; //TODO: stub only for this kind of test, make real validation of relayed objects cryptonote::core c(&pr); - if (!c.init(vm, false)) + if (!c.init(vm, false, false)) { std::cout << concolor::magenta << "Failed to init core" << concolor::normal << std::endl; return false; From 7f23949066a7812cbd7729208c0cc6818e432650 Mon Sep 17 00:00:00 2001 From: Albert Werner Date: Fri, 18 Jul 2014 14:49:01 +0400 Subject: [PATCH 5/9] Add print-genesis-tx option. --- src/common/ObserverManager.h | 3 +- src/cryptonote_config.h | 2 ++ .../cryptonote_format_utils.cpp | 33 +++++++++++-------- src/cryptonote_core/cryptonote_format_utils.h | 1 + src/daemon/daemon.cpp | 16 +++++++++ src/version.h.in | 2 +- src/wallet/Wallet.cpp | 2 +- src/wallet/Wallet.h | 2 +- src/wallet/WalletAsyncContextCounter.cpp | 2 +- src/wallet/WalletAsyncContextCounter.h | 2 +- src/wallet/WalletErrors.cpp | 2 +- src/wallet/WalletErrors.h | 2 +- src/wallet/WalletEvent.h | 2 +- src/wallet/WalletRequest.h | 2 +- src/wallet/WalletSendTransactionContext.h | 2 +- src/wallet/WalletSerialization.h | 2 +- src/wallet/WalletSynchronizationContext.h | 2 +- src/wallet/WalletSynchronizer.cpp | 2 +- src/wallet/WalletSynchronizer.h | 2 +- src/wallet/WalletTransactionSender.cpp | 10 +++--- src/wallet/WalletTransactionSender.h | 2 +- src/wallet/WalletTransferDetails.cpp | 2 +- src/wallet/WalletTransferDetails.h | 2 +- src/wallet/WalletTxSendingState.cpp | 2 +- src/wallet/WalletTxSendingState.h | 2 +- src/wallet/WalletUnconfirmedTransactions.cpp | 2 +- src/wallet/WalletUnconfirmedTransactions.h | 2 +- src/wallet/WalletUserTransactionsCache.cpp | 2 +- src/wallet/WalletUserTransactionsCache.h | 2 +- src/wallet/WalletUtils.h | 2 +- 30 files changed, 68 insertions(+), 45 deletions(-) diff --git a/src/common/ObserverManager.h b/src/common/ObserverManager.h index 02b59d9f11..68ed0e9104 100644 --- a/src/common/ObserverManager.h +++ b/src/common/ObserverManager.h @@ -1,9 +1,10 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #pragma once +#include #include #include diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 6035288c9a..405ef6727b 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -90,3 +90,5 @@ #define THREAD_STACK_SIZE 5 * 1024 * 1024 +#define GENESIS_COINBASE_TX_HEX "" + diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index a44b060d84..e50d7b23c9 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -617,25 +617,30 @@ namespace cryptonote return p; } //--------------------------------------------------------------- + void generate_genesis_tx(transaction& tx) { + account_public_address ac = boost::value_initialized(); + std::vector sz; + construct_miner_tx(0, 0, 0, 0, 0, ac, tx); // zero fee in genesis + blobdata txb = tx_to_blob(tx); + } + + std::string get_genesis_tx_hex() { + transaction tx; + + generate_genesis_tx(tx); + blobdata txb = tx_to_blob(tx); + std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb); + + return hex_tx_represent; + } + bool generateGenesisBlock(block& bl) { //genesis block bl = boost::value_initialized(); - //TODO Uncomment this code block on the first network launch. It will generate and print you genesis block's hash. - //TODO Then you must copy it and put to genesis_coinbase_tx_hex variable - /* - account_public_address ac = boost::value_initialized(); - std::vector sz; - construct_miner_tx(0, 0, 0, 0, 0, ac, bl.miner_tx); // zero fee in genesis - blobdata txb = tx_to_blob(bl.miner_tx); - std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb); - std::cout << "Genesis coinbase tx hex: " << hex_tx_represent << std::endl; - */ - - //hard code coinbase tx in genesis block, because "true" generating tx use random, but genesis should be always the same - //TODO After you obtain hash of the genesis block put it here and recompile sources! - std::string genesis_coinbase_tx_hex = ""; + //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 = GENESIS_COINBASE_TX_HEX; blobdata tx_bl; string_tools::parse_hexstr_to_binbuff(genesis_coinbase_tx_hex, tx_bl); diff --git a/src/cryptonote_core/cryptonote_format_utils.h b/src/cryptonote_core/cryptonote_format_utils.h index 9477e1a642..c70d920d4d 100644 --- a/src/cryptonote_core/cryptonote_format_utils.h +++ b/src/cryptonote_core/cryptonote_format_utils.h @@ -81,6 +81,7 @@ namespace cryptonote crypto::hash get_block_longhash(crypto::cn_context &context, const block& b, uint64_t height); bool generateGenesisBlock(block& bl); bool generateTestnetGenesisBlock(block& bl); + std::string get_genesis_tx_hex(); bool parse_and_validate_block_from_blob(const blobdata& b_blob, block& b); bool get_inputs_money_amount(const transaction& tx, uint64_t& money); uint64_t get_outs_money_amount(const transaction& tx); diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 660cb7844b..d731ada940 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -38,10 +38,20 @@ namespace const command_line::arg_descriptor arg_console = {"no-console", "Disable daemon console commands"}; const command_line::arg_descriptor arg_testnet_on = {"testnet", "Used to deploy test nets. Checkpoints and hardcoded seeds are ignored, " "network id is changed. Use it with --data-dir flag. The wallet must be launched with --testnet flag.", false}; + const command_line::arg_descriptor arg_print_genesis_tx = {"print-genesis-tx", "Prints genesis' block tx hex to insert it to config and exits"}; } bool command_line_preprocessor(const boost::program_options::variables_map& vm); +void print_genesis_tx_hex() { + std::string tx_hex = cryptonote::get_genesis_tx_hex(); + + std::cout << "Insert this line into your coin configuration file as is: " << std::endl; + std::cout << "#define GENESIS_COINBASE_TX_HEX \"" << tx_hex << "\"" << std::endl; + + return; +} + int main(int argc, char* argv[]) { @@ -69,6 +79,7 @@ int main(int argc, char* argv[]) command_line::add_arg(desc_cmd_sett, arg_log_level); command_line::add_arg(desc_cmd_sett, arg_console); command_line::add_arg(desc_cmd_sett, arg_testnet_on); + command_line::add_arg(desc_cmd_sett, arg_print_genesis_tx); cryptonote::core::init_options(desc_cmd_sett); cryptonote::core_rpc_server::init_options(desc_cmd_sett); @@ -90,6 +101,11 @@ int main(int argc, char* argv[]) return false; } + if (command_line::get_arg(vm, arg_print_genesis_tx)) { + print_genesis_tx_hex(); + return false; + } + std::string data_dir = command_line::get_arg(vm, command_line::arg_data_dir); std::string config = command_line::get_arg(vm, arg_config_file); diff --git a/src/version.h.in b/src/version.h.in index 7812a19d6f..ae6accfa7c 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -1,4 +1,4 @@ #define BUILD_COMMIT_ID "@VERSION@" -#define PROJECT_VERSION "1.0.0" +#define PROJECT_VERSION "1.0.1" #define PROJECT_VERSION_BUILD_NO "1" #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO "(" BUILD_COMMIT_ID ")" diff --git a/src/wallet/Wallet.cpp b/src/wallet/Wallet.cpp index 15e790cd57..984d8156fe 100644 --- a/src/wallet/Wallet.cpp +++ b/src/wallet/Wallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/Wallet.h b/src/wallet/Wallet.h index 6ca795d326..cf3e6bf397 100644 --- a/src/wallet/Wallet.h +++ b/src/wallet/Wallet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletAsyncContextCounter.cpp b/src/wallet/WalletAsyncContextCounter.cpp index 752933b6be..8ec39b4519 100644 --- a/src/wallet/WalletAsyncContextCounter.cpp +++ b/src/wallet/WalletAsyncContextCounter.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletAsyncContextCounter.h b/src/wallet/WalletAsyncContextCounter.h index c7acd6626d..322551b317 100644 --- a/src/wallet/WalletAsyncContextCounter.h +++ b/src/wallet/WalletAsyncContextCounter.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletErrors.cpp b/src/wallet/WalletErrors.cpp index 792c046de6..6e3f375665 100644 --- a/src/wallet/WalletErrors.cpp +++ b/src/wallet/WalletErrors.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletErrors.h b/src/wallet/WalletErrors.h index e62617f2b8..2d79f92856 100644 --- a/src/wallet/WalletErrors.h +++ b/src/wallet/WalletErrors.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletEvent.h b/src/wallet/WalletEvent.h index 10bc210a42..3e7d51aa08 100644 --- a/src/wallet/WalletEvent.h +++ b/src/wallet/WalletEvent.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletRequest.h b/src/wallet/WalletRequest.h index d3b43df77a..c5ae6bffdf 100644 --- a/src/wallet/WalletRequest.h +++ b/src/wallet/WalletRequest.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletSendTransactionContext.h b/src/wallet/WalletSendTransactionContext.h index 796d5573a5..ff117d6c1e 100644 --- a/src/wallet/WalletSendTransactionContext.h +++ b/src/wallet/WalletSendTransactionContext.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletSerialization.h b/src/wallet/WalletSerialization.h index 5d8e2a1a7f..0e970f2e3f 100644 --- a/src/wallet/WalletSerialization.h +++ b/src/wallet/WalletSerialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletSynchronizationContext.h b/src/wallet/WalletSynchronizationContext.h index 423da4944c..de4abe850e 100644 --- a/src/wallet/WalletSynchronizationContext.h +++ b/src/wallet/WalletSynchronizationContext.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletSynchronizer.cpp b/src/wallet/WalletSynchronizer.cpp index 9b94815663..04be48c6af 100644 --- a/src/wallet/WalletSynchronizer.cpp +++ b/src/wallet/WalletSynchronizer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletSynchronizer.h b/src/wallet/WalletSynchronizer.h index c86ee1310d..8e1e61ddba 100644 --- a/src/wallet/WalletSynchronizer.h +++ b/src/wallet/WalletSynchronizer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletTransactionSender.cpp b/src/wallet/WalletTransactionSender.cpp index 737a769cc8..53d3df4fc8 100644 --- a/src/wallet/WalletTransactionSender.cpp +++ b/src/wallet/WalletTransactionSender.cpp @@ -1,9 +1,7 @@ -/* - * WalletTransactionSender.cpp - * - * Created on: 18 июня 2014 г. - * Author: milo - */ +// Copyright (c) 2011-2014 The Cryptonote developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "WalletTransactionSender.h" #include "WalletUtils.h" diff --git a/src/wallet/WalletTransactionSender.h b/src/wallet/WalletTransactionSender.h index 9a51190c2a..0a51d89210 100644 --- a/src/wallet/WalletTransactionSender.h +++ b/src/wallet/WalletTransactionSender.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletTransferDetails.cpp b/src/wallet/WalletTransferDetails.cpp index 8c05ce8b28..36350f9c2b 100644 --- a/src/wallet/WalletTransferDetails.cpp +++ b/src/wallet/WalletTransferDetails.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletTransferDetails.h b/src/wallet/WalletTransferDetails.h index 7dbdae12a4..5658f1ee8d 100644 --- a/src/wallet/WalletTransferDetails.h +++ b/src/wallet/WalletTransferDetails.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletTxSendingState.cpp b/src/wallet/WalletTxSendingState.cpp index fe1fda6c1d..d371b07013 100644 --- a/src/wallet/WalletTxSendingState.cpp +++ b/src/wallet/WalletTxSendingState.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletTxSendingState.h b/src/wallet/WalletTxSendingState.h index 65ba7d30b9..0ea36264ee 100644 --- a/src/wallet/WalletTxSendingState.h +++ b/src/wallet/WalletTxSendingState.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletUnconfirmedTransactions.cpp b/src/wallet/WalletUnconfirmedTransactions.cpp index 53a632cb36..7fb0d5785d 100644 --- a/src/wallet/WalletUnconfirmedTransactions.cpp +++ b/src/wallet/WalletUnconfirmedTransactions.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletUnconfirmedTransactions.h b/src/wallet/WalletUnconfirmedTransactions.h index bfd99634de..7341688f4e 100644 --- a/src/wallet/WalletUnconfirmedTransactions.h +++ b/src/wallet/WalletUnconfirmedTransactions.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletUserTransactionsCache.cpp b/src/wallet/WalletUserTransactionsCache.cpp index f0adbc98c4..989f1c85f6 100644 --- a/src/wallet/WalletUserTransactionsCache.cpp +++ b/src/wallet/WalletUserTransactionsCache.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletUserTransactionsCache.h b/src/wallet/WalletUserTransactionsCache.h index 48971bfdde..a21cc86917 100644 --- a/src/wallet/WalletUserTransactionsCache.h +++ b/src/wallet/WalletUserTransactionsCache.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/WalletUtils.h b/src/wallet/WalletUtils.h index 46d57793ca..4074f609cc 100644 --- a/src/wallet/WalletUtils.h +++ b/src/wallet/WalletUtils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2013 The Cryptonote developers +// Copyright (c) 2011-2014 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. From eefb4111cdee0aa127e2dd186efffadd9d25b070 Mon Sep 17 00:00:00 2001 From: Albert Werner Date: Fri, 18 Jul 2014 16:35:40 +0400 Subject: [PATCH 6/9] Update README --- README | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/README b/README index 051cbea0be..b33aada9d3 100644 --- a/README +++ b/README @@ -133,28 +133,33 @@ Example: == Fifth step. Genesis block == -Now your coin code is almost ready. You need to generate the coinbase transaction for your genesis block. Uncomment the following code in "generate_genesis_block(block& bl)" function in src/cryptonote_core/cryptonote_format_utils.cpp: +1. Build the binaries with blank genesis tx hex (src/cryptonote_config.h) - /* - account_public_address ac = boost::value_initialized(); - std::vector sz; - construct_miner_tx(0, 0, 0, 0, 0, ac, bl.miner_tx); // zero fee in genesis - blobdata txb = tx_to_blob(bl.miner_tx); - std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb); - std::cout << "Genesis block hex: " << hex_tx_represent << std::endl; - */ +You should leave #define GENESIS_COINBASE_TX_HEX blank and compile the binaries without it. -Compile and run the daemon. As soon as it prints line starting with "Genesis coinbase tx hex: " copy the hex representation of the coinbase tx and paste it into generate_genesis_block function: +Example: +#define GENESIS_COINBASE_TX_HEX "" + + +2. Start the daemon to print out the genesis block -Genesis coinbase tx hex: 013c01ff0001ffffffffffff0f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121012cfb466857c5762cdd97e242b08b7e239ab35807f5024d4785a33d9ebdba68b0 +Run your daemon with --print-genesis-tx argument. It will print out the genesis block coinbase transaction hash. + +Example: +cryptonotecoind --print-genesis-tx --> -std::string genesis_coinbase_tx_hex = "013c01ff0001ffffffffffff0f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121012cfb466857c5762cdd97e242b08b7e239ab35807f5024d4785a33d9ebdba68b0"; +3. Copy the printed transaction hash — (src/cryptonote_config.h) + +Copy the tx hash that has been printed by the daemon to GENESIS_COINBASE_TX_HEX in /src/cryptonote_config.h + +Example: +#define GENESIS_COINBASE_TX_HEX "013c01ff0001ffff...785a33d9ebdba68b0" + -Comment the coinbase tx generation code back and recompile everything again. +4. Recompile the binaries -You coin code is ready now. Make an announcement for the potential users and enjoy! +Recompile everything again. Your coin code is ready now. Make an announcement for the potential users and enjoy! == Building CryptoNote == @@ -182,7 +187,7 @@ http://www.microsoft.com/ http://www.cmake.org/ http://www.boost.org/ -To build, change to a directory where this file is located, and run this commands: +To build, change to a directory where this file is located, and run theas commands: mkdir build cd build cmake -G "Visual Studio 11 Win64" .. From 6be8153a8bddf7be43aca1efb829ba719409787a Mon Sep 17 00:00:00 2001 From: cryptonotefoundation Date: Fri, 5 Sep 2014 13:46:10 +0000 Subject: [PATCH 7/9] CryptoC-3: fix for Merkle tree root issue --- src/crypto/tree-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/tree-hash.c b/src/crypto/tree-hash.c index a2b0eeaa5b..87423fb82a 100644 --- a/src/crypto/tree-hash.c +++ b/src/crypto/tree-hash.c @@ -19,7 +19,7 @@ void tree_hash(const char (*hashes)[HASH_SIZE], size_t count, char *root_hash) { size_t i, j; size_t cnt = count - 1; char (*ints)[HASH_SIZE]; - for (i = 1; i < sizeof(size_t); i <<= 1) { + for (i = 1; i < 8 * sizeof(size_t); i <<= 1) { cnt |= cnt >> i; } cnt &= ~(cnt >> 1); From b00a96c2661deb9a40b7e0760a8519fe5d140989 Mon Sep 17 00:00:00 2001 From: cryptonotefoundation Date: Tue, 17 Feb 2015 18:13:48 +0300 Subject: [PATCH 8/9] Update README --- README => README.md | 146 ++++++++++++++++++++++++++------------------ 1 file changed, 88 insertions(+), 58 deletions(-) rename README => README.md (58%) diff --git a/README b/README.md similarity index 58% rename from README rename to README.md index b33aada9d3..a31442cb98 100644 --- a/README +++ b/README.md @@ -1,50 +1,64 @@ -== Preparation == +This is the reference code for [CryptoNote](https://cryptonote.org) cryptocurrency protocol. +* Launch your own CryptoNote currency: [CryptoNote Starter](https://cryptonotestarter.org/) +* CryptoNote reference implementation: [CryptoNoteCoin](https://cryptonote-coin.org) +* Discussion board and support: [CryptoNote Forum](https://forum.cryptonote.org) -1. Create an account on github.com +## CryptoNote forking how-to -2. Fork https://github.com/cryptonotefoundation/cryptonote repository +### Preparation -3. Buy one or two Ubuntu-based dedicated servers (at least 8Gb of RAM) for seed nodes. +1. Create an account on [GitHub.com](github.com) +2. Fork [CryptoNote repository](https://github.com/cryptonotefoundation/cryptonote) +3. Buy one or two Ubuntu-based dedicated servers (at least 2Gb of RAM) for seed nodes. -== First step. Give a name to your coin == -Good name must be unique. Check uniqueness with google and mapofcoins.com or any other similar service. +### First step. Give a name to your coin + +**Good name must be unique.*** Check uniqueness with [google](http://google.com) and [Map of Coins](mapofcoins.com) or any other similar service. Name must be specified twice: -- in file src/cryptonote_config.h - CRYPTONOTE_NAME macro +**1. in file src/cryptonote_config.h** - CRYPTONOTE_NAME macro -Example: +Example: +``` #define CRYPTONOTE_NAME "furiouscoin" +``` -- in CMakeList.txt file - set_property(TARGET daemon PROPERTY OUTPUT_NAME "YOURCOINNAMEd") +**2. in CMakeList.txt file** - set_property(TARGET daemon PROPERTY OUTPUT_NAME "YOURCOINNAMEd") -Example: +Example: +``` set_property(TARGET daemon PROPERTY OUTPUT_NAME "furiouscoind") +``` -Note: You should also change a repository name. +**Note:** You should also change a repository name. -== Second step. Emission logic == +### Second step. Emission logic -1. Total money supply (src/cryptonote_config.h) +**1. Total money supply** (src/cryptonote_config.h) -Total amount of coins to be emitted. Most of CryptoNote based coins use (uint64_t)(-1) (equals to 18446744073709551616). You can define number explicitly (for example UINT64_C(858986905600000000)). +Total amount of coins to be emitted. Most of CryptoNote based coins use `(uint64_t)(-1)` (equals to 18446744073709551616). You can define number explicitly (for example UINT64_C(858986905600000000)). Example: +``` #define MONEY_SUPPLY ((uint64_t)(-1)) +``` -2. Emission curve (src/cryptonote_config.h) +**2. Emission curve** (src/cryptonote_config.h) Be default CryptoNote provides emission formula with slight decrease of block reward with each block. This is different from Bitcoin where block reward halves every 4 years. EMISSION_SPEED_FACTOR macro defines emission curve slope. This parameter is required to calulate block reward. Example: +``` #define EMISSION_SPEED_FACTOR (18) +``` -3. Difficulty target (src/cryptonote_config.h) +**3. Difficulty target** (src/cryptonote_config.h) Difficulty target is an ideal time period between blocks. In case an average time between blocks becomes less than difficulty target, the difficulty increases. Difficulty target is measured in seconds. @@ -57,140 +71,156 @@ Difficulty target directly influences several aspects of coin's behavior: For most coins difficulty target is 60 or 120 seconds. Example: +``` #define DIFFICULTY_TARGET 120 +``` -4. Block reward formula +**4. Block reward formula** In case you are not satisfied with CryptoNote default implementation of block reward logic you can also change it. The implementation is in src/cryptonote_core/cryptonote_basic_impl.cpp: - +``` bool get_block_reward(size_t median_size, size_t current_block_size, uint64_t already_generated_coins, uint64_t &reward) +``` This function has two parts: -- basic block reward calculation - -uint64_t base_reward = (MONEY_SUPPLY - already_generated_coins) >> EMISSION_SPEED_FACTOR; - -- big block penalty calculation - -This is the way CryptoNote protects the block chain from transaction flooding attacks and preserves opportunities for organic network growth at the same time. +- basic block reward calculation: `uint64_t base_reward = (MONEY_SUPPLY - already_generated_coins) >> EMISSION_SPEED_FACTOR;` +- big block penalty calculation: this is the way CryptoNote protects the block chain from transaction flooding attacks and preserves opportunities for organic network growth at the same time. Only the first part of this function is directly related to the emission logic. You can change it the way you want. See MonetaVerde and DuckNote as the examples where this function is modified. -== Third step. Networking == +### Third step. Networking -1. Default ports for P2P and RPC networking (src/cryptonote_config.h) +**1. Default ports for P2P and RPC networking** (src/cryptonote_config.h) P2P port is used by daemons to talk to each other through P2P protocol. RPC port is used by wallet and other programs to talk to daemon. It's better to choose ports that aren't used by other software or coins. See known TCP ports lists: -- http://www.speedguide.net/ports.php -- http://www.networksorcery.com/enp/protocol/ip/ports00000.htm -- http://keir.net/portlist.html +* http://www.speedguide.net/ports.php +* http://www.networksorcery.com/enp/protocol/ip/ports00000.htm +* http://keir.net/portlist.html Example: - +``` #define P2P_DEFAULT_PORT 17236 #define RPC_DEFAULT_PORT 18236 +``` -2. Network identifier (src/p2p/p2p_networks.h) +**2. Network identifier** (src/p2p/p2p_networks.h) This identifier is used in network packages in order not to mix two different cryptocoin networks. Change all the bytes to random values for your network: - +``` const static boost::uuids::uuid CRYPTONOTE_NETWORK = { { 0xA1 ,0x1A, 0xA1, 0x1A , 0xA1, 0x0A , 0xA1, 0x0A, 0xA0, 0x1A, 0xA0, 0x1A, 0xA0, 0x1A, 0xA1, 0x1A} }; +``` -3. Seed nodes (src/p2p/net_node.inl) +**3. Seed nodes** (src/p2p/net_node.inl) -Add ip addresses of your seed nodes to the beginning of "node_server::init(const boost::program_options::variables_map& vm)" function. +Add ip addresses of your seed nodes to the beginning of `node_server::init(const boost::program_options::variables_map& vm)` function. Example: +``` ADD_HARDCODED_SEED_NODE("111.11.11.11:17236"); ADD_HARDCODED_SEED_NODE("222.22.22.22:17236"); +``` -== Fourth step. Transaction fee and related parameters == +### Fourth step. Transaction fee and related parameters -1. Default transaction fee (src/cryptonote_config.h) +**1. Default transaction fee** (src/cryptonote_config.h) Zero default fee can lead to transaction flooding. Transactions cheaper than the default transaction fee wouldn't be accepted by daemons. 100000 value for DEFAULT_FEE is usually enough. Example: +``` #define DEFAULT_FEE 100000 +``` -2. Penalty free block size (src/cryptonote_config.h) +**2. Penalty free block size** (src/cryptonote_config.h) CryptoNote protects chain from tx flooding by reducing block reward for blocks larger than the median block size. However, this rule applies for blocks larger than CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE bytes. Example: +``` #define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE 20000 +``` -== Fifth step. Genesis block == +### Fifth step. Genesis block -1. Build the binaries with blank genesis tx hex (src/cryptonote_config.h) +**1. Build the binaries with blank genesis tx hex** (src/cryptonote_config.h) You should leave #define GENESIS_COINBASE_TX_HEX blank and compile the binaries without it. Example: +``` #define GENESIS_COINBASE_TX_HEX "" +``` -2. Start the daemon to print out the genesis block +**2. Start the daemon to print out the genesis block** Run your daemon with --print-genesis-tx argument. It will print out the genesis block coinbase transaction hash. Example: +``` cryptonotecoind --print-genesis-tx +``` -3. Copy the printed transaction hash — (src/cryptonote_config.h) +**3. Copy the printed transaction hash** (src/cryptonote_config.h) Copy the tx hash that has been printed by the daemon to GENESIS_COINBASE_TX_HEX in /src/cryptonote_config.h Example: +``` #define GENESIS_COINBASE_TX_HEX "013c01ff0001ffff...785a33d9ebdba68b0" +``` -4. Recompile the binaries +**4. Recompile the binaries** Recompile everything again. Your coin code is ready now. Make an announcement for the potential users and enjoy! -== Building CryptoNote == +## Building CryptoNote + +### On *nix -On *nix: +Dependencies: GCC 4.7.3 or later, CMake 2.8.6 or later, and Boost 1.53 or later (except 1.54, more details here: http://goo.gl/RrCFmA). -Dependencies: GCC 4.7.3 or later, CMake 2.8.6 or later, and Boost 1.53 or later (except 1.54, more details here: http://goo.gl/RrCFmA). You may download them from: -http://gcc.gnu.org/ -http://www.cmake.org/ -http://www.boost.org/ +* http://gcc.gnu.org/ +* http://www.cmake.org/ +* http://www.boost.org/ +* Alternatively, it may be possible to install them using a package manager. To build, change to a directory where this file is located, and run `make'. The resulting executables can be found in build/release/src. -Advanced options: -Parallel build: run `make -j' instead of `make'. -Debug build: run `make build-debug'. -Test suite: run `make test-release' to run tests in addition to building. Running `make test-debug' will do the same to the debug version. -Building with Clang: it may be possible to use Clang instead of GCC, but this may not work everywhere. To build, run `export CC=clang CXX=clang++' before running `make'. +**Advanced options:** +* Parallel build: run `make -j` instead of `make`. +* Debug build: run `make build-debug`. +* Test suite: run `make test-release` to run tests in addition to building. Running `make test-debug` will do the same to the debug version. +* Building with Clang: it may be possible to use Clang instead of GCC, but this may not work everywhere. To build, run `export CC=clang CXX=clang++` before running `make`. -On Windows: +### On Windows Dependencies: MSVC 2012 or later, CMake 2.8.6 or later, and Boost 1.53 or later. You may download them from: -http://www.microsoft.com/ -http://www.cmake.org/ -http://www.boost.org/ +* http://www.microsoft.com/ +* http://www.cmake.org/ +* http://www.boost.org/ To build, change to a directory where this file is located, and run theas commands: +``` mkdir build cd build cmake -G "Visual Studio 11 Win64" .. +``` And then do Build. Good luck! \ No newline at end of file From 531dacc47d686c158fad47e9bb72f6802edcce89 Mon Sep 17 00:00:00 2001 From: cryptonotefoundation Date: Thu, 19 Nov 2015 10:28:31 +0000 Subject: [PATCH 9/9] [Issue #13] Correct 'Daemon' target in src/CMakeLists.txt --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 316c06f9ea..8712c995da 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -78,4 +78,4 @@ set_property(TARGET ConnectivityTool PROPERTY OUTPUT_NAME "connectivity_tool") set_property(TARGET SimpleWallet PROPERTY OUTPUT_NAME "simplewallet") set_property(TARGET PaymentGateService PROPERTY OUTPUT_NAME "walletd") #TODO Specify the name of daemon for your currency -set_property(TARGET daemon PROPERTY OUTPUT_NAME "cryptonoted") +set_property(TARGET Daemon PROPERTY OUTPUT_NAME "cryptonoted")