diff --git a/Makefile b/Makefile index f21038b74..39e3a151e 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ debug-static-win32: cmake-release: mkdir -p $(builddir)/release - cd $(builddir)/release && cmake -D CMAKE_BUILD_TYPE=Release $(topdir) + cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=Release $(topdir) release: cmake-release cd $(builddir)/release && $(MAKE) @@ -92,11 +92,11 @@ release-test: release-all: mkdir -p $(builddir)/release - cd $(builddir)/release && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=release $(topdir) && $(MAKE) + cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=release $(topdir) && $(MAKE) release-static: mkdir -p $(builddir)/release - cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release $(topdir) && $(MAKE) + cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release $(topdir) && $(MAKE) coverage: mkdir -p $(builddir)/debug diff --git a/src/blockchain_db/blockchain_db.cpp b/src/blockchain_db/blockchain_db.cpp index be0ffeac3..4647667b3 100644 --- a/src/blockchain_db/blockchain_db.cpp +++ b/src/blockchain_db/blockchain_db.cpp @@ -919,7 +919,7 @@ void BlockchainDB::fixup() "633cdedeb3b96ec4f234c670254c6f721e0b368d00b48c6b26759db7d62cf52d", }; - if (height() > 202612) + if (height() > 202612 && strcmp(CRYPTONOTE_NAME, "monero")==0) { for (const auto &kis: key_images_202612) { @@ -932,7 +932,7 @@ void BlockchainDB::fixup() } } } - if (height() > 685498) + if (height() > 685498 && strcmp(CRYPTONOTE_NAME, "monero")==0) { for (const auto &kis: key_images_685498) { diff --git a/src/blockchain_utilities/CMakeLists.txt b/src/blockchain_utilities/CMakeLists.txt index c9ad1cebe..19757c420 100644 --- a/src/blockchain_utilities/CMakeLists.txt +++ b/src/blockchain_utilities/CMakeLists.txt @@ -135,7 +135,7 @@ endif() set_property(TARGET blockchain_import PROPERTY - OUTPUT_NAME "monero-blockchain-import") + OUTPUT_NAME "wownero-blockchain-import") install(TARGETS blockchain_import DESTINATION bin) monero_add_executable(blockchain_export @@ -156,7 +156,7 @@ target_link_libraries(blockchain_export set_property(TARGET blockchain_export PROPERTY - OUTPUT_NAME "monero-blockchain-export") + OUTPUT_NAME "wownero-blockchain-export") install(TARGETS blockchain_export DESTINATION bin) monero_add_executable(blockchain_blackball @@ -178,7 +178,7 @@ target_link_libraries(blockchain_blackball set_property(TARGET blockchain_blackball PROPERTY - OUTPUT_NAME "monero-blockchain-mark-spent-outputs") + OUTPUT_NAME "wownero-blockchain-mark-spent-outputs") install(TARGETS blockchain_blackball DESTINATION bin) @@ -200,7 +200,7 @@ target_link_libraries(blockchain_usage set_property(TARGET blockchain_usage PROPERTY - OUTPUT_NAME "monero-blockchain-usage") + OUTPUT_NAME "wownero-blockchain-usage") install(TARGETS blockchain_usage DESTINATION bin) monero_add_executable(blockchain_ancestry @@ -221,7 +221,7 @@ target_link_libraries(blockchain_ancestry set_property(TARGET blockchain_ancestry PROPERTY - OUTPUT_NAME "monero-blockchain-ancestry") + OUTPUT_NAME "wownero-blockchain-ancestry") install(TARGETS blockchain_ancestry DESTINATION bin) monero_add_executable(blockchain_depth @@ -242,7 +242,7 @@ target_link_libraries(blockchain_depth set_property(TARGET blockchain_depth PROPERTY - OUTPUT_NAME "monero-blockchain-depth") + OUTPUT_NAME "wownero-blockchain-depth") install(TARGETS blockchain_depth DESTINATION bin) monero_add_executable(blockchain_stats @@ -263,5 +263,5 @@ target_link_libraries(blockchain_stats set_property(TARGET blockchain_stats PROPERTY - OUTPUT_NAME "monero-blockchain-stats") + OUTPUT_NAME "wownero-blockchain-stats") install(TARGETS blockchain_stats DESTINATION bin) diff --git a/src/blockchain_utilities/blockchain_ancestry.cpp b/src/blockchain_utilities/blockchain_ancestry.cpp index e01a8892c..7f57a6bbb 100644 --- a/src/blockchain_utilities/blockchain_ancestry.cpp +++ b/src/blockchain_utilities/blockchain_ancestry.cpp @@ -282,12 +282,12 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << desc_options << std::endl; return 1; } - mlog_configure(mlog_get_default_log_path("monero-blockchain-ancestry.log"), true); + mlog_configure(mlog_get_default_log_path("wownero-blockchain-ancestry.log"), true); if (!command_line::is_arg_defaulted(vm, arg_log_level)) mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str()); else diff --git a/src/blockchain_utilities/blockchain_blackball.cpp b/src/blockchain_utilities/blockchain_blackball.cpp index d2ce5cf76..998196286 100644 --- a/src/blockchain_utilities/blockchain_blackball.cpp +++ b/src/blockchain_utilities/blockchain_blackball.cpp @@ -1029,7 +1029,7 @@ int main(int argc, char* argv[]) const command_line::arg_descriptor arg_rct_only = {"rct-only", "Only work on ringCT outputs", false}; const command_line::arg_descriptor arg_check_subsets = {"check-subsets", "Check ring subsets (very expensive)", false}; const command_line::arg_descriptor arg_verbose = {"verbose", "Verbose output)", false}; - const command_line::arg_descriptor > arg_inputs = {"inputs", "Path to Monero DB, and path to any fork DBs"}; + const command_line::arg_descriptor > arg_inputs = {"inputs", "Path to Wownero DB, and path to any fork DBs"}; const command_line::arg_descriptor arg_db_sync_mode = { "db-sync-mode" , "Specify sync option, using format [safe|fast|fastest]:[nrecords_per_sync]." @@ -1071,12 +1071,12 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << desc_options << std::endl; return 1; } - mlog_configure(mlog_get_default_log_path("monero-blockchain-find-spent-outputs.log"), true); + mlog_configure(mlog_get_default_log_path("wownero-blockchain-find-spent-outputs.log"), true); if (!command_line::is_arg_defaulted(vm, arg_log_level)) mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str()); else diff --git a/src/blockchain_utilities/blockchain_depth.cpp b/src/blockchain_utilities/blockchain_depth.cpp index 8060b0de4..59daf4b8d 100644 --- a/src/blockchain_utilities/blockchain_depth.cpp +++ b/src/blockchain_utilities/blockchain_depth.cpp @@ -97,12 +97,12 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << desc_options << std::endl; return 1; } - mlog_configure(mlog_get_default_log_path("monero-blockchain-depth.log"), true); + mlog_configure(mlog_get_default_log_path("wownero-blockchain-depth.log"), true); if (!command_line::is_arg_defaulted(vm, arg_log_level)) mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str()); else diff --git a/src/blockchain_utilities/blockchain_export.cpp b/src/blockchain_utilities/blockchain_export.cpp index 5a49f3478..1fe6d8360 100644 --- a/src/blockchain_utilities/blockchain_export.cpp +++ b/src/blockchain_utilities/blockchain_export.cpp @@ -97,12 +97,12 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << desc_options << std::endl; return 1; } - mlog_configure(mlog_get_default_log_path("monero-blockchain-export.log"), true); + mlog_configure(mlog_get_default_log_path("wownero-blockchain-export.log"), true); if (!command_line::is_arg_defaulted(vm, arg_log_level)) mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str()); else diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index eae078ea2..f9c8ff604 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -643,7 +643,7 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << desc_options << std::endl; return 1; } @@ -681,7 +681,7 @@ int main(int argc, char* argv[]) m_config_folder = command_line::get_arg(vm, cryptonote::arg_data_dir); db_arg_str = command_line::get_arg(vm, arg_database); - mlog_configure(mlog_get_default_log_path("monero-blockchain-import.log"), true); + mlog_configure(mlog_get_default_log_path("wownero-blockchain-import.log"), true); if (!command_line::is_arg_defaulted(vm, arg_log_level)) mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str()); else diff --git a/src/blockchain_utilities/blockchain_stats.cpp b/src/blockchain_utilities/blockchain_stats.cpp index 716b33cae..2aabd7b9d 100644 --- a/src/blockchain_utilities/blockchain_stats.cpp +++ b/src/blockchain_utilities/blockchain_stats.cpp @@ -107,12 +107,12 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << desc_options << std::endl; return 1; } - mlog_configure(mlog_get_default_log_path("monero-blockchain-stats.log"), true); + mlog_configure(mlog_get_default_log_path("wownero-blockchain-stats.log"), true); if (!command_line::is_arg_defaulted(vm, arg_log_level)) mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str()); else diff --git a/src/blockchain_utilities/blockchain_usage.cpp b/src/blockchain_utilities/blockchain_usage.cpp index 38a0b2648..61be42b44 100644 --- a/src/blockchain_utilities/blockchain_usage.cpp +++ b/src/blockchain_utilities/blockchain_usage.cpp @@ -129,12 +129,12 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << desc_options << std::endl; return 1; } - mlog_configure(mlog_get_default_log_path("monero-blockchain-usage.log"), true); + mlog_configure(mlog_get_default_log_path("wownero-blockchain-usage.log"), true); if (!command_line::is_arg_defaulted(vm, arg_log_level)) mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str()); else diff --git a/src/checkpoints/checkpoints.cpp b/src/checkpoints/checkpoints.cpp index 6251fcc91..33b61d282 100644 --- a/src/checkpoints/checkpoints.cpp +++ b/src/checkpoints/checkpoints.cpp @@ -163,53 +163,52 @@ namespace cryptonote { if (nettype == TESTNET) { - ADD_CHECKPOINT(0, "48ca7cd3c8de5b6a4d53d2861fbdaedca141553559f9be9520068053cda8430b"); - ADD_CHECKPOINT(1000000, "46b690b710a07ea051bc4a6b6842ac37be691089c0f7758cfeec4d5fc0b4a258"); - ADD_CHECKPOINT(1058600, "12904f6b4d9e60fd875674e07147d2c83d6716253f046af7b894c3e81da7e1bd"); return true; } if (nettype == STAGENET) { - ADD_CHECKPOINT(0, "76ee3cc98646292206cd3e86f74d88b4dcc1d937088645e9b0cbca84b7ce74eb"); - ADD_CHECKPOINT(10000, "1f8b0ce313f8b9ba9a46108bfd285c45ad7c2176871fd41c3a690d4830ce2fd5"); return true; } - ADD_CHECKPOINT(1, "771fbcd656ec1464d3a02ead5e18644030007a0fc664c0a964d30922821a8148"); - ADD_CHECKPOINT(10, "c0e3b387e47042f72d8ccdca88071ff96bff1ac7cde09ae113dbb7ad3fe92381"); - ADD_CHECKPOINT(100, "ac3e11ca545e57c49fca2b4e8c48c03c23be047c43e471e1394528b1f9f80b2d"); - ADD_CHECKPOINT(1000, "5acfc45acffd2b2e7345caf42fa02308c5793f15ec33946e969e829f40b03876"); - ADD_CHECKPOINT(10000, "c758b7c81f928be3295d45e230646de8b852ec96a821eac3fea4daf3fcac0ca2"); - ADD_CHECKPOINT(22231, "7cb10e29d67e1c069e6e11b17d30b809724255fee2f6868dc14cfc6ed44dfb25"); - ADD_CHECKPOINT(29556, "53c484a8ed91e4da621bb2fa88106dbde426fe90d7ef07b9c1e5127fb6f3a7f6"); - ADD_CHECKPOINT(50000, "0fe8758ab06a8b9cb35b7328fd4f757af530a5d37759f9d3e421023231f7b31c"); - ADD_CHECKPOINT(80000, "a62dcd7b536f22e003ebae8726e9e7276f63d594e264b6f0cd7aab27b66e75e3"); - ADD_CHECKPOINT(202612, "bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698"); - ADD_CHECKPOINT(202613, "e2aa337e78df1f98f462b3b1e560c6b914dec47b610698b7b7d1e3e86b6197c2"); - ADD_CHECKPOINT(202614, "c29e3dc37d8da3e72e506e31a213a58771b24450144305bcba9e70fa4d6ea6fb"); - ADD_CHECKPOINT(205000, "5d3d7a26e6dc7535e34f03def711daa8c263785f73ec1fadef8a45880fde8063"); - ADD_CHECKPOINT(220000, "9613f455933c00e3e33ac315cc6b455ee8aa0c567163836858c2d9caff111553"); - ADD_CHECKPOINT(230300, "bae7a80c46859db355556e3a9204a337ae8f24309926a1312323fdecf1920e61"); - ADD_CHECKPOINT(230700, "93e631240ceac831da1aebfc5dac8f722c430463024763ebafa888796ceaeedf"); - ADD_CHECKPOINT(231350, "b5add137199b820e1ea26640e5c3e121fd85faa86a1e39cf7e6cc097bdeb1131"); - ADD_CHECKPOINT(232150, "955de8e6b6508af2c24f7334f97beeea651d78e9ade3ab18fec3763be3201aa8"); - ADD_CHECKPOINT(249380, "654fb0a81ce3e5caf7e3264a70f447d4bd07586c08fa50f6638cc54da0a52b2d"); - ADD_CHECKPOINT(460000, "75037a7aed3e765db96c75bcf908f59d690a5f3390baebb9edeafd336a1c4831"); - ADD_CHECKPOINT(500000, "2428f0dbe49796be05ed81b347f53e1f7f44aed0abf641446ec2b94cae066b02"); - ADD_CHECKPOINT(600000, "f5828ebf7d7d1cb61762c4dfe3ccf4ecab2e1aad23e8113668d981713b7a54c5"); - ADD_CHECKPOINT(700000, "12be9b3d210b93f574d2526abb9c1ab2a881b479131fd0d4f7dac93875f503cd"); - ADD_CHECKPOINT(825000, "56503f9ad766774b575be3aff73245e9d159be88132c93d1754764f28da2ff60"); - ADD_CHECKPOINT(900000, "d9958d0e7dcf91a5a7b11de225927bf7efc6eb26240315ce12372be902cc1337"); - ADD_CHECKPOINT(913193, "5292d5d56f6ba4de33a58d9a34d263e2cb3c6fee0aed2286fd4ac7f36d53c85f"); - ADD_CHECKPOINT(1000000, "a886ef5149902d8342475fee9bb296341b891ac67c4842f47a833f23c00ed721"); - ADD_CHECKPOINT(1100000, "3fd720c5c8b3072fc1ccda922dec1ef25f9ed88a1e6ad4103d0fe00b180a5903"); - ADD_CHECKPOINT(1150000, "1dd16f626d18e1e988490dfd06de5920e22629c972c58b4d8daddea0038627b2"); - ADD_CHECKPOINT(1200000, "fa7d13a90850882060479d100141ff84286599ae39c3277c8ea784393f882d1f"); - ADD_CHECKPOINT(1300000, "31b34272343a44a9f4ac7de7a8fcf3b7d8a3124d7d6870affd510d2f37e74cd0"); - ADD_CHECKPOINT(1390000, "a8f5649dd4ded60eedab475f2bec8c934681c07e3cf640e9be0617554f13ff6c"); - ADD_CHECKPOINT(1450000, "ac94e8860093bc7c83e4e91215cba1d663421ecf4067a0ae609c3a8b52bcfac2"); - ADD_CHECKPOINT(1530000, "01759bce497ec38e63c78b1038892169203bb78f87e488172f6b854fcd63ba7e"); - ADD_CHECKPOINT(1579000, "7d0d7a2346373afd41ed1e744a939fc5d474a7dbaa257be5c6fff4009e789241"); - ADD_CHECKPOINT(1668900, "ac2dcaf3d2f58ffcf8391639f0f1ebafcb8eac43c49479c7c37f611868d07568"); + ADD_CHECKPOINT(1, "97f4ce4d7879b3bea54dcec738cd2ebb7952b4e9bb9743262310cd5fec749340"); + ADD_CHECKPOINT(10, "305472c87ff86d8afb3ec42634828462b0ed3d929fc05fa1ae668c3bee04837a"); + ADD_CHECKPOINT(100, "a92b9deae26e19322041cbc2f850fa905748ae1e5bf69b35ca90b247c5cbfc04"); + ADD_CHECKPOINT(1000, "62921e13030b29264439cafaf8320cf8aa039ee6ba7ba29c72f11b50a079269a"); + ADD_CHECKPOINT(2000, "b3e1d73e3d0243239481aa76cb075cf2428556f5dc4f2e30428ea2ba36693e97"); + ADD_CHECKPOINT(3000, "83a6e1ab394e80b8442b7b70b0e4c3a9fa0143e0ca51a33e829537ef5dd1bf13"); + ADD_CHECKPOINT(4000, "7c70722d8cb8106b4bec67e1790614cc6e98db7afd0843b96cdff6960a0e0073"); + ADD_CHECKPOINT(5000, "331ee74008e174e5fd1956f64c52793961b321a1366f7c6f7d324e8265df34f6"); + ADD_CHECKPOINT(6969, "aa7b66e8c461065139b55c29538a39c33ceda93e587f84d490ed573d80511c87"); //Hard fork to v8 + ADD_CHECKPOINT(7000, "2711bd33b107f744ad8bf98c1acefa18658780079496bd2f3a36f2e20b261f8e"); + ADD_CHECKPOINT(7500, "5975967c4624f13f058acafe7adf9355e03e8e802eeadc84ccb22ea588bc0762"); + ADD_CHECKPOINT(7900, "d9bc18cb35feb6b26bc5a19bbdbf7c852d9cc02883acb5bbce2e87d8b2c86069"); + ADD_CHECKPOINT(10000, "bc5bfbf1b26c8f976d1d792ece4c6a7e93064bec62b72f1d5beae74c3f273b3b"); + ADD_CHECKPOINT(20000, "52cc7edcb49eb02f28a653b824089a726f4050eb210263ee6f4180d388a1e5cc"); + ADD_CHECKPOINT(30000, "d22fde5dd240ade16d3250eb0aa5d1c16dc7cb51c20484e05eb274911032b3fa"); + ADD_CHECKPOINT(40000, "aee0d642322542ba069cb1c58ab2acd3560f108d4682c3dc3cb15a54d442d91f"); + ADD_CHECKPOINT(50000, "5286ac2a0f39b3aefcba363cd71f2760bd1e0d763cbc81026ebdc3f80a86541f"); + ADD_CHECKPOINT(53666, "3f43f56f66ef0c43cf2fd14d0d28fa2aae0ef8f40716773511345750770f1255"); //Hard fork to v9 + ADD_CHECKPOINT(54500, "8ed3078b389c2b44add007803d741b58d3fbed2e1ba4139bda702152d8773c9b"); + ADD_CHECKPOINT(55000, "4b662ceccefc3247edb4d654dd610b8fb496e85b88a5de43cc2bdd28171b15ff"); + ADD_CHECKPOINT(57000, "08a79f09f12bb5d230b63963356a760d51618e526cfc636047a6f3798217c177"); + ADD_CHECKPOINT(59000, "180b51ee2c5fbcd4362eb7a29df9422481310dd77d10bccdf8930724c31e007e"); + ADD_CHECKPOINT(59900, "18cc0653ef39cb304c68045dba5eb6b885f936281cd939dea04d0e6c9cd4ae2e"); + ADD_CHECKPOINT(60000, "0f02aa57a63f79f63dafed9063abe228a37cb19f00430dc3168b8a8f4ae8016c"); + ADD_CHECKPOINT(61000, "509aca8c54eb5fe44623768757b6e890ae39d512478c75f614cbff3d91809350"); + ADD_CHECKPOINT(62000, "7fe91ad256c08dbd961e04738968be22fb481093fbfa7959bde7796ccceba0e2"); + ADD_CHECKPOINT(62150, "1a7c75f8ebeda0e20eb5877181eafd7db0fc887e3fed43e0b27ab2e7bccafd10"); + ADD_CHECKPOINT(62269, "4969555d60742afb93925fd96d83ac28f45e6e3c0e583c9fb3c92d9b2100d38f"); + ADD_CHECKPOINT(62405, "4d0ae890cf9f875f231c7069508ad28dc429d14814b52db114dfab7519a27584"); + ADD_CHECKPOINT(62419, "bd8bf5ac4c4fb07ab4d0d492bd1699def5c095ab6943ad3b63a89d1d8b1ce748"); + ADD_CHECKPOINT(62425, "41a922dba6f3906871b2ccaf31ec9c91033470c503959093dae796deda8940ea"); + ADD_CHECKPOINT(62479, "a2e8ff4205ba2980eb70921b0b21b5fc656ee273664ea94b860c68ca069b60dd"); + ADD_CHECKPOINT(62503, "25fa115962988b4b8f8cfd22744a3e653b22ead8c8468e64caf334fc75a97d08"); + ADD_CHECKPOINT(62550, "bde522a8a81c392c98c979434aa1dd9d20b4ca52230ba6ae0362872757808a48"); + ADD_CHECKPOINT(62629, "8368e1ce1d421f1fc969364558433e2b2363d0ffcb5f2d946633095e3e6734f5"); + ADD_CHECKPOINT(62720, "f871cddd75951e2fe24c282d2bd28396fc922ea519b354ace992a0162cb333ff"); + ADD_CHECKPOINT(62733, "8331dbeeaf23173d2235a062373a437befadb6492cceb7640127bf18653a9e61"); + ADD_CHECKPOINT(62877, "62d44adc05d7d4fd9d15239c5575612207beab0bcf2da49158bf89e365441ca1"); + ADD_CHECKPOINT(63469, "4e33a9343fc5b86661ec0affaeb5b5a065290602c02d817337e4a979fe5747d8"); //Hard fork to v10 + return true; } @@ -254,22 +253,13 @@ namespace cryptonote std::vector records; // All four MoneroPulse domains have DNSSEC on and valid - static const std::vector dns_urls = { "checkpoints.moneropulse.se" - , "checkpoints.moneropulse.org" - , "checkpoints.moneropulse.net" - , "checkpoints.moneropulse.co" + static const std::vector dns_urls = { }; - static const std::vector testnet_dns_urls = { "testpoints.moneropulse.se" - , "testpoints.moneropulse.org" - , "testpoints.moneropulse.net" - , "testpoints.moneropulse.co" + static const std::vector testnet_dns_urls = { }; - static const std::vector stagenet_dns_urls = { "stagenetpoints.moneropulse.se" - , "stagenetpoints.moneropulse.org" - , "stagenetpoints.moneropulse.net" - , "stagenetpoints.moneropulse.co" + static const std::vector stagenet_dns_urls = { }; if (!tools::dns_utils::load_txt_records_from_dns(records, nettype == TESTNET ? testnet_dns_urls : nettype == STAGENET ? stagenet_dns_urls : dns_urls)) diff --git a/src/common/updates.cpp b/src/common/updates.cpp index 9f12f8dbc..9152d4084 100644 --- a/src/common/updates.cpp +++ b/src/common/updates.cpp @@ -46,10 +46,6 @@ namespace tools // All four MoneroPulse domains have DNSSEC on and valid static const std::vector dns_urls = { - "updates.moneropulse.org", - "updates.moneropulse.net", - "updates.moneropulse.co", - "updates.moneropulse.se" }; if (!tools::dns_utils::load_txt_records_from_dns(records, dns_urls)) diff --git a/src/cryptonote_basic/cryptonote_basic_impl.cpp b/src/cryptonote_basic/cryptonote_basic_impl.cpp index c4e10851e..833992e94 100644 --- a/src/cryptonote_basic/cryptonote_basic_impl.cpp +++ b/src/cryptonote_basic/cryptonote_basic_impl.cpp @@ -93,7 +93,7 @@ namespace cryptonote { const int emission_speed_factor = EMISSION_SPEED_FACTOR_PER_MINUTE - (target_minutes-1); uint64_t base_reward = (MONEY_SUPPLY - already_generated_coins) >> emission_speed_factor; - if (base_reward < FINAL_SUBSIDY_PER_MINUTE*target_minutes) + if (base_reward <= FINAL_SUBSIDY_PER_MINUTE*target_minutes) { base_reward = FINAL_SUBSIDY_PER_MINUTE*target_minutes; } diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp index e26aac76b..22e340297 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.cpp +++ b/src/cryptonote_basic/cryptonote_format_utils.cpp @@ -862,7 +862,7 @@ namespace cryptonote { switch (decimal_point) { - case 12: + case 11: case 9: case 6: case 3: @@ -885,8 +885,8 @@ namespace cryptonote decimal_point = default_decimal_point; switch (std::atomic_load(&default_decimal_point)) { - case 12: - return "monero"; + case 11: + return "wownero"; case 9: return "millinero"; case 6: @@ -1091,7 +1091,7 @@ namespace cryptonote const std::string existing_block_id_202612 = "bbd604d2ba11ba27935e006ed39c9bfdd99b76bf4a50654bc1e1e61217962698"; crypto::hash block_blob_hash = get_blob_hash(block_to_blob(b)); - if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612) + if (string_tools::pod_to_hex(block_blob_hash) == correct_blob_hash_202612 && strcmp(CRYPTONOTE_NAME, "monero")==0) { string_tools::hex_to_pod(existing_block_id_202612, res); return true; @@ -1101,7 +1101,7 @@ namespace cryptonote if (hash_result) { // make sure that we aren't looking at a block with the 202612 block id but not the correct blobdata - if (string_tools::pod_to_hex(res) == existing_block_id_202612) + if (string_tools::pod_to_hex(res) == existing_block_id_202612 && strcmp(CRYPTONOTE_NAME, "monero")==0) { LOG_ERROR("Block with block id for 202612 but incorrect block blob hash found!"); res = null_hash; diff --git a/src/cryptonote_basic/difficulty.cpp b/src/cryptonote_basic/difficulty.cpp index cb2a00a12..5df386bd7 100644 --- a/src/cryptonote_basic/difficulty.cpp +++ b/src/cryptonote_basic/difficulty.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include "common/int-util.h" #include "crypto/hash.h" @@ -162,4 +163,149 @@ namespace cryptonote { return (low + time_span - 1) / time_span; } + // LWMA difficulty algorithm + // Background: https://github.com/zawy12/difficulty-algorithms/issues/3 + // Copyright (c) 2017-2018 Zawy + difficulty_type next_difficulty_v2(std::vector timestamps, std::vector cumulative_difficulties, size_t target_seconds) { + + const int64_t T = static_cast(target_seconds); + size_t N = DIFFICULTY_WINDOW_V2; + if (timestamps.size() < 4) { + return 1; + } else if ( timestamps.size() < N+1 ) { + N = timestamps.size() - 1; + } else { + timestamps.resize(N+1); + cumulative_difficulties.resize(N+1); + } + const double adjust = 0.998; + const double k = N * (N + 1) / 2; + double LWMA(0), sum_inverse_D(0), harmonic_mean_D(0), nextDifficulty(0); + int64_t solveTime(0); + uint64_t difficulty(0), next_difficulty(0); + for (size_t i = 1; i <= N; i++) { + solveTime = static_cast(timestamps[i]) - static_cast(timestamps[i - 1]); + solveTime = std::min((T * 7), std::max(solveTime, (-7 * T))); + difficulty = cumulative_difficulties[i] - cumulative_difficulties[i - 1]; + LWMA += (int64_t)(solveTime * i) / k; + sum_inverse_D += 1 / static_cast(difficulty); + } + harmonic_mean_D = N / sum_inverse_D; + if (static_cast(boost::math::round(LWMA)) < T / 20) + LWMA = static_cast(T / 20); + + nextDifficulty = harmonic_mean_D * T / LWMA * adjust; + next_difficulty = static_cast(nextDifficulty); + return next_difficulty; + } + + // LWMA-2 + difficulty_type next_difficulty_v3(std::vector timestamps, std::vector cumulative_difficulties) { + + int64_t T = DIFFICULTY_TARGET_V2; + int64_t N = DIFFICULTY_WINDOW_V2; + int64_t L(0), ST, sum_3_ST(0), next_D, prev_D; + assert(timestamps.size() == cumulative_difficulties.size() && timestamps.size() <= static_cast(N+1) ); + for ( int64_t i = 1; i <= N; i++ ) { + ST = static_cast(timestamps[i]) - static_cast(timestamps[i-1]); + ST = std::max(-4*T, std::min(ST, 6*T)); + L += ST * i ; + if ( i > N-3 ) { + sum_3_ST += ST; + } + } + next_D = (static_cast(cumulative_difficulties[N] - cumulative_difficulties[0])*T*(N+1)*99)/(100*2*L); + prev_D = cumulative_difficulties[N] - cumulative_difficulties[N-1]; + next_D = std::max((prev_D*67)/100, std::min(next_D, (prev_D*150)/100)); + if ( sum_3_ST < (8*T)/10) { + next_D = std::max(next_D,(prev_D*108)/100); + } + return static_cast(next_D); + } + + // LWMA-4 + difficulty_type next_difficulty_v4(std::vector timestamps, std::vector cumulative_difficulties, size_t height) { + + uint64_t T = DIFFICULTY_TARGET_V2; + uint64_t N = DIFFICULTY_WINDOW_V2; + uint64_t L(0), ST(0), next_D, prev_D, avg_D, i; + assert(timestamps.size() == cumulative_difficulties.size() && timestamps.size() <= N+1 ); + if ( height <= 63469 + 1 ) { return 100000069; } + std::vectorTS(N+1); + TS[0] = timestamps[0]; + for ( i = 1; i <= N; i++) { + if ( timestamps[i] > TS[i-1] ) { TS[i] = timestamps[i]; } + else { TS[i] = TS[i-1]; } + } + for ( i = 1; i <= N; i++) { + if ( i > 4 && TS[i]-TS[i-1] > 5*T && TS[i-1] - TS[i-4] < (14*T)/10 ) { ST = 2*T; } + else if ( i > 7 && TS[i]-TS[i-1] > 5*T && TS[i-1] - TS[i-7] < 4*T ) { ST = 2*T; } + else { + ST = std::min(5*T ,TS[i] - TS[i-1]); + } + L += ST * i ; + } + if (L < N*N*T/20 ) { L = N*N*T/20; } + avg_D = ( cumulative_difficulties[N] - cumulative_difficulties[0] )/ N; + if (avg_D > 2000000*N*N*T) { + next_D = (avg_D/(200*L))*(N*(N+1)*T*97); + } + else { next_D = (avg_D*N*(N+1)*T*97)/(200*L); } + prev_D = cumulative_difficulties[N] - cumulative_difficulties[N-1] ; + if ( ( TS[N] - TS[N-1] < (2*T)/10 ) || + ( TS[N] - TS[N-2] < (5*T)/10 ) || + ( TS[N] - TS[N-3] < (8*T)/10 ) ) + { + next_D = std::max( next_D, std::min( (prev_D*110)/100, (105*avg_D)/100 ) ); + } + i = 1000000000; + while (i > 1) { + if ( next_D > i*100 ) { next_D = ((next_D+i/2)/i)*i; break; } + else { i /= 10; } + } + if ( next_D > 100000 ) { + next_D = ((next_D+500)/1000)*1000 + std::min(static_cast(999), (TS[N]-TS[N-10])/10); + } + return static_cast(next_D); + } + + difficulty_type next_difficulty_v5(std::vector timestamps, std::vector cumulative_difficulties, size_t target_seconds) { + + if(timestamps.size() > DIFFICULTY_WINDOW_V3) + { + timestamps.resize(DIFFICULTY_WINDOW_V3); + cumulative_difficulties.resize(DIFFICULTY_WINDOW_V3); + } + + size_t length = timestamps.size(); + assert(length == cumulative_difficulties.size()); + if (length <= 1) { + return 1; + } + static_assert(DIFFICULTY_WINDOW_V3 >= 2, "Window is too small"); + assert(length <= DIFFICULTY_WINDOW_V3); + sort(timestamps.begin(), timestamps.end()); + size_t cut_begin, cut_end; + static_assert(2 * DIFFICULTY_CUT_V2 <= DIFFICULTY_WINDOW_V3 - 2, "Cut length is too large"); + if (length <= DIFFICULTY_WINDOW_V3 - 2 * DIFFICULTY_CUT_V2) { + cut_begin = 0; + cut_end = length; + } else { + cut_begin = (length - (DIFFICULTY_WINDOW_V3 - 2 * DIFFICULTY_CUT_V2) + 1) / 2; + cut_end = cut_begin + (DIFFICULTY_WINDOW_V3 - 2 * DIFFICULTY_CUT_V2); + } + assert(/*cut_begin >= 0 &&*/ cut_begin + 2 <= cut_end && cut_end <= length); + uint64_t time_span = timestamps[cut_end - 1] - timestamps[cut_begin]; + if (time_span == 0) { + time_span = 1; + } + difficulty_type total_work = cumulative_difficulties[cut_end - 1] - cumulative_difficulties[cut_begin]; + assert(total_work > 0); + uint64_t low, high; + mul(total_work, target_seconds, low, high); + if (high != 0 || low + time_span - 1 < low) { + return 0; + } + return (low + time_span - 1) / time_span; + } } diff --git a/src/cryptonote_basic/difficulty.h b/src/cryptonote_basic/difficulty.h index b06538467..65c5956b1 100644 --- a/src/cryptonote_basic/difficulty.h +++ b/src/cryptonote_basic/difficulty.h @@ -53,4 +53,8 @@ namespace cryptonote */ bool check_hash(const crypto::hash &hash, difficulty_type difficulty); difficulty_type next_difficulty(std::vector timestamps, std::vector cumulative_difficulties, size_t target_seconds); + difficulty_type next_difficulty_v2(std::vector timestamps, std::vector cumulative_difficulties, size_t target_seconds); + difficulty_type next_difficulty_v3(std::vector timestamps, std::vector cumulative_difficulties); + difficulty_type next_difficulty_v4(std::vector timestamps, std::vector cumulative_difficulties, size_t height); + difficulty_type next_difficulty_v5(std::vector timestamps, std::vector cumulative_difficulties, size_t target_seconds); } diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 496678b5e..31388ac66 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -43,26 +43,29 @@ #define CRYPTONOTE_PUBLIC_ADDRESS_TEXTBLOB_VER 0 #define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW 60 #define CURRENT_TRANSACTION_VERSION 2 -#define CURRENT_BLOCK_MAJOR_VERSION 1 -#define CURRENT_BLOCK_MINOR_VERSION 0 +#define CURRENT_BLOCK_MAJOR_VERSION 7 +#define CURRENT_BLOCK_MINOR_VERSION 7 +#define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT_V2 300*2 #define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT 60*60*2 -#define CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE 10 +#define CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE 4 +#define BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW_V3 24 +#define BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW_V2 11 #define BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW 60 // MONEY_SUPPLY - total number coins to be generated #define MONEY_SUPPLY ((uint64_t)(-1)) -#define EMISSION_SPEED_FACTOR_PER_MINUTE (20) -#define FINAL_SUBSIDY_PER_MINUTE ((uint64_t)300000000000) // 3 * pow(10, 11) +#define EMISSION_SPEED_FACTOR_PER_MINUTE (24) +#define FINAL_SUBSIDY_PER_MINUTE ((uint64_t)(0)) #define CRYPTONOTE_REWARD_BLOCKS_WINDOW 100 #define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V2 60000 //size of block (bytes) after which reward for block calculated using block size #define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V1 20000 //size of block (bytes) after which reward for block calculated using block size - before first fork #define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V5 300000 //size of block (bytes) after which reward for block calculated using block size - second change, from v5 #define CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE 600 -#define CRYPTONOTE_DISPLAY_DECIMAL_POINT 12 +#define CRYPTONOTE_DISPLAY_DECIMAL_POINT 11 // COIN - number of smallest units in one coin -#define COIN ((uint64_t)1000000000000) // pow(10, 12) +#define COIN ((uint64_t)100000000000) // pow(10, 11) #define FEE_PER_KB_OLD ((uint64_t)10000000000) // pow(10, 10) #define FEE_PER_KB ((uint64_t)2000000000) // 2 * pow(10, 9) @@ -75,11 +78,17 @@ #define ORPHANED_BLOCKS_MAX_COUNT 100 -#define DIFFICULTY_TARGET_V2 120 // seconds -#define DIFFICULTY_TARGET_V1 60 // seconds - before first fork +#define DIFFICULTY_TARGET_V2 300 +#define DIFFICULTY_TARGET_V1 300 +#define DIFFICULTY_WINDOW_V3 288 +#define DIFFICULTY_WINDOW_V2 60 #define DIFFICULTY_WINDOW 720 // blocks +#define DIFFICULTY_LAG_V2 6 #define DIFFICULTY_LAG 15 // !!! +#define DIFFICULTY_CUT_V2 24 #define DIFFICULTY_CUT 60 // timestamps to cut after sorting +#define DIFFICULTY_BLOCKS_COUNT_V3 DIFFICULTY_WINDOW_V3 + DIFFICULTY_LAG_V2 +#define DIFFICULTY_BLOCKS_COUNT_V2 DIFFICULTY_WINDOW_V2 + 1 // added +1 to make N=N #define DIFFICULTY_BLOCKS_COUNT DIFFICULTY_WINDOW + DIFFICULTY_LAG @@ -126,7 +135,7 @@ #define ALLOW_DEBUG_COMMANDS -#define CRYPTONOTE_NAME "bitmonero" +#define CRYPTONOTE_NAME "wownero" #define CRYPTONOTE_POOLDATA_FILENAME "poolstate.bin" #define CRYPTONOTE_BLOCKCHAINDATA_FILENAME "data.mdb" #define CRYPTONOTE_BLOCKCHAINDATA_LOCK_FILENAME "lock.mdb" @@ -137,10 +146,10 @@ #define HF_VERSION_DYNAMIC_FEE 4 #define HF_VERSION_MIN_MIXIN_4 6 -#define HF_VERSION_MIN_MIXIN_6 7 -#define HF_VERSION_MIN_MIXIN_10 8 +#define HF_VERSION_MIN_MIXIN_7 7 +#define HF_VERSION_MIN_MIXIN_21 9 #define HF_VERSION_ENFORCE_RCT 6 -#define HF_VERSION_PER_BYTE_FEE 8 +#define HF_VERSION_PER_BYTE_FEE 12 #define PER_KB_FEE_QUANTIZATION_DECIMALS 8 @@ -159,31 +168,31 @@ namespace config uint64_t const BASE_REWARD_CLAMP_THRESHOLD = ((uint64_t)100000000); // pow(10, 8) std::string const P2P_REMOTE_DEBUG_TRUSTED_PUB_KEY = "0000000000000000000000000000000000000000000000000000000000000000"; - uint64_t const CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 18; - uint64_t const CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 19; - uint64_t const CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 42; - uint16_t const P2P_DEFAULT_PORT = 18080; - uint16_t const RPC_DEFAULT_PORT = 18081; - uint16_t const ZMQ_RPC_DEFAULT_PORT = 18082; + uint64_t const CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 4146; + uint64_t const CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 6810; + uint64_t const CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 12208; + uint16_t const P2P_DEFAULT_PORT = 34567; + uint16_t const RPC_DEFAULT_PORT = 34568; + uint16_t const ZMQ_RPC_DEFAULT_PORT = 34569; boost::uuids::uuid const NETWORK_ID = { { - 0x12 ,0x30, 0xF1, 0x71 , 0x61, 0x04 , 0x41, 0x61, 0x17, 0x31, 0x00, 0x82, 0x16, 0xA1, 0xA1, 0x10 + 0x11, 0x33, 0xFF, 0x77 , 0x61, 0x04 , 0x41, 0x61, 0x17, 0x31, 0x00, 0x82, 0x16, 0xA1, 0xA1, 0x10 } }; // Bender's nightmare - std::string const GENESIS_TX = "013c01ff0001ffffffffffff03029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121017767aafcde9be00dcfd098715ebcf7f410daebc582fda69d24a28e9d0bc890d1"; - uint32_t const GENESIS_NONCE = 10000; + std::string const GENESIS_TX = "013c01ff0001ffffffffff1f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121012a1a936be5d91c01ee876e38c13fab0ee11cbe86011a2bf7740fb5ebd39d267d"; + uint32_t const GENESIS_NONCE = 70; namespace testnet { uint64_t const CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 53; uint64_t const CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 54; uint64_t const CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 63; - uint16_t const P2P_DEFAULT_PORT = 28080; - uint16_t const RPC_DEFAULT_PORT = 28081; - uint16_t const ZMQ_RPC_DEFAULT_PORT = 28082; + uint16_t const P2P_DEFAULT_PORT = 11180; + uint16_t const RPC_DEFAULT_PORT = 11181; + uint16_t const ZMQ_RPC_DEFAULT_PORT = 11182; boost::uuids::uuid const NETWORK_ID = { { - 0x12 ,0x30, 0xF1, 0x71 , 0x61, 0x04 , 0x41, 0x61, 0x17, 0x31, 0x00, 0x82, 0x16, 0xA1, 0xA1, 0x11 + 0x11, 0x33, 0xFF, 0x77 , 0x61, 0x04 , 0x41, 0x61, 0x17, 0x31, 0x00, 0x82, 0x16, 0xA1, 0xA1, 0x11 } }; // Bender's daydream - std::string const GENESIS_TX = "013c01ff0001ffffffffffff03029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121017767aafcde9be00dcfd098715ebcf7f410daebc582fda69d24a28e9d0bc890d1"; - uint32_t const GENESIS_NONCE = 10001; + std::string const GENESIS_TX = "013c01ff0001ffffffffff1f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071210160eb755f618a2336055dee60f307fe0ded81c5b37b53d310175ca9ee69b0c8ad"; + uint32_t const GENESIS_NONCE = 70; } namespace stagenet diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index bfc5dbbe0..e0eded8c9 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -87,34 +87,12 @@ static const struct { uint8_t threshold; time_t time; } mainnet_hard_forks[] = { - // version 1 from the start of the blockchain - { 1, 1, 0, 1341378000 }, - - // version 2 starts from block 1009827, which is on or around the 20th of March, 2016. Fork time finalised on 2015-09-20. No fork voting occurs for the v2 fork. - { 2, 1009827, 0, 1442763710 }, - - // version 3 starts from block 1141317, which is on or around the 24th of September, 2016. Fork time finalised on 2016-03-21. - { 3, 1141317, 0, 1458558528 }, - - // version 4 starts from block 1220516, which is on or around the 5th of January, 2017. Fork time finalised on 2016-09-18. - { 4, 1220516, 0, 1483574400 }, - - // version 5 starts from block 1288616, which is on or around the 15th of April, 2017. Fork time finalised on 2017-03-14. - { 5, 1288616, 0, 1489520158 }, - - // version 6 starts from block 1400000, which is on or around the 16th of September, 2017. Fork time finalised on 2017-08-18. - { 6, 1400000, 0, 1503046577 }, - - // version 7 starts from block 1546000, which is on or around the 6th of April, 2018. Fork time finalised on 2018-03-17. - { 7, 1546000, 0, 1521303150 }, - - // version 8 starts from block 1685555, which is on or around the 18th of October, 2018. Fork time finalised on 2018-09-02. - { 8, 1685555, 0, 1535889547 }, - - // version 9 starts from block 1686275, which is on or around the 19th of October, 2018. Fork time finalised on 2018-09-02. - { 9, 1686275, 0, 1535889548 }, + { 7, 1, 0, 1519605000 }, + { 8, 6969, 0, 1524214739 }, + { 9, 53666, 0, 1538689773 }, + { 10, 63469, 0, 1541700352 }, }; -static const uint64_t mainnet_hard_fork_version_1_till = 1009826; +static const uint64_t mainnet_hard_fork_version_1_till = ((uint64_t)(0)); static const struct { uint8_t version; @@ -122,23 +100,12 @@ static const struct { uint8_t threshold; time_t time; } testnet_hard_forks[] = { - // version 1 from the start of the blockchain - { 1, 1, 0, 1341378000 }, - - // version 2 starts from block 624634, which is on or around the 23rd of November, 2015. Fork time finalised on 2015-11-20. No fork voting occurs for the v2 fork. - { 2, 624634, 0, 1445355000 }, - - // versions 3-5 were passed in rapid succession from September 18th, 2016 - { 3, 800500, 0, 1472415034 }, - { 4, 801219, 0, 1472415035 }, - { 5, 802660, 0, 1472415036 + 86400*180 }, // add 5 months on testnet to shut the update warning up since there's a large gap to v6 - - { 6, 971400, 0, 1501709789 }, - { 7, 1057027, 0, 1512211236 }, - { 8, 1057058, 0, 1533211200 }, - { 9, 1057778, 0, 1533297600 }, + { 8, 1, 0, 1522624244 }, + { 9, 60, 0, 1543754910 }, + { 10, 120, 0, 1543795200 }, + { 11, 180, 0, 1543922445 }, }; -static const uint64_t testnet_hard_fork_version_1_till = 624633; +static const uint64_t testnet_hard_fork_version_1_till = ((uint64_t)(1)); static const struct { uint8_t version; @@ -146,18 +113,10 @@ static const struct { uint8_t threshold; time_t time; } stagenet_hard_forks[] = { - // version 1 from the start of the blockchain - { 1, 1, 0, 1341378000 }, - - // versions 2-7 in rapid succession from March 13th, 2018 - { 2, 32000, 0, 1521000000 }, - { 3, 33000, 0, 1521120000 }, - { 4, 34000, 0, 1521240000 }, - { 5, 35000, 0, 1521360000 }, - { 6, 36000, 0, 1521480000 }, - { 7, 37000, 0, 1521600000 }, - { 8, 176456, 0, 1537821770 }, - { 9, 177176, 0, 1537821771 }, + { 8, 1, 0, 1522624244 }, + { 9, 60, 0, 1543754910 }, + { 10, 120, 0, 1543795200 }, + { 11, 180, 0, 1543922445 }, }; //------------------------------------------------------------------ @@ -832,20 +791,31 @@ difficulty_type Blockchain::get_difficulty_for_next_block() std::vector difficulties; auto height = m_db->height(); top_hash = get_tail_id(); // get it again now that we have the lock + + uint8_t version = get_current_hard_fork_version(); + uint64_t difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT; + if (version >= 11) { + difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT_V3; + } else if (version <= 10 && version >= 8) { + difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT_V2; + } else { + difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT; + } + // ND: Speedup // 1. Keep a list of the last 735 (or less) blocks that is used to compute difficulty, // then when the next block difficulty is queried, push the latest height data and // pop the oldest one from the list. This only requires 1x read per height instead // of doing 735 (DIFFICULTY_BLOCKS_COUNT). - if (m_timestamps_and_difficulties_height != 0 && ((height - m_timestamps_and_difficulties_height) == 1) && m_timestamps.size() >= DIFFICULTY_BLOCKS_COUNT) + if (m_timestamps_and_difficulties_height != 0 && ((height - m_timestamps_and_difficulties_height) == 1) && m_timestamps.size() >= difficulty_blocks_count) { uint64_t index = height - 1; m_timestamps.push_back(m_db->get_block_timestamp(index)); m_difficulties.push_back(m_db->get_block_cumulative_difficulty(index)); - while (m_timestamps.size() > DIFFICULTY_BLOCKS_COUNT) + while (m_timestamps.size() > difficulty_blocks_count) m_timestamps.erase(m_timestamps.begin()); - while (m_difficulties.size() > DIFFICULTY_BLOCKS_COUNT) + while (m_difficulties.size() > difficulty_blocks_count) m_difficulties.erase(m_difficulties.begin()); m_timestamps_and_difficulties_height = height; @@ -854,7 +824,7 @@ difficulty_type Blockchain::get_difficulty_for_next_block() } else { - uint64_t offset = height - std::min (height, static_cast(DIFFICULTY_BLOCKS_COUNT)); + uint64_t offset = height - std::min (height, static_cast(difficulty_blocks_count)); if (offset == 0) ++offset; @@ -878,6 +848,18 @@ difficulty_type Blockchain::get_difficulty_for_next_block() size_t target = get_difficulty_target(); difficulty_type diff = next_difficulty(timestamps, difficulties, target); + if (version >= 11) { + difficulty_type diff = next_difficulty_v5(timestamps, difficulties, target); + } else if (version == 10) { + difficulty_type diff = next_difficulty_v4(timestamps, difficulties, height); + } else if (version == 9) { + difficulty_type diff = next_difficulty_v3(timestamps, difficulties); + } else if (version == 8) { + difficulty_type diff = next_difficulty_v2(timestamps, difficulties, target); + } else { + difficulty_type diff = next_difficulty(timestamps, difficulties, target); + } + CRITICAL_REGION_LOCAL1(m_difficulty_lock); m_difficulty_for_next_block_top_hash = top_hash; m_difficulty_for_next_block = diff; @@ -1044,15 +1026,26 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std: std::vector timestamps; std::vector cumulative_difficulties; + uint8_t version = get_current_hard_fork_version(); + size_t height = m_db->height(); + size_t difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT; + if (version >= 11) { + difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT_V3; + } else if (version <= 10 && version >= 8) { + difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT_V2; + } else { + difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT; + } + // if the alt chain isn't long enough to calculate the difficulty target // based on its blocks alone, need to get more blocks from the main chain - if(alt_chain.size()< DIFFICULTY_BLOCKS_COUNT) + if(alt_chain.size()< difficulty_blocks_count) { CRITICAL_REGION_LOCAL(m_blockchain_lock); // Figure out start and stop offsets for main chain blocks size_t main_chain_stop_offset = alt_chain.size() ? alt_chain.front()->second.height : bei.height; - size_t main_chain_count = DIFFICULTY_BLOCKS_COUNT - std::min(static_cast(DIFFICULTY_BLOCKS_COUNT), alt_chain.size()); + size_t main_chain_count = difficulty_blocks_count - std::min(static_cast(difficulty_blocks_count), alt_chain.size()); main_chain_count = std::min(main_chain_count, main_chain_stop_offset); size_t main_chain_start_offset = main_chain_stop_offset - main_chain_count; @@ -1067,7 +1060,7 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std: } // make sure we haven't accidentally grabbed too many blocks...maybe don't need this check? - CHECK_AND_ASSERT_MES((alt_chain.size() + timestamps.size()) <= DIFFICULTY_BLOCKS_COUNT, false, "Internal error, alt_chain.size()[" << alt_chain.size() << "] + vtimestampsec.size()[" << timestamps.size() << "] NOT <= DIFFICULTY_WINDOW[]" << DIFFICULTY_BLOCKS_COUNT); + CHECK_AND_ASSERT_MES((alt_chain.size() + timestamps.size()) <= difficulty_blocks_count, false, "Internal error, alt_chain.size()[" << alt_chain.size() << "] + vtimestampsec.size()[" << timestamps.size() << "] NOT <= DIFFICULTY_WINDOW[]" << difficulty_blocks_count); for (auto it : alt_chain) { @@ -1079,8 +1072,8 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std: // and timestamps from it alone else { - timestamps.resize(static_cast(DIFFICULTY_BLOCKS_COUNT)); - cumulative_difficulties.resize(static_cast(DIFFICULTY_BLOCKS_COUNT)); + timestamps.resize(static_cast(difficulty_blocks_count)); + cumulative_difficulties.resize(static_cast(difficulty_blocks_count)); size_t count = 0; size_t max_i = timestamps.size()-1; // get difficulties and timestamps from most recent blocks in alt chain @@ -1089,7 +1082,7 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std: timestamps[max_i - count] = it->second.bl.timestamp; cumulative_difficulties[max_i - count] = it->second.cumulative_difficulty; count++; - if(count >= DIFFICULTY_BLOCKS_COUNT) + if(count >= difficulty_blocks_count) break; } } @@ -1098,7 +1091,17 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std: size_t target = get_ideal_hard_fork_version(bei.height) < 2 ? DIFFICULTY_TARGET_V1 : DIFFICULTY_TARGET_V2; // calculate the difficulty target for the block and return it - return next_difficulty(timestamps, cumulative_difficulties, target); + if (version >= 11) { + return next_difficulty_v5(timestamps, cumulative_difficulties, target); + } else if (version == 10) { + return next_difficulty_v4(timestamps, cumulative_difficulties, height); + } else if (version == 9) { + return next_difficulty_v3(timestamps, cumulative_difficulties); + } else if (version == 8) { + return next_difficulty_v2(timestamps, cumulative_difficulties, target); + } else { + return next_difficulty(timestamps, cumulative_difficulties, target); + } } //------------------------------------------------------------------ // This function does a sanity check on basic things that all miner @@ -1409,12 +1412,13 @@ bool Blockchain::create_block_template(block& b, const account_public_address& m bool Blockchain::complete_timestamps_vector(uint64_t start_top_height, std::vector& timestamps) { LOG_PRINT_L3("Blockchain::" << __func__); - - if(timestamps.size() >= BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW) + uint8_t version = get_current_hard_fork_version(); + size_t blockchain_timestamp_check_window = version >= 11 ? BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW_V3 : version == 11 ? BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW_V2 : BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW; + if(timestamps.size() >= blockchain_timestamp_check_window) return true; CRITICAL_REGION_LOCAL(m_blockchain_lock); - size_t need_elements = BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW - timestamps.size(); + size_t need_elements = blockchain_timestamp_check_window - timestamps.size(); CHECK_AND_ASSERT_MES(start_top_height < m_db->height(), false, "internal error: passed start_height not < " << " m_db->height() -- " << start_top_height << " >= " << m_db->height()); size_t stop_offset = start_top_height > need_elements ? start_top_height - need_elements : 0; timestamps.reserve(timestamps.size() + start_top_height - stop_offset); @@ -2390,26 +2394,26 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context } } - // from v8, allow bulletproofs - if (hf_version < 8) { + // from v11, allow bulletproofs + if (hf_version < 11) { if (tx.version >= 2) { const bool bulletproof = rct::is_rct_bulletproof(tx.rct_signatures.type); if (bulletproof || !tx.rct_signatures.p.bulletproofs.empty()) { - MERROR_VER("Bulletproofs are not allowed before v8"); + MERROR_VER("New Bulletproofs are not allowed before v11"); tvc.m_invalid_output = true; return false; } } } - // from v9, forbid borromean range proofs - if (hf_version > 8) { + // from v12, forbid borromean range proofs + if (hf_version > 11) { if (tx.version >= 2) { const bool borromean = rct::is_rct_borromean(tx.rct_signatures.type); if (borromean) { - MERROR_VER("Borromean range proofs are not allowed after v8"); + MERROR_VER("Borromean range proofs are not allowed after v11"); tvc.m_invalid_output = true; return false; } @@ -2524,7 +2528,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, { size_t n_unmixable = 0, n_mixable = 0; size_t mixin = std::numeric_limits::max(); - const size_t min_mixin = hf_version >= HF_VERSION_MIN_MIXIN_10 ? 10 : hf_version >= HF_VERSION_MIN_MIXIN_6 ? 6 : hf_version >= HF_VERSION_MIN_MIXIN_4 ? 4 : 2; + const size_t min_mixin = hf_version >= HF_VERSION_MIN_MIXIN_21 ? 21 : hf_version >= HF_VERSION_MIN_MIXIN_7 ? 7 : hf_version >= HF_VERSION_MIN_MIXIN_4 ? 4 : 2; for (const auto& txin : tx.vin) { // non txin_to_key inputs will be rejected below @@ -2553,9 +2557,9 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, } } - if (((hf_version == HF_VERSION_MIN_MIXIN_10 || hf_version == HF_VERSION_MIN_MIXIN_10+1) && mixin != 10) || (hf_version >= HF_VERSION_MIN_MIXIN_10+2 && mixin > 10)) + if (hf_version >= HF_VERSION_MIN_MIXIN_21 && mixin != 21) { - MERROR_VER("Tx " << get_transaction_hash(tx) << " has invalid ring size (" << (mixin + 1) << "), it should be 11"); + MERROR_VER("Tx " << get_transaction_hash(tx) << " has invalid ring size (" << (mixin + 1) << "), it should be 22"); tvc.m_low_mixin = true; return false; } @@ -2879,13 +2883,13 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, // for bulletproofs, check they're only multi-output after v8 if (rct::is_rct_bulletproof(rv.type)) { - if (hf_version < 8) + if (hf_version < 11) { for (const rct::Bulletproof &proof: rv.p.bulletproofs) { if (proof.V.size() > 1) { - MERROR_VER("Multi output bulletproofs are invalid before v8"); + MERROR_VER("Multi output bulletproofs are invalid before v11"); return false; } } @@ -3148,10 +3152,11 @@ bool Blockchain::check_block_timestamp(std::vector& timestamps, const { LOG_PRINT_L3("Blockchain::" << __func__); median_ts = epee::misc_utils::median(timestamps); - + uint8_t version = get_current_hard_fork_version(); + size_t blockchain_timestamp_check_window = version >= 11 ? BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW_V3 : version == 11 ? BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW_V2 : BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW; if(b.timestamp < median_ts) { - MERROR_VER("Timestamp of block with id: " << get_block_hash(b) << ", " << b.timestamp << ", less than median of last " << BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW << " blocks, " << median_ts); + MERROR_VER("Timestamp of block with id: " << get_block_hash(b) << ", " << b.timestamp << ", less than median of last " << blockchain_timestamp_check_window << " blocks, " << median_ts); return false; } @@ -3168,14 +3173,18 @@ bool Blockchain::check_block_timestamp(std::vector& timestamps, const bool Blockchain::check_block_timestamp(const block& b, uint64_t& median_ts) const { LOG_PRINT_L3("Blockchain::" << __func__); - if(b.timestamp > get_adjusted_time() + CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT) + uint8_t version = get_current_hard_fork_version(); + uint64_t cryptonote_block_future_time_limit = version >= 8 ? CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT_V2 : CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT; + size_t blockchain_timestamp_check_window = version >= 11 ? BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW_V3 : version == 11 ? BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW_V2 : BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW; + + if(b.timestamp > get_adjusted_time() + cryptonote_block_future_time_limit) { - MERROR_VER("Timestamp of block with id: " << get_block_hash(b) << ", " << b.timestamp << ", bigger than adjusted time + 2 hours"); + MERROR_VER("Timestamp of block with id: " << get_block_hash(b) << ", " << b.timestamp << ", bigger than adjusted time + 10 minutes"); return false; } // if not enough blocks, no proper median yet, return true - if(m_db->height() < BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW) + if(m_db->height() < blockchain_timestamp_check_window) { return true; } @@ -3183,8 +3192,8 @@ bool Blockchain::check_block_timestamp(const block& b, uint64_t& median_ts) cons std::vector timestamps; auto h = m_db->height(); - // need most recent 60 blocks, get index of first of those - size_t offset = h - BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW; + // need most recent 24 blocks, get index of first of those + size_t offset = h - blockchain_timestamp_check_window; timestamps.reserve(h - offset); for(;offset < h; ++offset) { diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 10ab3fe65..ce885069f 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -427,8 +427,8 @@ namespace cryptonote if (boost::filesystem::exists(old_files / "blockchain.bin")) { MWARNING("Found old-style blockchain.bin in " << old_files.string()); - MWARNING("Monero now uses a new format. You can either remove blockchain.bin to start syncing"); - MWARNING("the blockchain anew, or use monero-blockchain-export and monero-blockchain-import to"); + MWARNING("Wownero now uses a new format. You can either remove blockchain.bin to start syncing"); + MWARNING("the blockchain anew, or use wownero-blockchain-export and wownero-blockchain-import to"); MWARNING("convert your existing blockchain.bin to the new format. See README.md for instructions."); return false; } diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index c2c660e8c..0e181d633 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -1592,7 +1592,7 @@ skip: if(m_synchronized.compare_exchange_strong(val_expected, true)) { MGINFO_YELLOW(ENDL << "**********************************************************************" << ENDL - << "You are now synchronized with the network. You may now start monero-wallet-cli." << ENDL + << "You are now synchronized with the network. You may now start wownero-wallet-cli." << ENDL << ENDL << "Use the \"help\" command to see the list of available commands." << ENDL << "**********************************************************************"); diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index 117790455..0c943ded2 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -94,5 +94,5 @@ target_link_libraries(daemon ${Blocks}) set_property(TARGET daemon PROPERTY - OUTPUT_NAME "monerod") + OUTPUT_NAME "wownerod") install(TARGETS daemon DESTINATION bin) diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 1638cf505..7253f830e 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -676,7 +676,7 @@ bool t_command_parser_executor::sync_info(const std::vector& args) bool t_command_parser_executor::version(const std::vector& args) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << std::endl; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << std::endl; return true; } diff --git a/src/daemon/command_server.cpp b/src/daemon/command_server.cpp index 35504f2c9..74b4f0a53 100644 --- a/src/daemon/command_server.cpp +++ b/src/daemon/command_server.cpp @@ -335,7 +335,7 @@ bool t_command_server::help(const std::vector& args) std::string t_command_server::get_commands_str() { std::stringstream ss; - ss << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << std::endl; + ss << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << std::endl; ss << "Commands: " << std::endl; std::string usage = m_command_lookup.get_usage(); boost::replace_all(usage, "\n", "\n "); diff --git a/src/daemon/executor.cpp b/src/daemon/executor.cpp index fbc7d04fd..d410dadb1 100644 --- a/src/daemon/executor.cpp +++ b/src/daemon/executor.cpp @@ -40,7 +40,7 @@ namespace daemonize { - std::string const t_executor::NAME = "Monero Daemon"; + std::string const t_executor::NAME = "Wownero Daemon"; void t_executor::init_options( boost::program_options::options_description & configurable_options @@ -58,7 +58,7 @@ namespace daemonize boost::program_options::variables_map const & vm ) { - LOG_PRINT_L0("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ") Daemonised"); + LOG_PRINT_L0("Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ") Daemonised"); return t_daemon{vm}; } diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index f483ba6c9..47ce1d154 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -119,7 +119,7 @@ int main(int argc, char const * argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << "Usage: " + std::string{argv[0]} + " [options|settings] [daemon_command...]" << std::endl << std::endl; std::cout << visible_options << std::endl; return 0; @@ -128,7 +128,7 @@ int main(int argc, char const * argv[]) // Monero Version if (command_line::get_arg(vm, command_line::arg_version)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL; return 0; } @@ -284,7 +284,7 @@ int main(int argc, char const * argv[]) tools::set_max_concurrency(command_line::get_arg(vm, daemon_args::arg_max_concurrency)); // logging is now set up - MGINFO("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"); + MGINFO("Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"); MINFO("Moving from main() into the daemonize now."); diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index 5ae9851a7..c536bdfec 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -1164,10 +1164,10 @@ bool t_rpc_command_executor::print_status() bool daemon_is_alive = m_rpc_client->check_connection(); if(daemon_is_alive) { - tools::success_msg_writer() << "monerod is running"; + tools::success_msg_writer() << "wownerod is running"; } else { - tools::fail_msg_writer() << "monerod is NOT running"; + tools::fail_msg_writer() << "wownerod is NOT running"; } return true; diff --git a/src/debug_utilities/cn_deserialize.cpp b/src/debug_utilities/cn_deserialize.cpp index 3e2552230..2683be500 100644 --- a/src/debug_utilities/cn_deserialize.cpp +++ b/src/debug_utilities/cn_deserialize.cpp @@ -105,7 +105,7 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; + std::cout << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL; std::cout << desc_options << std::endl; return 1; } diff --git a/src/gen_multisig/CMakeLists.txt b/src/gen_multisig/CMakeLists.txt index 18a6a9efe..83583e804 100644 --- a/src/gen_multisig/CMakeLists.txt +++ b/src/gen_multisig/CMakeLists.txt @@ -50,5 +50,5 @@ add_dependencies(gen_multisig version) set_property(TARGET gen_multisig PROPERTY - OUTPUT_NAME "monero-gen-trusted-multisig") + OUTPUT_NAME "wownero-gen-trusted-multisig") install(TARGETS gen_multisig DESTINATION bin) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index fbf265fc9..d42d90e0e 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -391,30 +391,21 @@ namespace nodetool std::set full_addrs; if (nettype == cryptonote::TESTNET) { - full_addrs.insert("212.83.175.67:28080"); - full_addrs.insert("5.9.100.248:28080"); - full_addrs.insert("163.172.182.165:28080"); - full_addrs.insert("195.154.123.123:28080"); - full_addrs.insert("212.83.172.165:28080"); + full_addrs.insert("206.189.166.14:11180"); + full_addrs.insert("104.236.48.55:11180"); } else if (nettype == cryptonote::STAGENET) { - full_addrs.insert("162.210.173.150:38080"); - full_addrs.insert("162.210.173.151:38080"); } else if (nettype == cryptonote::FAKECHAIN) { } else { - full_addrs.insert("107.152.130.98:18080"); - full_addrs.insert("212.83.175.67:18080"); - full_addrs.insert("5.9.100.248:18080"); - full_addrs.insert("163.172.182.165:18080"); - full_addrs.insert("161.67.132.39:18080"); - full_addrs.insert("198.74.231.92:18080"); - full_addrs.insert("195.154.123.123:18080"); - full_addrs.insert("212.83.172.165:18080"); + full_addrs.insert("66.70.218.230:34567"); + full_addrs.insert("34.209.48.213:34567"); + full_addrs.insert("159.65.91.59:34567"); + full_addrs.insert("138.197.31.246:34567"); } return full_addrs; } diff --git a/src/simplewallet/CMakeLists.txt b/src/simplewallet/CMakeLists.txt index e292f85dd..ff46be427 100644 --- a/src/simplewallet/CMakeLists.txt +++ b/src/simplewallet/CMakeLists.txt @@ -61,5 +61,5 @@ target_link_libraries(simplewallet ${EXTRA_LIBRARIES}) set_property(TARGET simplewallet PROPERTY - OUTPUT_NAME "monero-wallet-cli") + OUTPUT_NAME "wownero-wallet-cli") install(TARGETS simplewallet DESTINATION bin) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index d9fd0c13e..b9fc971f0 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -87,9 +87,9 @@ typedef cryptonote::simple_wallet sw; #define EXTENDED_LOGS_FILE "wallet_details.log" -#define DEFAULT_MIX 10 +#define DEFAULT_MIX 21 -#define MIN_RING_SIZE 11 // Used to inform user about min ring size -- does not track actual protocol +#define MIN_RING_SIZE 22 // Used to inform user about min ring size -- does not track actual protocol #define LOCK_IDLE_SCOPE() \ bool auto_refresh_enabled = m_auto_refresh_enabled.load(std::memory_order_relaxed); \ @@ -131,7 +131,7 @@ namespace const command_line::arg_descriptor arg_non_deterministic = {"non-deterministic", sw::tr("Generate non-deterministic view and spend keys"), false}; const command_line::arg_descriptor arg_allow_mismatched_daemon_version = {"allow-mismatched-daemon-version", sw::tr("Allow communicating with a daemon that uses a different RPC version"), false}; const command_line::arg_descriptor arg_restore_height = {"restore-height", sw::tr("Restore from specific blockchain height"), 0}; - const command_line::arg_descriptor arg_do_not_relay = {"do-not-relay", sw::tr("The newly created transaction will not be relayed to the monero network"), false}; + const command_line::arg_descriptor arg_do_not_relay = {"do-not-relay", sw::tr("The newly created transaction will not be relayed to the wownero network"), false}; const command_line::arg_descriptor arg_create_address_file = {"create-address-file", sw::tr("Create an address file for new wallets"), false}; const command_line::arg_descriptor arg_subaddress_lookahead = {"subaddress-lookahead", tools::wallet2::tr("Set subaddress lookahead sizes to :"), ""}; const command_line::arg_descriptor arg_use_english_language_names = {"use-english-language-names", sw::tr("Display English language names"), false}; @@ -331,7 +331,7 @@ namespace std::stringstream prompt; prompt << sw::tr("For URL: ") << url << ", " << dnssec_str << std::endl - << sw::tr(" Monero Address = ") << addresses[0] + << sw::tr(" Wownero Address = ") << addresses[0] << std::endl << sw::tr("Is this OK? (Y/n) ") ; @@ -1377,7 +1377,7 @@ bool simple_wallet::export_raw_multisig(const std::vector &args) for (auto &ptx: txs.m_ptx) { const crypto::hash txid = cryptonote::get_transaction_hash(ptx.tx); - const std::string filename = std::string("raw_multisig_monero_tx_") + epee::string_tools::pod_to_hex(txid); + const std::string filename = std::string("raw_multisig_wownero_tx_") + epee::string_tools::pod_to_hex(txid); if (!filenames.empty()) filenames += ", "; filenames += filename; @@ -1798,7 +1798,7 @@ bool simple_wallet::save_known_rings(const std::vector &args) bool simple_wallet::version(const std::vector &args) { - message_writer() << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"; + message_writer() << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"; return true; } @@ -2056,7 +2056,7 @@ bool simple_wallet::set_unit(const std::vector &args/* = std::vecto const std::string &unit = args[1]; unsigned int decimal_point = CRYPTONOTE_DISPLAY_DECIMAL_POINT; - if (unit == "monero") + if (unit == "wownero") decimal_point = CRYPTONOTE_DISPLAY_DECIMAL_POINT; else if (unit == "millinero") decimal_point = CRYPTONOTE_DISPLAY_DECIMAL_POINT - 3; @@ -2461,8 +2461,8 @@ simple_wallet::simple_wallet() " Set the fee to default/unimportant/normal/elevated/priority.\n " "confirm-missing-payment-id <1|0>\n " "ask-password <0|1|2 (or never|action|decrypt)>\n " - "unit \n " - " Set the default monero (sub-)unit.\n " + "unit \n " + " Set the default wownero (sub-)unit.\n " "min-outputs-count [n]\n " " Try to keep at least that many outputs of value at least min-outputs-value.\n " "min-outputs-value [n]\n " @@ -2478,12 +2478,12 @@ simple_wallet::simple_wallet() "auto-low-priority <1|0>\n " " Whether to automatically use the low priority fee level when it's safe to do so.\n " "segregate-pre-fork-outputs <1|0>\n " - " Set this if you intend to spend outputs on both Monero AND a key reusing fork.\n " + " Set this if you intend to spend outputs on both Wownero AND a key reusing fork.\n " "key-reuse-mitigation2 <1|0>\n " - " Set this if you are not sure whether you will spend on a key reusing Monero fork later.\n" + " Set this if you are not sure whether you will spend on a key reusing Wownero fork later.\n" "subaddress-lookahead :\n " " Set the lookahead sizes for the subaddress hash table.\n " - " Set this if you are not sure whether you will spend on a key reusing Monero fork later.\n " + " Set this if you are not sure whether you will spend on a key reusing Wownero fork later.\n " "segregation-height \n " " Set to the height of a key reusing fork you want to use, 0 to use default.")); m_cmd_binder.set_handler("encrypted_seed", @@ -2772,7 +2772,7 @@ bool simple_wallet::set_variable(const std::vector &args) CHECK_SIMPLE_VARIABLE("priority", set_default_priority, tr("0, 1, 2, 3, or 4, or one of ") << join_priority_strings(", ")); CHECK_SIMPLE_VARIABLE("confirm-missing-payment-id", set_confirm_missing_payment_id, tr("0 or 1")); CHECK_SIMPLE_VARIABLE("ask-password", set_ask_password, tr("0|1|2 (or never|action|decrypt)")); - CHECK_SIMPLE_VARIABLE("unit", set_unit, tr("monero, millinero, micronero, nanonero, piconero")); + CHECK_SIMPLE_VARIABLE("unit", set_unit, tr("wownero, millinero, micronero, nanonero, piconero")); CHECK_SIMPLE_VARIABLE("min-outputs-count", set_min_output_count, tr("unsigned integer")); CHECK_SIMPLE_VARIABLE("min-outputs-value", set_min_output_value, tr("amount")); CHECK_SIMPLE_VARIABLE("merge-destinations", set_merge_destinations, tr("0 or 1")); @@ -3720,7 +3720,7 @@ boost::optional simple_wallet::new_wallet(const boost::pr "To start synchronizing with the daemon, use the \"refresh\" command.\n" "Use the \"help\" command to see the list of available commands.\n" "Use \"help \" to see a command's documentation.\n" - "Always use the \"exit\" command when closing monero-wallet-cli to save \n" + "Always use the \"exit\" command when closing wownero-wallet-cli to save \n" "your current session's state. Otherwise, you might need to synchronize \n" "your wallet again (your wallet keys are NOT at risk in any case).\n") ; @@ -4938,7 +4938,7 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vectormultisig()) { - bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_monero_tx"); + bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_wownero_tx"); if (!r) { fail_msg_writer() << tr("Failed to write transaction(s) to file"); } else { - success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_monero_tx"; + success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_wownero_tx"; } } else if (m_wallet->get_account().get_device().has_tx_cold_sign()) @@ -5209,14 +5209,14 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vectorwatch_only()) { - bool r = m_wallet->save_tx(ptx_vector, "unsigned_monero_tx"); + bool r = m_wallet->save_tx(ptx_vector, "unsigned_wownero_tx"); if (!r) { fail_msg_writer() << tr("Failed to write transaction(s) to file"); } else { - success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_monero_tx"; + success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_wownero_tx"; } } else @@ -5305,26 +5305,26 @@ bool simple_wallet::sweep_unmixable(const std::vector &args_) // actually commit the transactions if (m_wallet->multisig()) { - bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_monero_tx"); + bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_wownero_tx"); if (!r) { fail_msg_writer() << tr("Failed to write transaction(s) to file"); } else { - success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_monero_tx"; + success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_wownero_tx"; } } else if (m_wallet->watch_only()) { - bool r = m_wallet->save_tx(ptx_vector, "unsigned_monero_tx"); + bool r = m_wallet->save_tx(ptx_vector, "unsigned_wownero_tx"); if (!r) { fail_msg_writer() << tr("Failed to write transaction(s) to file"); } else { - success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_monero_tx"; + success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_wownero_tx"; } } else @@ -5619,14 +5619,14 @@ bool simple_wallet::sweep_main(uint64_t below, bool locked, const std::vectormultisig()) { - bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_monero_tx"); + bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_wownero_tx"); if (!r) { fail_msg_writer() << tr("Failed to write transaction(s) to file"); } else { - success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_monero_tx"; + success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_wownero_tx"; } } else if (m_wallet->get_account().get_device().has_tx_cold_sign()) @@ -5656,14 +5656,14 @@ bool simple_wallet::sweep_main(uint64_t below, bool locked, const std::vectorwatch_only()) { - bool r = m_wallet->save_tx(ptx_vector, "unsigned_monero_tx"); + bool r = m_wallet->save_tx(ptx_vector, "unsigned_wownero_tx"); if (!r) { fail_msg_writer() << tr("Failed to write transaction(s) to file"); } else { - success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_monero_tx"; + success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_wownero_tx"; } } else @@ -5877,26 +5877,26 @@ bool simple_wallet::sweep_single(const std::vector &args_) // actually commit the transactions if (m_wallet->multisig()) { - bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_monero_tx"); + bool r = m_wallet->save_multisig_tx(ptx_vector, "multisig_wownero_tx"); if (!r) { fail_msg_writer() << tr("Failed to write transaction(s) to file"); } else { - success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_monero_tx"; + success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "multisig_wownero_tx"; } } else if (m_wallet->watch_only()) { - bool r = m_wallet->save_tx(ptx_vector, "unsigned_monero_tx"); + bool r = m_wallet->save_tx(ptx_vector, "unsigned_wownero_tx"); if (!r) { fail_msg_writer() << tr("Failed to write transaction(s) to file"); } else { - success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_monero_tx"; + success_msg_writer(true) << tr("Unsigned transaction(s) successfully written to file: ") << "unsigned_wownero_tx"; } } else @@ -6155,7 +6155,7 @@ bool simple_wallet::sign_transfer(const std::vector &args_) std::vector ptx; try { - bool r = m_wallet->sign_tx("unsigned_monero_tx", "signed_monero_tx", ptx, [&](const tools::wallet2::unsigned_tx_set &tx){ return accept_loaded_tx(tx); }, export_raw); + bool r = m_wallet->sign_tx("unsigned_wownero_tx", "signed_wownero_tx", ptx, [&](const tools::wallet2::unsigned_tx_set &tx){ return accept_loaded_tx(tx); }, export_raw); if (!r) { fail_msg_writer() << tr("Failed to sign transaction"); @@ -6175,7 +6175,7 @@ bool simple_wallet::sign_transfer(const std::vector &args_) txids_as_text += (", "); txids_as_text += epee::string_tools::pod_to_hex(get_transaction_hash(t.tx)); } - success_msg_writer(true) << tr("Transaction successfully signed to file ") << "signed_monero_tx" << ", txid " << txids_as_text; + success_msg_writer(true) << tr("Transaction successfully signed to file ") << "signed_wownero_tx" << ", txid " << txids_as_text; if (export_raw) { std::string rawfiles_as_text; @@ -6183,7 +6183,7 @@ bool simple_wallet::sign_transfer(const std::vector &args_) { if (i > 0) rawfiles_as_text += ", "; - rawfiles_as_text += "signed_monero_tx_raw" + (ptx.size() == 1 ? "" : ("_" + std::to_string(i))); + rawfiles_as_text += "signed_wownero_tx_raw" + (ptx.size() == 1 ? "" : ("_" + std::to_string(i))); } success_msg_writer(true) << tr("Transaction raw hex data exported to ") << rawfiles_as_text; } @@ -6203,7 +6203,7 @@ bool simple_wallet::submit_transfer(const std::vector &args_) try { std::vector ptx_vector; - bool r = m_wallet->load_tx("signed_monero_tx", ptx_vector, [&](const tools::wallet2::signed_tx_set &tx){ return accept_loaded_tx(tx); }); + bool r = m_wallet->load_tx("signed_wownero_tx", ptx_vector, [&](const tools::wallet2::signed_tx_set &tx){ return accept_loaded_tx(tx); }); if (!r) { fail_msg_writer() << tr("Failed to load transaction from file"); @@ -6356,7 +6356,7 @@ bool simple_wallet::get_tx_proof(const std::vector &args) try { std::string sig_str = m_wallet->get_tx_proof(txid, info.address, info.is_subaddress, args.size() == 3 ? args[2] : ""); - const std::string filename = "monero_tx_proof"; + const std::string filename = "wownero_tx_proof"; if (epee::file_io_utils::save_string_to_file(filename, sig_str)) success_msg_writer() << tr("signature file saved to: ") << filename; else @@ -6568,7 +6568,7 @@ bool simple_wallet::get_spend_proof(const std::vector &args) try { const std::string sig_str = m_wallet->get_spend_proof(txid, args.size() == 2 ? args[1] : ""); - const std::string filename = "monero_spend_proof"; + const std::string filename = "wownero_spend_proof"; if (epee::file_io_utils::save_string_to_file(filename, sig_str)) success_msg_writer() << tr("signature file saved to: ") << filename; else @@ -6657,7 +6657,7 @@ bool simple_wallet::get_reserve_proof(const std::vector &args) try { const std::string sig_str = m_wallet->get_reserve_proof(account_minreserve, args.size() == 2 ? args[1] : ""); - const std::string filename = "monero_reserve_proof"; + const std::string filename = "wownero_reserve_proof"; if (epee::file_io_utils::save_string_to_file(filename, sig_str)) success_msg_writer() << tr("signature file saved to: ") << filename; else @@ -8407,7 +8407,7 @@ void simple_wallet::commit_or_save(std::vector& ptx_ cryptonote::blobdata blob; tx_to_blob(ptx.tx, blob); const std::string blob_hex = epee::string_tools::buff_to_hex_nodelimer(blob); - const std::string filename = "raw_monero_tx" + (ptx_vector.size() == 1 ? "" : ("_" + std::to_string(i++))); + const std::string filename = "raw_wownero_tx" + (ptx_vector.size() == 1 ? "" : ("_" + std::to_string(i++))); if (epee::file_io_utils::save_string_to_file(filename, blob_hex)) success_msg_writer(true) << tr("Transaction successfully saved to ") << filename << tr(", txid ") << txid; else @@ -8465,12 +8465,12 @@ int main(int argc, char* argv[]) bool should_terminate = false; std::tie(vm, should_terminate) = wallet_args::main( argc, argv, - "monero-wallet-cli [--wallet-file=|--generate-new-wallet=] []", - sw::tr("This is the command line monero wallet. It needs to connect to a monero\ndaemon to work correctly.\nWARNING: Do not reuse your Monero keys on another fork, UNLESS this fork has key reuse mitigations built in. Doing so will harm your privacy."), + "wownero-wallet-cli [--wallet-file=|--generate-new-wallet=] []", + sw::tr("This is the command line wownero wallet. It needs to connect to a wownero\ndaemon to work correctly.\nWARNING: Do not reuse your Wownero keys on another fork, UNLESS this fork has key reuse mitigations built in. Doing so will harm your privacy."), desc_params, positional_options, [](const std::string &s, bool emphasis){ tools::scoped_message_writer(emphasis ? epee::console_color_white : epee::console_color_default, true) << s; }, - "monero-wallet-cli.log" + "wownero-wallet-cli.log" ); if (!vm) diff --git a/src/version.cpp.in b/src/version.cpp.in index ff2405811..8fb7ca7a2 100644 --- a/src/version.cpp.in +++ b/src/version.cpp.in @@ -1,6 +1,6 @@ #define DEF_MONERO_VERSION_TAG "@VERSIONTAG@" -#define DEF_MONERO_VERSION "0.13.0.0-master" -#define DEF_MONERO_RELEASE_NAME "Beryllium Bullet" +#define DEF_MONERO_VERSION "0.5.0.0" +#define DEF_MONERO_RELEASE_NAME "TBD" #define DEF_MONERO_VERSION_FULL DEF_MONERO_VERSION "-" DEF_MONERO_VERSION_TAG #include "version.h" diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt index 4e3fb1ae5..b884dee02 100644 --- a/src/wallet/CMakeLists.txt +++ b/src/wallet/CMakeLists.txt @@ -101,7 +101,7 @@ target_link_libraries(wallet_rpc_server ${EXTRA_LIBRARIES}) set_property(TARGET wallet_rpc_server PROPERTY - OUTPUT_NAME "monero-wallet-rpc") + OUTPUT_NAME "wownero-wallet-rpc") install(TARGETS wallet_rpc_server DESTINATION bin) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 7cd3b65bb..c320ad76f 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -60,7 +60,7 @@ namespace Monero { namespace { // copy-pasted from simplewallet - static const size_t DEFAULT_MIXIN = 6; + static const size_t DEFAULT_MIXIN = 21; static const int DEFAULT_REFRESH_INTERVAL_MILLIS = 1000 * 10; // limit maximum refresh interval as one minute static const int MAX_REFRESH_INTERVAL_MILLIS = 1000 * 60 * 1; diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 49aef4350..bd8235a14 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -97,9 +97,9 @@ using namespace cryptonote; #define CHACHA8_KEY_TAIL 0x8c #define CACHE_KEY_TAIL 0x8d -#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\004" -#define SIGNED_TX_PREFIX "Monero signed tx set\004" -#define MULTISIG_UNSIGNED_TX_PREFIX "Monero multisig unsigned tx set\001" +#define UNSIGNED_TX_PREFIX "Wownero unsigned tx set\004" +#define SIGNED_TX_PREFIX "Wownero signed tx set\004" +#define MULTISIG_UNSIGNED_TX_PREFIX "Wownero multisig unsigned tx set\001" #define RECENT_OUTPUT_RATIO (0.5) // 50% of outputs are from the recent zone #define RECENT_OUTPUT_DAYS (1.8) // last 1.8 day makes up the recent zone (taken from monerolink.pdf, Miller et al) @@ -113,11 +113,11 @@ using namespace cryptonote; #define SUBADDRESS_LOOKAHEAD_MAJOR 50 #define SUBADDRESS_LOOKAHEAD_MINOR 200 -#define KEY_IMAGE_EXPORT_FILE_MAGIC "Monero key image export\003" +#define KEY_IMAGE_EXPORT_FILE_MAGIC "Wownero key image export\003" -#define MULTISIG_EXPORT_FILE_MAGIC "Monero multisig export\001" +#define MULTISIG_EXPORT_FILE_MAGIC "Wownero multisig export\001" -#define OUTPUT_EXPORT_FILE_MAGIC "Monero output export\004" +#define OUTPUT_EXPORT_FILE_MAGIC "Wownero output export\004" #define SEGREGATION_FORK_HEIGHT 99999999 #define TESTNET_SEGREGATION_FORK_HEIGHT 99999999 @@ -847,8 +847,8 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended): m_confirm_backlog_threshold(0), m_confirm_export_overwrite(true), m_auto_low_priority(true), - m_segregate_pre_fork_outputs(true), - m_key_reuse_mitigation2(true), + m_segregate_pre_fork_outputs(false), + m_key_reuse_mitigation2(false), m_segregation_height(0), m_ignore_fractional_outputs(true), m_is_initialized(false), @@ -1323,8 +1323,8 @@ void wallet2::scan_output(const cryptonote::transaction &tx, const crypto::publi if (!m_encrypt_keys_after_refresh) { boost::optional pwd = m_callback->on_get_password("output received"); - THROW_WALLET_EXCEPTION_IF(!pwd, error::password_needed, tr("Password is needed to compute key image for incoming monero")); - THROW_WALLET_EXCEPTION_IF(!verify_password(*pwd), error::password_needed, tr("Invalid password: password is needed to compute key image for incoming monero")); + THROW_WALLET_EXCEPTION_IF(!pwd, error::password_needed, tr("Password is needed to compute key image for incoming wownero")); + THROW_WALLET_EXCEPTION_IF(!verify_password(*pwd), error::password_needed, tr("Invalid password: password is needed to compute key image for incoming wownero")); decrypt_keys(*pwd); m_encrypt_keys_after_refresh = *pwd; } @@ -6231,20 +6231,14 @@ int wallet2::get_fee_algorithm() const uint64_t wallet2::get_min_ring_size() const { if (use_fork_rules(8, 10)) - return 11; - if (use_fork_rules(7, 10)) - return 7; - if (use_fork_rules(6, 10)) - return 5; - if (use_fork_rules(2, 10)) - return 3; + return 22; return 0; } //------------------------------------------------------------------------------------------------------------------------------ uint64_t wallet2::get_max_ring_size() const { if (use_fork_rules(8, 10)) - return 11; + return 22; return 0; } //------------------------------------------------------------------------------------------------------------------------------ @@ -11607,7 +11601,7 @@ std::string wallet2::make_uri(const std::string &address, const std::string &pay } } - std::string uri = "monero:" + address; + std::string uri = "wownero:" + address; unsigned int n_fields = 0; if (!payment_id.empty()) @@ -11636,13 +11630,13 @@ std::string wallet2::make_uri(const std::string &address, const std::string &pay //---------------------------------------------------------------------------------------------------- bool wallet2::parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector &unknown_parameters, std::string &error) { - if (uri.substr(0, 7) != "monero:") + if (uri.substr(0, 8) != "wownero:") { - error = std::string("URI has wrong scheme (expected \"monero:\"): ") + uri; + error = std::string("URI has wrong scheme (expected \"wownero:\"): ") + uri; return false; } - std::string remainder = uri.substr(7); + std::string remainder = uri.substr(8); const char *ptr = strchr(remainder.c_str(), '?'); address = ptr ? remainder.substr(0, ptr-remainder.c_str()) : remainder; @@ -11896,15 +11890,11 @@ uint64_t wallet2::get_segregation_fork_height() const if (m_segregation_height > 0) return m_segregation_height; - static const bool use_dns = true; + static const bool use_dns = false; if (use_dns) { // All four MoneroPulse domains have DNSSEC on and valid static const std::vector dns_urls = { - "segheights.moneropulse.org", - "segheights.moneropulse.net", - "segheights.moneropulse.co", - "segheights.moneropulse.se" }; const uint64_t current_height = get_blockchain_current_height(); diff --git a/src/wallet/wallet_args.cpp b/src/wallet/wallet_args.cpp index b9d0a6a75..230b1d057 100644 --- a/src/wallet/wallet_args.cpp +++ b/src/wallet/wallet_args.cpp @@ -140,7 +140,7 @@ namespace wallet_args if (command_line::get_arg(vm, command_line::arg_help)) { - Print(print) << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL; + Print(print) << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL; Print(print) << wallet_args::tr("This is the command line monero wallet. It needs to connect to a monero\n" "daemon to work correctly.") << ENDL; Print(print) << wallet_args::tr("Usage:") << ENDL << " " << usage; @@ -150,7 +150,7 @@ namespace wallet_args } else if (command_line::get_arg(vm, command_line::arg_version)) { - Print(print) << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"; + Print(print) << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"; should_terminate = true; return true; } @@ -201,7 +201,7 @@ namespace wallet_args if (!command_line::is_arg_defaulted(vm, arg_max_concurrency)) tools::set_max_concurrency(command_line::get_arg(vm, arg_max_concurrency)); - Print(print) << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"; + Print(print) << "Wownero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"; if (!command_line::is_arg_defaulted(vm, arg_log_level)) MINFO("Setting log level = " << command_line::get_arg(vm, arg_log_level)); diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 0eb09b9f1..00f926f7c 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -64,7 +64,7 @@ namespace const command_line::arg_descriptor arg_wallet_dir = {"wallet-dir", "Directory for newly created wallets"}; const command_line::arg_descriptor arg_prompt_for_password = {"prompt-for-password", "Prompts for password when not provided", false}; - constexpr const char default_rpc_username[] = "monero"; + constexpr const char default_rpc_username[] = "wownero"; boost::optional password_prompter(const char *prompt, bool verify) { @@ -205,7 +205,7 @@ namespace tools string_encoding::base64_encode(rand_128bit.data(), rand_128bit.size()) ); - std::string temp = "monero-wallet-rpc." + bind_port + ".login"; + std::string temp = "wownero-wallet-rpc." + bind_port + ".login"; rpc_login_file = tools::private_file::create(temp); if (!rpc_login_file.handle()) { @@ -632,7 +632,7 @@ namespace tools } if (addresses.empty()) { - er.message = std::string("No Monero address found at ") + url; + er.message = std::string("No Wownero address found at ") + url; return {}; } return addresses[0]; @@ -1861,7 +1861,7 @@ namespace tools } if (addresses.empty()) { - er.message = std::string("No Monero address found at ") + url; + er.message = std::string("No Wownero address found at ") + url; return {}; } return addresses[0]; @@ -2647,7 +2647,7 @@ namespace tools } if (addresses.empty()) { - er.message = std::string("No Monero address found at ") + url; + er.message = std::string("No Wownero address found at ") + url; return {}; } return addresses[0]; @@ -3942,12 +3942,12 @@ int main(int argc, char** argv) { bool should_terminate = false; std::tie(vm, should_terminate) = wallet_args::main( argc, argv, - "monero-wallet-rpc [--wallet-file=|--generate-from-json=|--wallet-dir=] [--rpc-bind-port=]", - tools::wallet_rpc_server::tr("This is the RPC monero wallet. It needs to connect to a monero\ndaemon to work correctly."), + "wownero-wallet-rpc [--wallet-file=|--generate-from-json=|--wallet-dir=] [--rpc-bind-port=]", + tools::wallet_rpc_server::tr("This is the RPC wownero wallet. It needs to connect to a wownero\ndaemon to work correctly."), desc_params, po::positional_options_description(), [](const std::string &s, bool emphasis){ epee::set_console_color(emphasis ? epee::console_color_white : epee::console_color_default, true); std::cout << s << std::endl; if (emphasis) epee::reset_console_color(); }, - "monero-wallet-rpc.log", + "wownero-wallet-rpc.log", true ); if (!vm)