aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/blockchain_utilities/blockchain_ancestry.cpp2
-rw-r--r--src/blockchain_utilities/blockchain_blackball.cpp2
-rw-r--r--src/blockchain_utilities/blockchain_depth.cpp2
-rw-r--r--src/blockchain_utilities/blockchain_export.cpp2
-rw-r--r--src/blockchain_utilities/blockchain_import.cpp2
-rw-r--r--src/blockchain_utilities/blockchain_prune.cpp2
-rw-r--r--src/blockchain_utilities/blockchain_prune_known_spent_data.cpp2
-rw-r--r--src/blockchain_utilities/blockchain_stats.cpp2
-rw-r--r--src/blockchain_utilities/blockchain_usage.cpp2
-rw-r--r--src/checkpoints/checkpoints.cpp12
-rw-r--r--src/common/CMakeLists.txt8
-rw-r--r--src/common/dns_utils.cpp24
-rw-r--r--src/common/updates.cpp10
-rw-r--r--src/cryptonote_basic/CMakeLists.txt1
-rw-r--r--src/cryptonote_basic/asset_types.cpp314
-rw-r--r--src/cryptonote_basic/asset_types.h116
-rw-r--r--src/cryptonote_basic/cryptonote_format_utils.cpp16
-rw-r--r--src/cryptonote_config.h90
-rw-r--r--src/cryptonote_core/blockchain.cpp7
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp12
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl9
-rw-r--r--src/daemon/CMakeLists.txt6
-rw-r--r--src/daemon/command_parser_executor.cpp4
-rw-r--r--src/daemon/command_server.cpp2
-rw-r--r--src/daemon/executor.cpp5
-rw-r--r--src/daemon/main.cpp6
-rw-r--r--src/daemon/rpc_command_executor.cpp8
-rw-r--r--src/debug_utilities/cn_deserialize.cpp2
-rw-r--r--src/debug_utilities/dns_checks.cpp2
-rw-r--r--src/gen_ssl_cert/gen_ssl_cert.cpp4
-rw-r--r--src/hardforks/hardforks.cpp100
-rw-r--r--src/p2p/net_node.h12
-rw-r--r--src/p2p/net_node.inl60
-rw-r--r--src/rpc/core_rpc_server.cpp8
-rw-r--r--src/rpc/daemon_handler.cpp8
-rw-r--r--src/simplewallet/CMakeLists.txt19
-rw-r--r--src/simplewallet/simplewallet.cpp77
-rw-r--r--src/version.cpp.in2
-rw-r--r--src/wallet/CMakeLists.txt2
-rw-r--r--src/wallet/wallet2.cpp6
-rw-r--r--src/wallet/wallet_args.cpp8
-rw-r--r--src/wallet/wallet_rpc_server.cpp22
42 files changed, 693 insertions, 307 deletions
diff --git a/src/blockchain_utilities/blockchain_ancestry.cpp b/src/blockchain_utilities/blockchain_ancestry.cpp
index 9de1e4420..76cfca94e 100644
--- a/src/blockchain_utilities/blockchain_ancestry.cpp
+++ b/src/blockchain_utilities/blockchain_ancestry.cpp
@@ -387,7 +387,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/blockchain_utilities/blockchain_blackball.cpp b/src/blockchain_utilities/blockchain_blackball.cpp
index dee0f7f2a..6dad7283a 100644
--- a/src/blockchain_utilities/blockchain_blackball.cpp
+++ b/src/blockchain_utilities/blockchain_blackball.cpp
@@ -1219,7 +1219,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/blockchain_utilities/blockchain_depth.cpp b/src/blockchain_utilities/blockchain_depth.cpp
index 0ea6d7df1..1642892bf 100644
--- a/src/blockchain_utilities/blockchain_depth.cpp
+++ b/src/blockchain_utilities/blockchain_depth.cpp
@@ -89,7 +89,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/blockchain_utilities/blockchain_export.cpp b/src/blockchain_utilities/blockchain_export.cpp
index 2b58124a3..5740294cd 100644
--- a/src/blockchain_utilities/blockchain_export.cpp
+++ b/src/blockchain_utilities/blockchain_export.cpp
@@ -91,7 +91,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp
index 58e152e4d..2de5baa3a 100644
--- a/src/blockchain_utilities/blockchain_import.cpp
+++ b/src/blockchain_utilities/blockchain_import.cpp
@@ -640,7 +640,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/blockchain_utilities/blockchain_prune.cpp b/src/blockchain_utilities/blockchain_prune.cpp
index d99a46632..d9adcd813 100644
--- a/src/blockchain_utilities/blockchain_prune.cpp
+++ b/src/blockchain_utilities/blockchain_prune.cpp
@@ -484,7 +484,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/blockchain_utilities/blockchain_prune_known_spent_data.cpp b/src/blockchain_utilities/blockchain_prune_known_spent_data.cpp
index 08eb6ee0e..b59326f5f 100644
--- a/src/blockchain_utilities/blockchain_prune_known_spent_data.cpp
+++ b/src/blockchain_utilities/blockchain_prune_known_spent_data.cpp
@@ -138,7 +138,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/blockchain_utilities/blockchain_stats.cpp b/src/blockchain_utilities/blockchain_stats.cpp
index fc082b4e5..9795fcf94 100644
--- a/src/blockchain_utilities/blockchain_stats.cpp
+++ b/src/blockchain_utilities/blockchain_stats.cpp
@@ -176,7 +176,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/blockchain_utilities/blockchain_usage.cpp b/src/blockchain_utilities/blockchain_usage.cpp
index 1cc785283..5e6c38e81 100644
--- a/src/blockchain_utilities/blockchain_usage.cpp
+++ b/src/blockchain_utilities/blockchain_usage.cpp
@@ -121,7 +121,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/checkpoints/checkpoints.cpp b/src/checkpoints/checkpoints.cpp
index 360e812b4..fddaf251b 100644
--- a/src/checkpoints/checkpoints.cpp
+++ b/src/checkpoints/checkpoints.cpp
@@ -182,6 +182,11 @@ namespace cryptonote
bool checkpoints::init_default_checkpoints(network_type nettype)
{
+ // Monero checkpoints are invalid on the independent Monzero chain. New
+ // checkpoints will be published from audited Monzero release heights.
+ (void)nettype;
+ return true;
+#if 0
if (nettype == TESTNET)
{
ADD_CHECKPOINT2(0, "48ca7cd3c8de5b6a4d53d2861fbdaedca141553559f9be9520068053cda8430b", "0x1");
@@ -261,6 +266,7 @@ namespace cryptonote
ADD_CHECKPOINT2(3661900, "ac392757a92123f68d63cd72f0d1410f63df1102a53b5d39fc4d53d0998b20a3", "0x8a38f2195826a97");
ADD_CHECKPOINT2(3707000, "9c508fe29120b5cd204f9d150e68fd2e4015d8d859bc0431f7016c7aabc711c9", "0x91129586d4979a6");
return true;
+#endif
}
bool checkpoints::load_checkpoints_from_json(const std::string &json_hashfile_fullpath)
@@ -301,6 +307,11 @@ namespace cryptonote
bool checkpoints::load_checkpoints_from_dns(network_type nettype)
{
+ // MoneroPulse records belong to the Monero chain. Monzero DNS
+ // checkpoints remain disabled until project-controlled records exist.
+ (void)nettype;
+ return true;
+#if 0
std::vector<std::string> records;
// All four MoneroPulse domains have DNSSEC on and valid
@@ -353,6 +364,7 @@ namespace cryptonote
}
}
return true;
+#endif
}
bool checkpoints::load_new_checkpoints(const std::string &json_hashfile_fullpath, network_type nettype, bool dns)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index b712ee6b1..2670182e3 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -67,6 +67,10 @@ monero_add_library(common
${common_headers}
${common_private_headers}
DEPENDS generate_translations_header)
+if(STATIC AND NOT MINGW)
+ find_package(ZLIB REQUIRED)
+ find_library(ZSTD_LIBRARY NAMES zstd REQUIRED)
+endif()
target_link_libraries(common
PUBLIC
cncrypto
@@ -80,7 +84,9 @@ target_link_libraries(common
${Boost_CHRONO_LIBRARY}
PRIVATE
${OPENSSL_LIBRARIES}
- ${EXTRA_LIBRARIES})
+ ${EXTRA_LIBRARIES}
+ $<$<AND:$<BOOL:${STATIC}>,$<NOT:$<BOOL:${MINGW}>>>:ZLIB::ZLIB>
+ $<$<AND:$<BOOL:${STATIC}>,$<NOT:$<BOOL:${MINGW}>>>:${ZSTD_LIBRARY}>)
#monero_install_headers(common
# ${common_headers})
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp
index 40e913800..ef60a3f67 100644
--- a/src/common/dns_utils.cpp
+++ b/src/common/dns_utils.cpp
@@ -289,26 +289,10 @@ DNSResolver::DNSResolver() : m_data(new DNSResolverData())
add_anchors(m_data->m_ub_context);
- if (!DNS_PUBLIC)
- {
- // if no DNS_PUBLIC specified, we try a lookup to what we know
- // should be a valid DNSSEC record, and switch to known good
- // DNSSEC resolvers if verification fails
- bool available, valid;
- static const char *probe_hostname = "updates.moneropulse.org";
- auto records = get_txt_record(probe_hostname, available, valid);
- if (!valid)
- {
- MINFO("Failed to verify DNSSEC record from " << probe_hostname << ", falling back to TCP with well known DNSSEC resolvers");
- ub_ctx_delete(m_data->m_ub_context);
- m_data->m_ub_context = ub_ctx_create();
- add_anchors(m_data->m_ub_context);
- for (const auto &ip: DEFAULT_DNS_PUBLIC_ADDR)
- ub_ctx_set_fwd(m_data->m_ub_context, string_copy(ip));
- ub_ctx_set_option(m_data->m_ub_context, string_copy("do-udp:"), string_copy("no"));
- ub_ctx_set_option(m_data->m_ub_context, string_copy("do-tcp:"), string_copy("yes"));
- }
- }
+ // The upstream client probes a Monero-operated, DNSSEC-signed TXT record
+ // here and switches to hard-coded resolvers when validation fails. Monzero
+ // has no equivalent signed record yet, so use the operator's configured
+ // resolver. Clearnet bootstrap also has a compiled direct-IP fallback.
}
DNSResolver::~DNSResolver()
diff --git a/src/common/updates.cpp b/src/common/updates.cpp
index 2a129075b..b68be39b6 100644
--- a/src/common/updates.cpp
+++ b/src/common/updates.cpp
@@ -39,6 +39,15 @@ namespace tools
{
bool check_updates(const std::string &software, const std::string &buildtag, std::string &version, std::string &hash)
{
+ // Do not trust or advertise Monero release records for Monzero binaries.
+ // Re-enable only after project-controlled, signed update infrastructure
+ // has been reviewed and deployed.
+ (void)software;
+ (void)buildtag;
+ (void)version;
+ (void)hash;
+ return false;
+#if 0
std::vector<std::string> records;
bool found = false;
@@ -98,6 +107,7 @@ namespace tools
found = true;
}
return found;
+#endif
}
std::string get_update_url(const std::string &software, const std::string &subdir, const std::string &buildtag, const std::string &version, bool user)
diff --git a/src/cryptonote_basic/CMakeLists.txt b/src/cryptonote_basic/CMakeLists.txt
index 1414be1b2..91612168c 100644
--- a/src/cryptonote_basic/CMakeLists.txt
+++ b/src/cryptonote_basic/CMakeLists.txt
@@ -46,6 +46,7 @@ target_link_libraries(cryptonote_format_utils_basic
set(cryptonote_basic_sources
account.cpp
+ asset_types.cpp
connection_context.cpp
cryptonote_basic_impl.cpp
cryptonote_format_utils.cpp
diff --git a/src/cryptonote_basic/asset_types.cpp b/src/cryptonote_basic/asset_types.cpp
new file mode 100644
index 000000000..faac669d0
--- /dev/null
+++ b/src/cryptonote_basic/asset_types.cpp
@@ -0,0 +1,314 @@
+#include "asset_types.h"
+
+#include <algorithm>
+#include <cstring>
+#include <limits>
+#include <map>
+
+#include "crypto/hash.h"
+
+namespace cryptonote
+{
+namespace assets
+{
+ namespace
+ {
+ constexpr char DOMAIN[] = "MonzeroAssetIssuanceV2";
+ constexpr char ISSUANCE_AUTHORIZATION_DOMAIN[] = "MonzeroAssetIssuanceAuthorizationV1";
+ constexpr char COLLECTION_MEMBERSHIP_DOMAIN[] = "MonzeroCollectionMembershipV1";
+
+ bool fail(std::string* error, const char* message)
+ {
+ if (error)
+ *error = message;
+ return false;
+ }
+
+ template<typename T>
+ void append_pod(std::vector<uint8_t>& target, const T& value)
+ {
+ const auto* begin = reinterpret_cast<const uint8_t*>(&value);
+ target.insert(target.end(), begin, begin + sizeof(value));
+ }
+
+ void append_u16_le(std::vector<uint8_t>& target, uint16_t value)
+ {
+ target.push_back(static_cast<uint8_t>(value));
+ target.push_back(static_cast<uint8_t>(value >> 8));
+ }
+
+ void append_u64_le(std::vector<uint8_t>& target, uint64_t value)
+ {
+ for (unsigned shift = 0; shift < 64; shift += 8)
+ target.push_back(static_cast<uint8_t>(value >> shift));
+ }
+ }
+
+ bool validate_issuance_descriptor(const issuance_descriptor& descriptor, std::string* error)
+ {
+ if (descriptor.version != ISSUANCE_DESCRIPTOR_VERSION)
+ return fail(error, "unsupported issuance descriptor version");
+ if (descriptor.network != MAINNET && descriptor.network != TESTNET && descriptor.network != STAGENET)
+ return fail(error, "issuance descriptor requires an explicit public network");
+ if (descriptor.type != asset_class::fungible
+ && descriptor.type != asset_class::non_fungible
+ && descriptor.type != asset_class::collection
+ && descriptor.type != asset_class::edition)
+ return fail(error, "unsupported asset class");
+ if (!crypto::check_key(descriptor.issuer_key))
+ return fail(error, "invalid issuer public key");
+ if (descriptor.atomic_supply == 0)
+ return fail(error, "asset supply must be greater than zero");
+ if (descriptor.display_decimals > MAX_DISPLAY_DECIMALS)
+ return fail(error, "asset display precision exceeds XMZ precision");
+ if ((descriptor.type == asset_class::non_fungible || descriptor.type == asset_class::collection)
+ && (descriptor.atomic_supply != 1 || descriptor.display_decimals != 0))
+ return fail(error, "NFT and collection supply must be exactly one indivisible unit");
+ if (descriptor.type == asset_class::edition && descriptor.display_decimals != 0)
+ return fail(error, "edition supply must be indivisible");
+ if ((descriptor.type == asset_class::fungible || descriptor.type == asset_class::collection)
+ && descriptor.collection_id != crypto::null_hash)
+ return fail(error, "this asset class cannot reference a collection");
+ if ((descriptor.type == asset_class::non_fungible || descriptor.type == asset_class::edition)
+ && descriptor.metadata_hash == crypto::null_hash)
+ return fail(error, "NFT and edition metadata must have a content hash");
+ if (descriptor.metadata_reference.size() > MAX_METADATA_REFERENCE_BYTES)
+ return fail(error, "metadata reference is too long");
+ if (std::find(descriptor.metadata_reference.begin(), descriptor.metadata_reference.end(), '\0') != descriptor.metadata_reference.end())
+ return fail(error, "metadata reference contains a NUL byte");
+ return true;
+ }
+
+ bool encode_issuance_descriptor(const issuance_descriptor& descriptor, std::vector<uint8_t>& encoded, std::string* error)
+ {
+ if (!validate_issuance_descriptor(descriptor, error))
+ return false;
+
+ encoded.clear();
+ encoded.reserve(sizeof(DOMAIN) - 1 + 1 + 16 + 1 + 32 + 32 + 8 + 1 + 32 + 32 + 2 + descriptor.metadata_reference.size());
+ encoded.insert(encoded.end(), DOMAIN, DOMAIN + sizeof(DOMAIN) - 1);
+ encoded.push_back(descriptor.version);
+ const config_t& network = get_config(descriptor.network);
+ append_pod(encoded, network.NETWORK_ID);
+ encoded.push_back(static_cast<uint8_t>(descriptor.type));
+ append_pod(encoded, descriptor.issuer_key);
+ append_pod(encoded, descriptor.issuance_nonce);
+ append_u64_le(encoded, descriptor.atomic_supply);
+ encoded.push_back(descriptor.display_decimals);
+ append_pod(encoded, descriptor.metadata_hash);
+ append_pod(encoded, descriptor.collection_id);
+ append_u16_le(encoded, static_cast<uint16_t>(descriptor.metadata_reference.size()));
+ encoded.insert(encoded.end(), descriptor.metadata_reference.begin(), descriptor.metadata_reference.end());
+ return true;
+ }
+
+ bool derive_asset_id(const issuance_descriptor& descriptor, crypto::hash& asset_id, std::string* error)
+ {
+ std::vector<uint8_t> encoded;
+ if (!encode_issuance_descriptor(descriptor, encoded, error))
+ return false;
+ asset_id = crypto::cn_fast_hash(encoded.data(), encoded.size());
+ return true;
+ }
+
+ bool derive_issuance_authorization_hash(const issuance_descriptor& descriptor, crypto::hash& message, std::string* error)
+ {
+ std::vector<uint8_t> encoded;
+ if (!encode_issuance_descriptor(descriptor, encoded, error))
+ return false;
+ std::vector<uint8_t> authorization;
+ authorization.reserve(sizeof(ISSUANCE_AUTHORIZATION_DOMAIN) - 1 + encoded.size());
+ authorization.insert(authorization.end(), ISSUANCE_AUTHORIZATION_DOMAIN,
+ ISSUANCE_AUTHORIZATION_DOMAIN + sizeof(ISSUANCE_AUTHORIZATION_DOMAIN) - 1);
+ authorization.insert(authorization.end(), encoded.begin(), encoded.end());
+ message = crypto::cn_fast_hash(authorization.data(), authorization.size());
+ return true;
+ }
+
+ bool verify_issuance_authorization(const issuance_descriptor& descriptor, const crypto::signature& signature, std::string* error)
+ {
+ crypto::hash message{};
+ if (!derive_issuance_authorization_hash(descriptor, message, error))
+ return false;
+ if (!crypto::check_signature(message, descriptor.issuer_key, signature))
+ return fail(error, "invalid asset issuer authorization signature");
+ return true;
+ }
+
+ bool derive_collection_membership_hash(const crypto::hash& collection_id, const crypto::hash& member_asset_id, crypto::hash& message, std::string* error)
+ {
+ if (collection_id == crypto::null_hash || member_asset_id == crypto::null_hash)
+ return fail(error, "collection and member asset IDs must be non-zero");
+ std::vector<uint8_t> encoded;
+ encoded.reserve(sizeof(COLLECTION_MEMBERSHIP_DOMAIN) - 1 + sizeof(collection_id) + sizeof(member_asset_id));
+ encoded.insert(encoded.end(), COLLECTION_MEMBERSHIP_DOMAIN,
+ COLLECTION_MEMBERSHIP_DOMAIN + sizeof(COLLECTION_MEMBERSHIP_DOMAIN) - 1);
+ append_pod(encoded, collection_id);
+ append_pod(encoded, member_asset_id);
+ message = crypto::cn_fast_hash(encoded.data(), encoded.size());
+ return true;
+ }
+
+ bool verify_collection_membership(
+ const crypto::hash& collection_id,
+ const crypto::hash& member_asset_id,
+ const crypto::public_key& collection_controller,
+ const crypto::signature& signature,
+ std::string* error)
+ {
+ if (!crypto::check_key(collection_controller))
+ return fail(error, "invalid collection controller public key");
+ crypto::hash message{};
+ if (!derive_collection_membership_hash(collection_id, member_asset_id, message, error))
+ return false;
+ if (!crypto::check_signature(message, collection_controller, signature))
+ return fail(error, "invalid collection membership signature");
+ return true;
+ }
+
+ bool asset_registry::apply_issuance(
+ const issuance_descriptor& descriptor,
+ const crypto::signature& issuer_signature,
+ const boost::optional<crypto::signature>& collection_signature,
+ uint64_t height,
+ crypto::hash& asset_id,
+ std::string* error)
+ {
+ if (!derive_asset_id(descriptor, asset_id, error))
+ return false;
+ if (contains(asset_id))
+ return fail(error, "asset ID is already registered");
+ if (!verify_issuance_authorization(descriptor, issuer_signature, error))
+ return false;
+
+ const bool claims_collection = descriptor.collection_id != crypto::null_hash;
+ if (claims_collection)
+ {
+ const asset_record* collection = find(descriptor.collection_id);
+ if (!collection || collection->descriptor.type != asset_class::collection)
+ return fail(error, "referenced collection is unknown or not a collection");
+ if (collection->descriptor.network != descriptor.network)
+ return fail(error, "collection and member must use the same network");
+ if (collection->issuance_height > height)
+ return fail(error, "collection membership cannot precede collection issuance");
+ if (!collection_signature)
+ return fail(error, "collection membership requires controller authorization");
+ if (!verify_collection_membership(
+ descriptor.collection_id,
+ asset_id,
+ collection->descriptor.issuer_key,
+ *collection_signature,
+ error))
+ return false;
+ }
+ else if (collection_signature)
+ return fail(error, "unexpected collection signature for an uncollected asset");
+
+ records_.emplace(asset_id, asset_record{descriptor, height});
+ return true;
+ }
+
+ void asset_registry::detach(uint64_t height)
+ {
+ for (auto it = records_.begin(); it != records_.end();)
+ {
+ if (it->second.issuance_height >= height)
+ it = records_.erase(it);
+ else
+ ++it;
+ }
+ }
+
+ bool asset_registry::contains(const crypto::hash& asset_id) const
+ {
+ return records_.count(asset_id) != 0;
+ }
+
+ const asset_record* asset_registry::find(const crypto::hash& asset_id) const
+ {
+ const auto found = records_.find(asset_id);
+ return found == records_.end() ? nullptr : &found->second;
+ }
+
+ std::set<crypto::hash> asset_registry::known_assets() const
+ {
+ std::set<crypto::hash> result;
+ for (const auto& record : records_)
+ result.insert(record.first);
+ return result;
+ }
+
+ bool validate_transparent_balance_statement(
+ const transparent_balance_statement& statement,
+ const std::set<crypto::hash>& known_assets,
+ std::string* error)
+ {
+ if (statement.xmz_outputs > std::numeric_limits<uint64_t>::max() - statement.xmz_fee
+ || statement.xmz_inputs != statement.xmz_outputs + statement.xmz_fee)
+ return fail(error, "XMZ inputs must equal XMZ outputs plus the XMZ fee");
+
+ using balances = std::map<crypto::hash, uint64_t>;
+ balances inputs;
+ balances outputs;
+ balances burns;
+
+ const auto aggregate = [error](const std::vector<transparent_amount>& entries, balances& totals) {
+ for (const transparent_amount& entry : entries)
+ {
+ if (entry.asset_id == crypto::null_hash)
+ return fail(error, "the zero asset ID is reserved and invalid");
+ if (entry.amount == 0)
+ return fail(error, "zero-valued asset entries are not canonical");
+ uint64_t& total = totals[entry.asset_id];
+ if (entry.amount > std::numeric_limits<uint64_t>::max() - total)
+ return fail(error, "asset amount aggregation overflow");
+ total += entry.amount;
+ }
+ return true;
+ };
+
+ if (!aggregate(statement.asset_inputs, inputs)
+ || !aggregate(statement.asset_outputs, outputs)
+ || !aggregate(statement.asset_burns, burns))
+ return false;
+
+ boost::optional<crypto::hash> issued_asset;
+ if (statement.issuance)
+ {
+ crypto::hash asset_id{};
+ if (!derive_asset_id(*statement.issuance, asset_id, error))
+ return false;
+ if (known_assets.count(asset_id) != 0)
+ return fail(error, "asset ID is already issued");
+ if (inputs.count(asset_id) != 0 || burns.count(asset_id) != 0)
+ return fail(error, "newly issued supply cannot have inputs or burns");
+ const auto issued_outputs = outputs.find(asset_id);
+ if (issued_outputs == outputs.end() || issued_outputs->second != statement.issuance->atomic_supply)
+ return fail(error, "issuance outputs must equal the complete fixed supply");
+ issued_asset = asset_id;
+ }
+
+ std::set<crypto::hash> touched;
+ for (const auto& entry : inputs) touched.insert(entry.first);
+ for (const auto& entry : outputs) touched.insert(entry.first);
+ for (const auto& entry : burns) touched.insert(entry.first);
+ if (touched.empty())
+ return fail(error, "asset statement contains no issuance, transfer, or burn");
+
+ for (const crypto::hash& asset_id : touched)
+ {
+ if (issued_asset && asset_id == *issued_asset)
+ continue;
+ if (known_assets.count(asset_id) == 0)
+ return fail(error, "statement references an unknown asset ID");
+
+ const uint64_t input = inputs.count(asset_id) ? inputs[asset_id] : 0;
+ const uint64_t output = outputs.count(asset_id) ? outputs[asset_id] : 0;
+ const uint64_t burn = burns.count(asset_id) ? burns[asset_id] : 0;
+ if (output > std::numeric_limits<uint64_t>::max() - burn || input != output + burn)
+ return fail(error, "asset inputs must equal outputs plus explicit burns");
+ }
+ return true;
+ }
+}
+}
diff --git a/src/cryptonote_basic/asset_types.h b/src/cryptonote_basic/asset_types.h
new file mode 100644
index 000000000..e24f61576
--- /dev/null
+++ b/src/cryptonote_basic/asset_types.h
@@ -0,0 +1,116 @@
+#pragma once
+
+#include <cstdint>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+
+#include <boost/optional.hpp>
+
+#include "crypto/crypto.h"
+#include "cryptonote_config.h"
+
+namespace cryptonote
+{
+namespace assets
+{
+ constexpr uint8_t ISSUANCE_DESCRIPTOR_VERSION = 2;
+ constexpr uint8_t MAX_DISPLAY_DECIMALS = CRYPTONOTE_DISPLAY_DECIMAL_POINT;
+ constexpr size_t MAX_METADATA_REFERENCE_BYTES = 256;
+
+ enum class asset_class : uint8_t
+ {
+ fungible = 1,
+ non_fungible = 2,
+ collection = 3,
+ edition = 4
+ };
+
+ // Research-only fixed-supply issuance identity. This type is deliberately
+ // not part of transaction serialization and is not accepted by consensus.
+ struct issuance_descriptor
+ {
+ uint8_t version = ISSUANCE_DESCRIPTOR_VERSION;
+ network_type network = UNDEFINED;
+ asset_class type = asset_class::fungible;
+ crypto::public_key issuer_key{};
+ crypto::hash issuance_nonce{};
+ uint64_t atomic_supply = 0;
+ uint8_t display_decimals = 0;
+ crypto::hash metadata_hash{};
+ // Required for NFTs/editions that claim collection membership. The zero
+ // hash means no collection; fungible and collection descriptors must use
+ // zero so the field cannot acquire ambiguous meaning.
+ crypto::hash collection_id{};
+ std::string metadata_reference;
+ };
+
+ bool validate_issuance_descriptor(const issuance_descriptor& descriptor, std::string* error = nullptr);
+ bool encode_issuance_descriptor(const issuance_descriptor& descriptor, std::vector<uint8_t>& encoded, std::string* error = nullptr);
+ bool derive_asset_id(const issuance_descriptor& descriptor, crypto::hash& asset_id, std::string* error = nullptr);
+ bool derive_issuance_authorization_hash(const issuance_descriptor& descriptor, crypto::hash& message, std::string* error = nullptr);
+ bool verify_issuance_authorization(const issuance_descriptor& descriptor, const crypto::signature& signature, std::string* error = nullptr);
+ bool derive_collection_membership_hash(const crypto::hash& collection_id, const crypto::hash& member_asset_id, crypto::hash& message, std::string* error = nullptr);
+ bool verify_collection_membership(
+ const crypto::hash& collection_id,
+ const crypto::hash& member_asset_id,
+ const crypto::public_key& collection_controller,
+ const crypto::signature& signature,
+ std::string* error = nullptr);
+
+ struct asset_record
+ {
+ issuance_descriptor descriptor;
+ uint64_t issuance_height = 0;
+ };
+
+ // Inactive in-memory reference model for authenticated issuance state and
+ // deterministic reorg rollback. Production consensus/database code must not
+ // use this class without a separately reviewed activation change.
+ class asset_registry
+ {
+ public:
+ bool apply_issuance(
+ const issuance_descriptor& descriptor,
+ const crypto::signature& issuer_signature,
+ const boost::optional<crypto::signature>& collection_signature,
+ uint64_t height,
+ crypto::hash& asset_id,
+ std::string* error = nullptr);
+ void detach(uint64_t height);
+ bool contains(const crypto::hash& asset_id) const;
+ const asset_record* find(const crypto::hash& asset_id) const;
+ size_t size() const { return records_.size(); }
+ std::set<crypto::hash> known_assets() const;
+
+ private:
+ std::map<crypto::hash, asset_record> records_;
+ };
+
+ struct transparent_amount
+ {
+ crypto::hash asset_id{};
+ uint64_t amount = 0;
+ };
+
+ // Test-only semantic statement used to validate conservation rules before a
+ // confidential commitment/proof construction is selected. It is not a wire
+ // transaction and must never be serialized into the public protocol.
+ struct transparent_balance_statement
+ {
+ uint64_t xmz_inputs = 0;
+ uint64_t xmz_outputs = 0;
+ uint64_t xmz_fee = 0;
+ boost::optional<issuance_descriptor> issuance;
+ std::vector<transparent_amount> asset_inputs;
+ std::vector<transparent_amount> asset_outputs;
+ std::vector<transparent_amount> asset_burns;
+ };
+
+ bool validate_transparent_balance_statement(
+ const transparent_balance_statement& statement,
+ const std::set<crypto::hash>& known_assets,
+ std::string* error = nullptr);
+}
+}
diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp
index 923ad64af..2d8f6e2af 100644
--- a/src/cryptonote_basic/cryptonote_format_utils.cpp
+++ b/src/cryptonote_basic/cryptonote_format_utils.cpp
@@ -1131,6 +1131,10 @@ namespace cryptonote
{
switch (decimal_point)
{
+ case 11:
+ case 8:
+ case 5:
+ case 2:
case 12:
case 9:
case 6:
@@ -1154,6 +1158,16 @@ namespace cryptonote
decimal_point = default_decimal_point;
switch (decimal_point)
{
+ case 11:
+ return "XMZ";
+ case 8:
+ return "mXMZ";
+ case 5:
+ return "uXMZ";
+ case 2:
+ return "nXMZ";
+ case 0:
+ return "atomic XMZ";
case 12:
return "monero";
case 9:
@@ -1162,8 +1176,6 @@ namespace cryptonote
return "micronero";
case 3:
return "nanonero";
- case 0:
- return "piconero";
default:
ASSERT_MES_AND_THROW("Invalid decimal point specification: " << decimal_point);
}
diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h
index 82891b9de..3c74f12c1 100644
--- a/src/cryptonote_config.h
+++ b/src/cryptonote_config.h
@@ -51,9 +51,9 @@
#define BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW 60
// MONEY_SUPPLY - total number coins to be generated
-#define MONEY_SUPPLY ((uint64_t)(-1))
+#define MONEY_SUPPLY UINT64_C(10000000000000000000) // 100,000,000 XMZ
#define EMISSION_SPEED_FACTOR_PER_MINUTE (20)
-#define FINAL_SUBSIDY_PER_MINUTE ((uint64_t)300000000000) // 3 * pow(10, 11)
+#define FINAL_SUBSIDY_PER_MINUTE UINT64_C(163000000000) // 1.63 XMZ/minute = 3.26 XMZ per 2-minute block
#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
@@ -62,23 +62,23 @@
#define CRYPTONOTE_LONG_TERM_BLOCK_WEIGHT_WINDOW_SIZE 100000 // size in blocks of the long term block weight median window
#define CRYPTONOTE_SHORT_TERM_BLOCK_WEIGHT_SURGE_FACTOR 50
#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_C(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)
-#define FEE_PER_BYTE ((uint64_t)300000)
-#define DYNAMIC_FEE_PER_KB_BASE_FEE ((uint64_t)2000000000) // 2 * pow(10,9)
-#define DYNAMIC_FEE_PER_KB_BASE_BLOCK_REWARD ((uint64_t)10000000000000) // 10 * pow(10,12)
-#define DYNAMIC_FEE_PER_KB_BASE_FEE_V5 ((uint64_t)2000000000 * (uint64_t)CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V2 / CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V5)
+#define FEE_PER_KB_OLD UINT64_C(1000000000) // scaled for 11 decimals
+#define FEE_PER_KB UINT64_C(200000000) // scaled for 11 decimals
+#define FEE_PER_BYTE UINT64_C(30000)
+#define DYNAMIC_FEE_PER_KB_BASE_FEE UINT64_C(200000000) // scaled for 11 decimals
+#define DYNAMIC_FEE_PER_KB_BASE_BLOCK_REWARD UINT64_C(1000000000000) // 10 XMZ
+#define DYNAMIC_FEE_PER_KB_BASE_FEE_V5 (UINT64_C(200000000) * (uint64_t)CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V2 / CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V5)
#define DYNAMIC_FEE_REFERENCE_TRANSACTION_WEIGHT ((uint64_t)3000)
#define ORPHANED_BLOCKS_MAX_COUNT 100
#define DIFFICULTY_TARGET_V2 120 // seconds
-#define DIFFICULTY_TARGET_V1 60 // seconds - before first fork
+#define DIFFICULTY_TARGET_V1 120 // seconds - Monzero uses two-minute blocks from genesis
#define DIFFICULTY_WINDOW 720 // blocks
#define DIFFICULTY_LAG 15 // !!!
#define DIFFICULTY_CUT 60 // timestamps to cut after sorting
@@ -162,7 +162,7 @@
#define RPC_IP_FAILS_BEFORE_BLOCK 3
-#define CRYPTONOTE_NAME "bitmonero"
+#define CRYPTONOTE_NAME "monzero"
#define CRYPTONOTE_BLOCKCHAINDATA_FILENAME "data.mdb"
#define CRYPTONOTE_BLOCKCHAINDATA_LOCK_FILENAME "lock.mdb"
#define P2P_NET_DATA_FILENAME "p2pstate.bin"
@@ -221,20 +221,20 @@ namespace config
{
uint64_t const DEFAULT_FEE_ATOMIC_XMR_PER_KB = 500; // Just a placeholder! Change me!
uint8_t const FEE_CALCULATION_MAX_RETRIES = 10;
- uint64_t const DEFAULT_DUST_THRESHOLD = ((uint64_t)2000000000); // 2 * pow(10, 9)
- uint64_t const BASE_REWARD_CLAMP_THRESHOLD = ((uint64_t)100000000); // pow(10, 8)
+ uint64_t const DEFAULT_DUST_THRESHOLD = UINT64_C(200000000); // scaled for 11 decimals
+ uint64_t const BASE_REWARD_CLAMP_THRESHOLD = UINT64_C(10000000); // scaled for 11 decimals
- 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 = 86;
+ uint64_t const CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 87;
+ uint64_t const CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 88;
+ uint16_t const P2P_DEFAULT_PORT = 6174;
+ uint16_t const RPC_DEFAULT_PORT = 6175;
+ uint16_t const ZMQ_RPC_DEFAULT_PORT = 6176;
boost::uuids::uuid const NETWORK_ID = { {
- 0x12 ,0x30, 0xF1, 0x71 , 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;
+ 0xfc, 0x32, 0x91, 0xba, 0x86, 0x66, 0x4b, 0x87, 0x8e, 0xbb, 0xd5, 0x9b, 0x72, 0xd4, 0xfc, 0xaa
+ } }; // Monzero mainnet
+ std::string const GENESIS_TX = "013c01ff0001bda282a38eab04029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121017767aafcde9be00dcfd098715ebcf7f410daebc582fda69d24a28e9d0bc890d1";
+ uint32_t const GENESIS_NONCE = 818137480;
// Hash domain separators
const char HASH_KEY_BULLETPROOF_EXPONENT[] = "bulletproof";
@@ -256,7 +256,7 @@ namespace config
const unsigned char HASH_KEY_CLSAG_ROUND[] = "CLSAG_round";
const unsigned char HASH_KEY_CLSAG_AGG_0[] = "CLSAG_agg_0";
const unsigned char HASH_KEY_CLSAG_AGG_1[] = "CLSAG_agg_1";
- const char HASH_KEY_MESSAGE_SIGNING[] = "MoneroMessageSignature";
+ const char HASH_KEY_MESSAGE_SIGNING[] = "MonzeroMessageSignature";
const unsigned char HASH_KEY_MM_SLOT = 'm';
const constexpr char HASH_KEY_MULTISIG_TX_PRIVKEYS_SEED[] = "multisig_tx_privkeys_seed";
const constexpr char HASH_KEY_MULTISIG_TX_PRIVKEYS[] = "multisig_tx_privkeys";
@@ -267,32 +267,32 @@ namespace config
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;
+ uint64_t const CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 111;
+ uint64_t const CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 112;
+ uint64_t const CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 113;
+ uint16_t const P2P_DEFAULT_PORT = 16174;
+ uint16_t const RPC_DEFAULT_PORT = 16175;
+ uint16_t const ZMQ_RPC_DEFAULT_PORT = 16176;
boost::uuids::uuid const NETWORK_ID = { {
- 0x12 ,0x30, 0xF1, 0x71 , 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;
+ 0xad, 0xc2, 0xa2, 0x71, 0x55, 0x39, 0x43, 0xd9, 0xb3, 0xc2, 0x7a, 0xad, 0xaf, 0x6b, 0x93, 0x8c
+ } }; // Monzero testnet
+ std::string const GENESIS_TX = "013c01ff0001bda282a38eab04029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121017767aafcde9be00dcfd098715ebcf7f410daebc582fda69d24a28e9d0bc890d1";
+ uint32_t const GENESIS_NONCE = 818137481;
}
namespace stagenet
{
- uint64_t const CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 24;
- uint64_t const CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 25;
- uint64_t const CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 36;
- uint16_t const P2P_DEFAULT_PORT = 38080;
- uint16_t const RPC_DEFAULT_PORT = 38081;
- uint16_t const ZMQ_RPC_DEFAULT_PORT = 38082;
+ uint64_t const CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 131;
+ uint64_t const CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 132;
+ uint64_t const CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 133;
+ uint16_t const P2P_DEFAULT_PORT = 26174;
+ uint16_t const RPC_DEFAULT_PORT = 26175;
+ uint16_t const ZMQ_RPC_DEFAULT_PORT = 26176;
boost::uuids::uuid const NETWORK_ID = { {
- 0x12 ,0x30, 0xF1, 0x71 , 0x61, 0x04 , 0x41, 0x61, 0x17, 0x31, 0x00, 0x82, 0x16, 0xA1, 0xA1, 0x12
- } }; // Bender's daydream
- std::string const GENESIS_TX = "013c01ff0001ffffffffffff0302df5d56da0c7d643ddd1ce61901c7bdc5fb1738bfe39fbe69c28a3a7032729c0f2101168d0c4ca86fb55a4cf6a36d31431be1c53a3bd7411bb24e8832410289fa6f3b";
- uint32_t const GENESIS_NONCE = 10002;
+ 0xb1, 0xdc, 0xac, 0x5a, 0x9d, 0x11, 0x46, 0x53, 0x81, 0x22, 0xe6, 0x7e, 0xec, 0x8b, 0x59, 0xac
+ } }; // Monzero stagenet
+ std::string const GENESIS_TX = "013c01ff0001bda282a38eab0402df5d56da0c7d643ddd1ce61901c7bdc5fb1738bfe39fbe69c28a3a7032729c0f2101168d0c4ca86fb55a4cf6a36d31431be1c53a3bd7411bb24e8832410289fa6f3b";
+ uint32_t const GENESIS_NONCE = 818137482;
}
}
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index fcc92644a..ffc5ddd87 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -5583,6 +5583,13 @@ void Blockchain::cancel()
static const char expected_block_hashes_hash[] = "2aea941d43024422a63f223c84b9d88d1f58d31e1f508c2d6d43cd637ba32d16";
void Blockchain::load_compiled_in_block_hashes(const GetCheckpointsCallback& get_checkpoints)
{
+ // Monzero has an independent genesis block and chain history. The compiled
+ // per-block data bundled by the upstream Monero source belongs to Monero and
+ // must never be used to validate or accelerate Monzero synchronization. If
+ // loaded, valid Monzero blocks inside that inherited height range are
+ // rejected and peers split into isolated chains.
+ return;
+
if (get_checkpoints == nullptr || !m_fast_sync)
{
return;
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index 4d7a454b2..b9751f597 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -171,7 +171,7 @@ namespace cryptonote
};
static const command_line::arg_descriptor<std::string> arg_check_updates = {
"check-updates"
- , "Check for new versions of monero: [disabled|notify|download|update]"
+ , "Check for new versions of Monzero: [disabled|notify|download|update]"
, "notify"
};
static const command_line::arg_descriptor<bool> arg_fluffy_blocks = {
@@ -205,7 +205,7 @@ namespace cryptonote
static const command_line::arg_descriptor<std::string> arg_block_rate_notify = {
"block-rate-notify"
, "Run a program when the block rate undergoes large fluctuations. This might "
- "be a sign of large amounts of hash rate going on and off the Monero network, "
+ "be a sign of large amounts of hash rate going on and off the Monzero network, "
"and thus be of potential interest in predicting attacks. %t will be replaced "
"by the number of minutes for the observation window, %b by the number of "
"blocks observed within that window, and %e by the number of blocks that was "
@@ -501,8 +501,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("Monzero now uses a new format. You can either remove blockchain.bin to start syncing");
+ MWARNING("the blockchain anew, or use monzero-blockchain-export and monzero-blockchain-import to");
MWARNING("convert your existing blockchain.bin to the new format. See README.md for instructions.");
return false;
}
@@ -1590,7 +1590,7 @@ namespace cryptonote
{
std::string main_message;
if (m_offline)
- main_message = "The daemon is running offline and will not attempt to sync to the Monero network.";
+ main_message = "The daemon is running offline and will not attempt to sync to the Monzero network.";
else
main_message = "The daemon will start synchronizing with the network. This may take a long time to complete.";
MGINFO_YELLOW(ENDL << "**********************************************************************" << ENDL
@@ -1833,7 +1833,7 @@ namespace cryptonote
MDEBUG("blocks in the last " << seconds[n] / 60 << " minutes: " << b << " (probability " << p << ")");
if (p < threshold)
{
- MWARNING("There were " << b << (b == max_blocks_checked ? " or more" : "") << " blocks in the last " << seconds[n] / 60 << " minutes, there might be large hash rate changes, or we might be partitioned, cut off from the Monero network or under attack, or your computer's time is off. Or it could be just sheer bad luck.");
+ MWARNING("There were " << b << (b == max_blocks_checked ? " or more" : "") << " blocks in the last " << seconds[n] / 60 << " minutes, there might be large hash rate changes, or we might be partitioned, cut off from the Monzero network or under attack, or your computer's time is off. Or it could be just sheer bad luck.");
std::shared_ptr<tools::Notify> block_rate_notify = m_block_rate_notify;
if (block_rate_notify)
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index 3ad26a3de..f424e0bde 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -2387,7 +2387,11 @@ skip:
{
bool val_expected = false;
uint64_t current_blockchain_height = m_core.get_current_blockchain_height();
- if(!m_core.is_within_compiled_block_hash_area(current_blockchain_height) && m_synchronized.compare_exchange_strong(val_expected, true))
+ // Monzero starts a new chain at height 0. The inherited Monero compiled
+ // checkpoint range is therefore not meaningful for deciding whether this
+ // network has synchronized, and keeping this guard leaves early Monzero
+ // nodes permanently "busy" even after reaching their peer's tip.
+ if(m_synchronized.compare_exchange_strong(val_expected, true))
{
if ((current_blockchain_height > m_sync_start_height) && (m_sync_spans_downloaded > 0))
{
@@ -2407,7 +2411,7 @@ skip:
}
}
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 monzero-wallet-cli." << ENDL
<< ENDL
<< "Use the \"help\" command to see the list of available commands." << ENDL
<< "**********************************************************************");
@@ -2873,4 +2877,3 @@ skip:
m_core.stop();
}
} // namespace
-
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
index 455f72472..c1780b37e 100644
--- a/src/daemon/CMakeLists.txt
+++ b/src/daemon/CMakeLists.txt
@@ -45,6 +45,9 @@ monero_add_executable(daemon
${daemon_sources}
${daemon_headers}
${daemon_private_headers})
+if(STATIC AND NOT MINGW)
+ find_package(ZLIB REQUIRED)
+endif()
target_link_libraries(daemon
PRIVATE
rpc
@@ -68,8 +71,9 @@ target_link_libraries(daemon
${ZMQ_LIB}
${GNU_READLINE_LIBRARY}
${EXTRA_LIBRARIES}
+ $<$<AND:$<BOOL:${STATIC}>,$<NOT:$<BOOL:${MINGW}>>>:ZLIB::ZLIB>
${Blocks})
set_property(TARGET daemon
PROPERTY
- OUTPUT_NAME "monerod")
+ OUTPUT_NAME "monzerod")
install(TARGETS daemon DESTINATION bin)
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp
index 0c091c7ed..ef8f7be97 100644
--- a/src/daemon/command_parser_executor.cpp
+++ b/src/daemon/command_parser_executor.cpp
@@ -979,10 +979,10 @@ bool t_command_parser_executor::prune_blockchain(const std::vector<std::string>&
if (args.empty() || args[0] != "confirm")
{
- std::cout << "Warning: pruning from within monerod will not shrink the database file size." << std::endl;
+ std::cout << "Warning: pruning from within monzerod will not shrink the database file size." << std::endl;
std::cout << "Instead, parts of the file will be marked as free, so the file will not grow" << std::endl;
std::cout << "until that newly free space is used up. If you want a smaller file size now," << std::endl;
- std::cout << "exit monerod and run monero-blockchain-prune (you will temporarily need more" << std::endl;
+ std::cout << "exit monzerod and run monzero-blockchain-prune (you will temporarily need more" << std::endl;
std::cout << "disk space for the database conversion though). If you are OK with the database" << std::endl;
std::cout << "file keeping the same size, re-run this command with the \"confirm\" parameter." << std::endl;
return true;
diff --git a/src/daemon/command_server.cpp b/src/daemon/command_server.cpp
index fc5f1b3d7..cbd5e2d4d 100644
--- a/src/daemon/command_server.cpp
+++ b/src/daemon/command_server.cpp
@@ -412,7 +412,7 @@ bool t_command_server::apropos(const std::vector<std::string>& args)
std::string t_command_server::get_commands_str()
{
std::stringstream ss;
- ss << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << std::endl;
+ ss << "Monzero '" << 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 d67bd6141..7864fa408 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 = "Monzero 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("Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ") Daemonised");
return t_daemon{vm, public_rpc_port};
}
@@ -76,4 +76,3 @@ namespace daemonize
return t_daemon{vm, public_rpc_port}.run(true);
}
}
-
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index a61fbda6f..8c2b098da 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -192,7 +192,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (core 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;
@@ -201,7 +201,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (core v" << MONERO_VERSION_FULL << ")" << ENDL;
return 0;
}
@@ -306,7 +306,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("Monzero '" << MONERO_RELEASE_NAME << "' (core v" << MONERO_VERSION_FULL << ")");
// If there are positional options, we're running a daemon command
{
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index f6746b8ad..91711d88b 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -614,8 +614,8 @@ bool t_rpc_command_executor::mining_status() {
uint64_t daily = 86400ull / mres.block_target * mres.block_reward * ratio;
uint64_t monthly = 86400ull / mres.block_target * 30.5 * mres.block_reward * ratio;
uint64_t yearly = 86400ull / mres.block_target * 356 * mres.block_reward * ratio;
- tools::msg_writer() << "Expected: " << cryptonote::print_money(daily) << " monero daily, "
- << cryptonote::print_money(monthly) << " monero monthly, " << cryptonote::print_money(yearly) << " yearly";
+ tools::msg_writer() << "Expected: " << cryptonote::print_money(daily) << " XMZ daily, "
+ << cryptonote::print_money(monthly) << " XMZ monthly, " << cryptonote::print_money(yearly) << " XMZ yearly";
}
return true;
@@ -1463,10 +1463,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() << "monzerod is running";
}
else {
- tools::fail_msg_writer() << "monerod is NOT running";
+ tools::fail_msg_writer() << "monzerod is NOT running";
}
return true;
diff --git a/src/debug_utilities/cn_deserialize.cpp b/src/debug_utilities/cn_deserialize.cpp
index 41c397bd8..8ca1cb1cf 100644
--- a/src/debug_utilities/cn_deserialize.cpp
+++ b/src/debug_utilities/cn_deserialize.cpp
@@ -103,7 +103,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/debug_utilities/dns_checks.cpp b/src/debug_utilities/dns_checks.cpp
index 62854cfa3..dbd5c7a2f 100644
--- a/src/debug_utilities/dns_checks.cpp
+++ b/src/debug_utilities/dns_checks.cpp
@@ -121,7 +121,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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
diff --git a/src/gen_ssl_cert/gen_ssl_cert.cpp b/src/gen_ssl_cert/gen_ssl_cert.cpp
index cd810ed20..c95c71a16 100644
--- a/src/gen_ssl_cert/gen_ssl_cert.cpp
+++ b/src/gen_ssl_cert/gen_ssl_cert.cpp
@@ -121,13 +121,13 @@ 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 << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 0;
}
if (command_line::get_arg(vm, command_line::arg_version))
{
- std::cout << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL;
+ std::cout << "Monzero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")" << ENDL;
return 0;
}
diff --git a/src/hardforks/hardforks.cpp b/src/hardforks/hardforks.cpp
index 336ef6519..ff11242dc 100644
--- a/src/hardforks/hardforks.cpp
+++ b/src/hardforks/hardforks.cpp
@@ -32,97 +32,29 @@
#define MONERO_DEFAULT_LOG_CATEGORY "blockchain.hardforks"
const hardfork_t 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 },
-
- // version 10 starts from block 1788000, which is on or around the 9th of March, 2019. Fork time finalised on 2019-02-10.
- { 10, 1788000, 0, 1549792439 },
-
- // version 11 starts from block 1788720, which is on or around the 10th of March, 2019. Fork time finalised on 2019-02-15.
- { 11, 1788720, 0, 1550225678 },
-
- // version 12 starts from block 1978433, which is on or around the 30th of November, 2019. Fork time finalised on 2019-10-18.
- { 12, 1978433, 0, 1571419280 },
-
- { 13, 2210000, 0, 1598180817 },
- { 14, 2210720, 0, 1598180818 },
-
- { 15, 2688888, 0, 1656629117 },
- { 16, 2689608, 0, 1656629118 },
+ // Activate Monero's inherited protocol revisions during the private
+ // bootstrap window. Public Monzero operation begins on v16/RandomX.
+ { 1, 1, 0, 1 }, { 2, 2, 0, 2 }, { 3, 3, 0, 3 }, { 4, 4, 0, 4 },
+ { 5, 5, 0, 5 }, { 6, 6, 0, 6 }, { 7, 7, 0, 7 }, { 8, 8, 0, 8 },
+ { 9, 9, 0, 9 }, { 10, 10, 0, 10 }, { 11, 11, 0, 11 }, { 12, 12, 0, 12 },
+ { 13, 13, 0, 13 }, { 14, 14, 0, 14 }, { 15, 15, 0, 15 }, { 16, 16, 0, 16 },
};
const size_t num_mainnet_hard_forks = sizeof(mainnet_hard_forks) / sizeof(mainnet_hard_forks[0]);
-const uint64_t mainnet_hard_fork_version_1_till = 1009826;
+const uint64_t mainnet_hard_fork_version_1_till = 1;
const hardfork_t 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 },
- { 10, 1154318, 0, 1550153694 },
- { 11, 1155038, 0, 1550225678 },
- { 12, 1308737, 0, 1569582000 },
- { 13, 1543939, 0, 1599069376 },
- { 14, 1544659, 0, 1599069377 },
- { 15, 1982800, 0, 1652727000 },
- { 16, 1983520, 0, 1652813400 },
+ { 1, 1, 0, 1 }, { 2, 2, 0, 2 }, { 3, 3, 0, 3 }, { 4, 4, 0, 4 },
+ { 5, 5, 0, 5 }, { 6, 6, 0, 6 }, { 7, 7, 0, 7 }, { 8, 8, 0, 8 },
+ { 9, 9, 0, 9 }, { 10, 10, 0, 10 }, { 11, 11, 0, 11 }, { 12, 12, 0, 12 },
+ { 13, 13, 0, 13 }, { 14, 14, 0, 14 }, { 15, 15, 0, 15 }, { 16, 16, 0, 16 },
};
const size_t num_testnet_hard_forks = sizeof(testnet_hard_forks) / sizeof(testnet_hard_forks[0]);
-const uint64_t testnet_hard_fork_version_1_till = 624633;
+const uint64_t testnet_hard_fork_version_1_till = 1;
const hardfork_t 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 },
- { 10, 269000, 0, 1550153694 },
- { 11, 269720, 0, 1550225678 },
- { 12, 454721, 0, 1571419280 },
- { 13, 675405, 0, 1598180817 },
- { 14, 676125, 0, 1598180818 },
- { 15, 1151000, 0, 1656629117 },
- { 16, 1151720, 0, 1656629118 },
+ { 1, 1, 0, 1 }, { 2, 2, 0, 2 }, { 3, 3, 0, 3 }, { 4, 4, 0, 4 },
+ { 5, 5, 0, 5 }, { 6, 6, 0, 6 }, { 7, 7, 0, 7 }, { 8, 8, 0, 8 },
+ { 9, 9, 0, 9 }, { 10, 10, 0, 10 }, { 11, 11, 0, 11 }, { 12, 12, 0, 12 },
+ { 13, 13, 0, 13 }, { 14, 14, 0, 14 }, { 15, 15, 0, 15 }, { 16, 16, 0, 16 },
};
const size_t num_stagenet_hard_forks = sizeof(stagenet_hard_forks) / sizeof(stagenet_hard_forks[0]);
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index d7cbaa567..6af3aed94 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -295,12 +295,11 @@ namespace nodetool
virtual void clear_used_stripe_peers();
private:
- const std::vector<std::string> m_seed_nodes_list =
- { "seeds.moneroseeds.se"
- , "seeds.moneroseeds.ae.org"
- , "seeds.moneroseeds.ch"
- , "seeds.moneroseeds.li"
- };
+ // Monzero-controlled DNS bootstrap nodes. The network's default P2P port
+ // is appended after each hostname is resolved.
+ // Monzero launchers configure node.monzero.org as a persistent priority
+ // peer. Do not also create an upstream-style, short-lived seed connection.
+ const std::vector<std::string> m_seed_nodes_list = {};
bool islimitup=false;
bool islimitdown=false;
@@ -546,4 +545,3 @@ namespace nodetool
}
POP_WARNINGS
-
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 91a54f43e..9df267612 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -703,34 +703,8 @@ namespace nodetool
std::set<std::string> node_server<t_payload_net_handler>::get_ip_seed_nodes() const
{
std::set<std::string> full_addrs;
- if (m_nettype == cryptonote::TESTNET)
- {
- full_addrs.insert("176.9.0.187:28080");
- full_addrs.insert("192.99.8.110:28080");
- full_addrs.insert("37.187.74.171:28080");
- full_addrs.insert("88.99.195.15:28080");
- full_addrs.insert("5.104.84.64:28080");
- }
- else if (m_nettype == cryptonote::STAGENET)
- {
- full_addrs.insert("176.9.0.187:38080");
- full_addrs.insert("192.99.8.110:38080");
- full_addrs.insert("37.187.74.171:38080");
- full_addrs.insert("88.99.195.15:38080");
- full_addrs.insert("5.104.84.64:38080");
- }
- else if (m_nettype == cryptonote::FAKECHAIN)
- {
- }
- else
- {
- full_addrs.insert("176.9.0.187:18080");
- full_addrs.insert("88.198.163.90:18080");
- full_addrs.insert("192.99.8.110:18080");
- full_addrs.insert("37.187.74.171:18080");
- full_addrs.insert("88.99.195.15:18080");
- full_addrs.insert("5.104.84.64:18080");
- }
+ // Monzero launchers configure the bootstrap node as a persistent priority
+ // peer. Keeping the public node here would make that node connect to itself.
return full_addrs;
}
//-----------------------------------------------------------------------------------
@@ -858,27 +832,8 @@ namespace nodetool
case epee::net_utils::zone::public_:
return get_dns_seed_nodes();
case epee::net_utils::zone::tor:
- if (m_nettype == cryptonote::MAINNET)
- {
- return {
- "zbjkbsxc5munw3qusl7j2hpcmikhqocdf4pqhnhtpzw5nt5jrmofptid.onion:18083",
- "plowsof3t5hogddwabaeiyrno25efmzfxyro2vligremt7sxpsclfaid.onion:18083",
- "plowsoffjexmxalw73tkjmf422gq6575fc7vicuu4javzn2ynnte6tyd.onion:18083",
- "plowsofe6cleftfmk2raiw5h2x66atrik3nja4bfd3zrfa2hdlgworad.onion:18083",
- "aclc4e2jhhtr44guufbnwk5bzwhaecinax4yip4wr4tjn27sjsfg6zqd.onion:18083",
- "lykcas4tus7mkm4bhsgqe4drtd4awi7gja24goscc47xfgzj54yofyqd.onion:18083",
- };
- }
return {};
case epee::net_utils::zone::i2p:
- if (m_nettype == cryptonote::MAINNET)
- {
- return {
- "uqj3aphckqtjsitz7kxx5flqpwjlq5ppr3chazfued7xucv3nheq.b32.i2p",
- "vdmnehdjkpkg57nthgnjfuaqgku673r5bpbqg56ix6fyqoywgqrq.b32.i2p",
- "ugnlcdciyhghh2zert7c3kl4biwkirc43ke33jiy5slnd3mv2trq.b32.i2p",
- };
- }
return {};
default:
break;
@@ -1855,7 +1810,11 @@ namespace nodetool
pe_seed.adr = server.m_seed_nodes[current_index];
if (is_peer_used(pe_seed))
is_connected_to_at_least_one_seed_node = true;
- else if (try_to_connect_and_handshake_with_new_peer(server.m_seed_nodes[current_index], true))
+ // Monzero currently has a small bootstrap network, so retain a seed
+ // connection as a normal peer instead of using it only to fetch a
+ // peer list. This allows a fresh node to synchronize when the seed is
+ // the only publicly reachable peer.
+ else if (try_to_connect_and_handshake_with_new_peer(server.m_seed_nodes[current_index], false))
break;
if(++try_count > server.m_seed_nodes.size())
{
@@ -2121,6 +2080,10 @@ namespace nodetool
template<class t_payload_net_handler>
bool node_server<t_payload_net_handler>::update_dns_blocklist()
{
+ // MoneroPulse blocklists belong to the upstream Monero network. Leave DNS
+ // blocklisting disabled until Monzero publishes its own signed records.
+ return true;
+#if 0
if (!m_enable_dns_blocklist)
return true;
if (m_nettype != cryptonote::MAINNET)
@@ -2170,6 +2133,7 @@ namespace nodetool
if (good > 0)
MINFO(good << " addresses added to the blocklist");
return true;
+#endif
}
//-----------------------------------------------------------------------------------
template<class t_payload_net_handler>
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index c68449630..b5bfb85fa 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -526,9 +526,11 @@ namespace cryptonote
res.tx_count = m_core.get_blockchain_storage().get_total_transactions() - res.height; //without coinbase
res.tx_pool_size = m_core.get_pool_transactions_count(!restricted);
res.alt_blocks_count = restricted ? 0 : m_core.get_blockchain_storage().get_alternative_blocks_count();
- uint64_t total_conn = restricted ? 0 : m_p2p.get_public_connections_count();
- res.outgoing_connections_count = restricted ? 0 : m_p2p.get_public_outgoing_connections_count();
- res.incoming_connections_count = restricted ? 0 : (total_conn - res.outgoing_connections_count);
+ // Connection totals are safe, aggregate network-health information for
+ // Monzero's public dashboard. Individual peer addresses remain restricted.
+ uint64_t total_conn = m_p2p.get_public_connections_count();
+ res.outgoing_connections_count = m_p2p.get_public_outgoing_connections_count();
+ res.incoming_connections_count = total_conn - res.outgoing_connections_count;
res.rpc_connections_count = restricted ? 0 : get_connections_count();
res.white_peerlist_size = restricted ? 0 : m_p2p.get_public_white_peers_count();
res.grey_peerlist_size = restricted ? 0 : m_p2p.get_public_gray_peers_count();
diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp
index add8bca8f..06b1af01f 100644
--- a/src/rpc/daemon_handler.cpp
+++ b/src/rpc/daemon_handler.cpp
@@ -562,9 +562,11 @@ namespace rpc
res.info.alt_blocks_count = m_restricted ? 0 : chain.get_alternative_blocks_count();
- uint64_t total_conn = m_restricted ? 0 : m_p2p.get_public_connections_count();
- res.info.outgoing_connections_count = m_restricted ? 0 : m_p2p.get_public_outgoing_connections_count();
- res.info.incoming_connections_count = m_restricted ? 0 : total_conn - res.info.outgoing_connections_count;
+ // Publish aggregate counts while keeping peer identities unavailable from
+ // restricted RPC.
+ uint64_t total_conn = m_p2p.get_public_connections_count();
+ res.info.outgoing_connections_count = m_p2p.get_public_outgoing_connections_count();
+ res.info.incoming_connections_count = total_conn - res.info.outgoing_connections_count;
res.info.white_peerlist_size = m_restricted ? 0 : m_p2p.get_public_white_peers_count();
diff --git a/src/simplewallet/CMakeLists.txt b/src/simplewallet/CMakeLists.txt
index b659d9f48..b12ee60ad 100644
--- a/src/simplewallet/CMakeLists.txt
+++ b/src/simplewallet/CMakeLists.txt
@@ -39,6 +39,10 @@ monero_add_executable(simplewallet
${simplewallet_sources}
${simplewallet_headers}
${simplewallet_private_headers})
+if(STATIC AND NOT MINGW)
+ find_package(ZLIB REQUIRED)
+ find_library(ZSTD_LIBRARY NAMES zstd REQUIRED)
+endif()
target_link_libraries(simplewallet
PRIVATE
wallet
@@ -58,8 +62,19 @@ target_link_libraries(simplewallet
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${GNU_READLINE_LIBRARY}
- ${EXTRA_LIBRARIES})
+ ${EXTRA_LIBRARIES}
+ $<$<AND:$<BOOL:${STATIC}>,$<NOT:$<BOOL:${MINGW}>>>:ZLIB::ZLIB>)
+if(STATIC AND NOT MINGW)
+ # OpenSSL's static archive references optional compression backends. Force
+ # their objects into the final CLI wallet even though CMake emits OpenSSL
+ # later through transitive target dependencies.
+ target_link_options(simplewallet PRIVATE
+ -Wl,--whole-archive
+ ${ZLIB_LIBRARIES}
+ ${ZSTD_LIBRARY}
+ -Wl,--no-whole-archive)
+endif()
set_property(TARGET simplewallet
PROPERTY
- OUTPUT_NAME "monero-wallet-cli")
+ OUTPUT_NAME "monzero-wallet-cli")
install(TARGETS simplewallet DESTINATION bin)
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 39bf169f3..8202ad8ef 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -189,7 +189,7 @@ namespace
const command_line::arg_descriptor<bool> arg_non_deterministic = {"non-deterministic", sw::tr("Generate non-deterministic view and spend keys"), false};
const command_line::arg_descriptor<uint64_t> arg_restore_height = {"restore-height", sw::tr("Restore from specific blockchain height"), 0};
const command_line::arg_descriptor<std::string> arg_restore_date = {"restore-date", sw::tr("Restore from estimated blockchain height on specified date"), ""};
- const command_line::arg_descriptor<bool> 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<bool> arg_do_not_relay = {"do-not-relay", sw::tr("The newly created transaction will not be relayed to the Monzero network"), false};
const command_line::arg_descriptor<bool> arg_create_address_file = {"create-address-file", sw::tr("Create an address file for new wallets"), false};
const command_line::arg_descriptor<std::string> arg_subaddress_lookahead = {"subaddress-lookahead", tools::wallet2::tr("Set subaddress lookahead sizes to <major>:<minor>"), ""};
const command_line::arg_descriptor<bool> arg_use_english_language_names = {"use-english-language-names", sw::tr("Display English language names"), false};
@@ -526,7 +526,7 @@ namespace
std::stringstream prompt;
prompt << sw::tr("For URL: ") << url
<< ", " << dnssec_str << std::endl
- << sw::tr(" Monero Address = ") << addresses[0]
+ << sw::tr(" Monzero Address = ") << addresses[0]
<< std::endl
<< sw::tr("Is this OK?")
;
@@ -2361,25 +2361,25 @@ bool simple_wallet::public_nodes(const std::vector<std::string> &args)
bool simple_wallet::welcome(const std::vector<std::string> &args)
{
- message_writer() << tr("Welcome to Monero, the private cryptocurrency.");
+ message_writer() << tr("Welcome to Monzero, the private cryptocurrency.");
message_writer() << "";
- message_writer() << tr("Monero, like Bitcoin, is a cryptocurrency. That is, it is digital money.");
- message_writer() << tr("Unlike Bitcoin, your Monero transactions and balance stay private and are not visible to the world by default.");
+ message_writer() << tr("Monzero, like Bitcoin, is a cryptocurrency. That is, it is digital money.");
+ message_writer() << tr("Unlike Bitcoin, your Monzero transactions and balance stay private and are not visible to the world by default.");
message_writer() << tr("However, you have the option of making those available to select parties if you choose to.");
message_writer() << "";
- message_writer() << tr("Monero protects your privacy on the blockchain, and while Monero strives to improve all the time,");
- message_writer() << tr("no privacy technology can be 100% perfect, Monero included.");
- message_writer() << tr("Monero cannot protect you from malware, and it may not be as effective as we hope against powerful adversaries.");
- message_writer() << tr("Flaws in Monero may be discovered in the future, and attacks may be developed to peek under some");
- message_writer() << tr("of the layers of privacy Monero provides. Be safe and practice defense in depth.");
+ message_writer() << tr("Monzero protects your privacy on the blockchain, and while Monzero strives to improve all the time,");
+ message_writer() << tr("no privacy technology can be 100% perfect, Monzero included.");
+ message_writer() << tr("Monzero cannot protect you from malware, and it may not be as effective as we hope against powerful adversaries.");
+ message_writer() << tr("Flaws in Monzero may be discovered in the future, and attacks may be developed to peek under some");
+ message_writer() << tr("of the layers of privacy Monzero provides. Be safe and practice defense in depth.");
message_writer() << "";
- message_writer() << tr("Welcome to Monero and financial privacy. For more information see https://GetMonero.org");
+ message_writer() << tr("Welcome to Monzero and financial privacy. For more information see https://monzero.org");
return true;
}
bool simple_wallet::version(const std::vector<std::string> &args)
{
- message_writer() << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")";
+ message_writer() << "Monzero '" << MONERO_RELEASE_NAME << "' (core v" << MONERO_VERSION_FULL << ")";
return true;
}
@@ -2715,15 +2715,15 @@ bool simple_wallet::set_unit(const std::vector<std::string> &args/* = std::vecto
const std::string &unit = args[1];
unsigned int decimal_point = CRYPTONOTE_DISPLAY_DECIMAL_POINT;
- if (unit == "monero")
+ if (unit == "monzero" || unit == "XMZ")
decimal_point = CRYPTONOTE_DISPLAY_DECIMAL_POINT;
- else if (unit == "millinero")
+ else if (unit == "millizero" || unit == "mXMZ")
decimal_point = CRYPTONOTE_DISPLAY_DECIMAL_POINT - 3;
- else if (unit == "micronero")
+ else if (unit == "microzero" || unit == "uXMZ")
decimal_point = CRYPTONOTE_DISPLAY_DECIMAL_POINT - 6;
- else if (unit == "nanonero")
+ else if (unit == "nanozero" || unit == "nXMZ")
decimal_point = CRYPTONOTE_DISPLAY_DECIMAL_POINT - 9;
- else if (unit == "piconero")
+ else if (unit == "atomic-XMZ")
decimal_point = 0;
else
{
@@ -3278,7 +3278,7 @@ bool simple_wallet::help(const std::vector<std::string> &args/* = std::vector<st
message_writer() << tr("\"show_transfers [in|out|pending|failed|pool]\" - Show transactions.");
message_writer() << tr("\"sweep_all <address>\" - Send whole balance to another wallet.");
message_writer() << tr("\"seed\" - Show secret 25 words that can be used to recover this wallet.");
- message_writer() << tr("\"refresh\" - Synchronize wallet with the Monero network.");
+ message_writer() << tr("\"refresh\" - Synchronize wallet with the Monzero network.");
message_writer() << tr("\"status\" - Check current status of wallet.");
message_writer() << tr("\"version\" - Check software version.");
message_writer() << tr("\"exit\" - Exit wallet.");
@@ -3445,7 +3445,7 @@ simple_wallet::simple_wallet()
m_cmd_binder.set_handler("donate",
boost::bind(&simple_wallet::on_command, this, &simple_wallet::donate, _1),
tr(USAGE_DONATE),
- tr("Donate <amount> to the development team (donate.getmonero.org)."));
+ tr("Donations are not configured for this Monzero release."));
m_cmd_binder.set_handler("sign_transfer",
boost::bind(&simple_wallet::on_command, this, &simple_wallet::sign_transfer, _1),
tr(USAGE_SIGN_TRANSFER),
@@ -3520,8 +3520,8 @@ simple_wallet::simple_wallet()
"ask-password <0|1|2 (or never|action|decrypt)>\n "
" action: ask the password before many actions such as transfer, etc\n "
" decrypt: same as action, but keeps the spend key encrypted in memory when not needed\n "
- "unit <monero|millinero|micronero|nanonero|piconero>\n "
- " Set the default monero (sub-)unit.\n "
+ "unit <monzero|XMZ|millizero|mXMZ|microzero|uXMZ|nanozero|nXMZ|atomic-XMZ>\n "
+ " Set the default Monzero (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 "
@@ -3557,7 +3557,7 @@ simple_wallet::simple_wallet()
"background-sync <off|reuse-wallet-password|custom-background-password>\n "
" Set this to enable scanning in the background with just the view key while the wallet is locked.\n "
"setup-background-mining <1|0>\n "
- " Whether to enable background mining. Set this to support the network and to get a chance to receive new monero.\n "
+ " Whether to enable background mining. Set this to support the network and to get a chance to receive new XMZ.\n "
"device-name <device_name[:device_spec]>\n "
" Device name for hardware wallet.\n "
"export-format <\"binary\"|\"ascii\">\n "
@@ -3758,7 +3758,7 @@ simple_wallet::simple_wallet()
m_cmd_binder.set_handler("mms signer",
boost::bind(&simple_wallet::on_command, this, &simple_wallet::mms, _1),
tr(USAGE_MMS_SIGNER),
- tr("Set or modify authorized signer info (single-word label, transport address, Monero address), or list all signers"));
+ tr("Set or modify authorized signer info (single-word label, transport address, Monzero address), or list all signers"));
m_cmd_binder.set_handler("mms list",
boost::bind(&simple_wallet::on_command, this, &simple_wallet::mms, _1),
tr(USAGE_MMS_LIST),
@@ -3883,7 +3883,7 @@ simple_wallet::simple_wallet()
m_cmd_binder.set_handler("welcome",
boost::bind(&simple_wallet::on_command, this, &simple_wallet::welcome, _1),
tr(USAGE_WELCOME),
- tr("Prints basic info about Monero for first time users"));
+ tr("Prints basic info about Monzero for first time users"));
m_cmd_binder.set_handler("version",
boost::bind(&simple_wallet::on_command, this, &simple_wallet::version, _1),
tr(USAGE_VERSION),
@@ -4029,7 +4029,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
CHECK_SIMPLE_VARIABLE("refresh-type", set_refresh_type, tr("full (slowest, no assumptions); optimize-coinbase (fast, assumes the whole coinbase is paid to a single address); no-coinbase (fastest, assumes we receive no coinbase transaction), default (same as optimize-coinbase)"));
CHECK_SIMPLE_VARIABLE("priority", set_default_priority, tr("0, 1, 2, 3, or 4, or one of ") << join_priority_strings(", "));
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("monzero, XMZ, millizero, mXMZ, microzero, uXMZ, nanozero, nXMZ, atomic-XMZ"));
CHECK_SIMPLE_VARIABLE("max-reorg-depth", set_max_reorg_depth, tr("unsigned integer"));
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"));
@@ -4844,7 +4844,7 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
bool ssl = false;
if (m_wallet->check_connection(NULL, &ssl) && !ssl)
message_writer(console_color_red, true) << boost::format(tr("Using your own without SSL exposes your RPC traffic to monitoring"));
- message_writer(console_color_red, true) << boost::format(tr("You are strongly encouraged to connect to the Monero network using your own daemon"));
+ message_writer(console_color_red, true) << boost::format(tr("You are strongly encouraged to connect to the Monzero network using your own daemon"));
message_writer(console_color_red, true) << boost::format(tr("If you or someone you trust are operating this daemon, you can use --trusted-daemon"));
COMMAND_RPC_GET_INFO::request req;
@@ -4865,7 +4865,7 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
check_background_mining(password);
if (welcome)
- message_writer(console_color_yellow, true) << tr("If you are new to Monero, type \"welcome\" for a brief overview.");
+ message_writer(console_color_yellow, true) << tr("If you are new to Monzero, type \"welcome\" for a brief overview.");
m_last_activity_time = time(NULL);
return true;
@@ -5099,7 +5099,7 @@ boost::optional<epee::wipeable_string> simple_wallet::new_wallet(const boost::pr
"Use the \"help\" command to see a simplified list of available commands.\n"
"Use \"help all\" command to see the list of all available commands.\n"
"Use \"help <command>\" 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 monzero-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")
;
@@ -5484,7 +5484,7 @@ void simple_wallet::start_background_mining()
return;
}
}
- success_msg_writer() << tr("Background mining enabled. Thank you for supporting the Monero network.");
+ success_msg_writer() << tr("Background mining enabled. Thank you for supporting the Monzero network.");
}
//----------------------------------------------------------------------------------------------------
void simple_wallet::stop_background_mining()
@@ -5560,7 +5560,7 @@ void simple_wallet::check_background_mining(const epee::wipeable_string &passwor
{
message_writer() << tr("The daemon is not set up to background mine.");
message_writer() << tr("With background mining enabled, the daemon will mine when idle and not on battery.");
- message_writer() << tr("Enabling this supports the network you are using, and makes you eligible for receiving new monero");
+ message_writer() << tr("Enabling this supports the network you are using, and makes you eligible for receiving new XMZ");
std::string accepted = input_line(tr("Do you want to do it now? (Y/Yes/N/No): "));
if (std::cin.eof() || !command_line::is_yes(accepted)) {
m_wallet->setup_background_mining(tools::wallet2::BackgroundMiningNo);
@@ -6625,7 +6625,7 @@ void simple_wallet::check_for_inactivity_lock(bool user)
m_in_command = true;
if (!user)
{
- const std::string speech = tr("I locked your Monero wallet to protect you while you were away\nsee \"help set\" to configure/disable");
+ const std::string speech = tr("I locked your Monzero wallet to protect you while you were away\nsee \"help set\" to configure/disable");
std::vector<std::pair<std::string, size_t>> lines = tools::split_string_by_width(speech, 45);
size_t max_len = 0;
@@ -7828,6 +7828,10 @@ bool simple_wallet::sweep_below(const std::vector<std::string> &args_)
//----------------------------------------------------------------------------------------------------
bool simple_wallet::donate(const std::vector<std::string> &args_)
{
+ (void)args_;
+ fail_msg_writer() << tr("Donations are not configured for this Monzero release.");
+ return true;
+#if 0
CHECK_IF_BACKGROUND_SYNCING("cannot donate");
std::vector<std::string> local_args = args_;
if(local_args.empty() || local_args.size() > 5)
@@ -7886,6 +7890,7 @@ bool simple_wallet::donate(const std::vector<std::string> &args_)
message_writer() << (boost::format(tr("Donating %s %s to %s.")) % amount_str % cryptonote::get_unit(cryptonote::get_default_decimal_point()) % address_str).str();
transfer(local_args);
return true;
+#endif
}
//----------------------------------------------------------------------------------------------------
bool simple_wallet::accept_loaded_tx(const std::function<size_t()> get_num_txes, const std::function<const tools::wallet2::tx_construction_data&(size_t)> &get_tx, const std::string &extra_message)
@@ -10808,8 +10813,8 @@ 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=<filename>|--generate-new-wallet=<filename>] [<COMMAND>]",
- 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."),
+ "monzero-wallet-cli [--wallet-file=<filename>|--generate-new-wallet=<filename>] [<COMMAND>]",
+ sw::tr("This is the command line Monzero wallet. It needs to connect to a Monzero\ndaemon to work correctly.\nWARNING: Do not reuse your Monzero 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; },
@@ -11000,7 +11005,7 @@ void simple_wallet::list_mms_messages(const std::vector<mms::message> &messages)
void simple_wallet::list_signers(const std::vector<mms::authorized_signer> &signers)
{
message_writer() << boost::format("%2s %-20s %-s") % tr("#") % tr("Label") % tr("Transport Address");
- message_writer() << boost::format("%2s %-20s %-s") % "" % tr("Auto-Config Token") % tr("Monero Address");
+ message_writer() << boost::format("%2s %-20s %-s") % "" % tr("Auto-Config Token") % tr("Monzero Address");
for (size_t i = 0; i < signers.size(); ++i)
{
const mms::authorized_signer &signer = signers[i];
@@ -11225,14 +11230,14 @@ void simple_wallet::mms_signer(const std::vector<std::string> &args)
bool ok = cryptonote::get_account_address_from_str_or_url(info, m_wallet->nettype(), args[3], oa_prompter);
if (!ok)
{
- fail_msg_writer() << tr("Invalid Monero address");
+ fail_msg_writer() << tr("Invalid Monzero address");
return;
}
monero_address = info.address;
const std::vector<mms::message> &messages = ms.get_all_messages();
if ((messages.size() > 0) || state.multisig)
{
- fail_msg_writer() << tr("Wallet state does not allow changing Monero addresses anymore");
+ fail_msg_writer() << tr("Wallet state does not allow changing Monzero addresses anymore");
return;
}
}
diff --git a/src/version.cpp.in b/src/version.cpp.in
index 5e0807de2..8316422b5 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.18.5.1"
-#define DEF_MONERO_RELEASE_NAME "Fluorine Fermi"
+#define DEF_MONERO_RELEASE_NAME "Genesis"
#define DEF_MONERO_VERSION_FULL DEF_MONERO_VERSION "-" DEF_MONERO_VERSION_TAG
#define DEF_MONERO_VERSION_IS_RELEASE @VERSION_IS_RELEASE@
diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt
index 6095f99d5..4246ac3ed 100644
--- a/src/wallet/CMakeLists.txt
+++ b/src/wallet/CMakeLists.txt
@@ -100,7 +100,7 @@ if(NOT IOS)
${EXTRA_LIBRARIES})
set_property(TARGET wallet_rpc_server
PROPERTY
- OUTPUT_NAME "monero-wallet-rpc")
+ OUTPUT_NAME "monzero-wallet-rpc")
install(TARGETS wallet_rpc_server DESTINATION bin)
endif()
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 4c83dd890..253aa3a38 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2226,8 +2226,8 @@ void wallet2::scan_output(const cryptonote::transaction &tx, bool miner_tx, cons
if (!m_encrypt_keys_after_refresh && !m_processing_background_cache)
{
boost::optional<epee::wipeable_string> pwd = m_callback->on_get_password(pool ? "output found in pool" : "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 Monzero"));
+ THROW_WALLET_EXCEPTION_IF(!verify_password(*pwd), error::password_needed, tr("Invalid password: password is needed to compute key image for incoming Monzero"));
m_encrypt_keys_after_refresh.reset(new wallet_keys_unlocker(*this, m_ask_password == AskPasswordToDecrypt && !m_unattended && !m_watch_only, *pwd));
}
}
@@ -15920,7 +15920,7 @@ mms::multisig_wallet_state wallet2::get_multisig_wallet_state() const
state.num_transfer_details = m_transfers.size();
if (state.multisig)
{
- THROW_WALLET_EXCEPTION_IF(!m_original_keys_available, error::wallet_internal_error, "MMS use not possible because own original Monero address not available");
+ THROW_WALLET_EXCEPTION_IF(!m_original_keys_available, error::wallet_internal_error, "MMS use not possible because own original Monzero address not available");
state.address = m_original_address;
state.view_secret_key = m_original_view_secret_key;
}
diff --git a/src/wallet/wallet_args.cpp b/src/wallet/wallet_args.cpp
index ce13fc573..f5863ef0f 100644
--- a/src/wallet/wallet_args.cpp
+++ b/src/wallet/wallet_args.cpp
@@ -148,8 +148,8 @@ 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) << wallet_args::tr("This is the command line monero wallet. It needs to connect to a monero\n"
+ Print(print) << "Monzero '" << MONERO_RELEASE_NAME << "' (core v" << MONERO_VERSION_FULL << ")" << ENDL;
+ Print(print) << wallet_args::tr("This is the command line Monzero wallet. It needs to connect to a Monzero\n"
"daemon to work correctly.") << ENDL;
Print(print) << wallet_args::tr("Usage:") << ENDL << " " << usage;
Print(print) << desc_all;
@@ -158,7 +158,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) << "Monzero '" << MONERO_RELEASE_NAME << "' (core v" << MONERO_VERSION_FULL << ")";
should_terminate = true;
return true;
}
@@ -209,7 +209,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) << "Monzero '" << MONERO_RELEASE_NAME << "' (core 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 6a3e92b0b..68b28652e 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -69,7 +69,7 @@ using namespace epee;
if (m_wallet->multisig() && !m_wallet->is_multisig_enabled()) \
{ \
er.code = WALLET_RPC_ERROR_CODE_DISABLED; \
- er.message = "This wallet is multisig, and multisig is disabled. Multisig is an experimental feature and may have bugs. Things that could go wrong include: funds sent to a multisig wallet can't be spent at all, can only be spent with the participation of a malicious group member, or can be stolen by a malicious group member. You can enable it by running this once in monero-wallet-cli: set enable-multisig-experimental 1"; \
+ er.message = "This wallet is multisig, and multisig is disabled. Multisig is an experimental feature and may have bugs. Things that could go wrong include: funds sent to a multisig wallet can't be spent at all, can only be spent with the participation of a malicious group member, or can be stolen by a malicious group member. You can enable it by running this once in monzero-wallet-cli: set enable-multisig-experimental 1"; \
return false; \
} \
} while(0)
@@ -431,7 +431,7 @@ namespace tools
tools::wallet2::BackgroundMiningSetupType setup = m_wallet->setup_background_mining();
if (setup == tools::wallet2::BackgroundMiningNo)
{
- MLOG_RED(el::Level::Warning, "Background mining not enabled. Run \"set setup-background-mining 1\" in monero-wallet-cli to change.");
+ MLOG_RED(el::Level::Warning, "Background mining not enabled. Run \"set setup-background-mining 1\" in monzero-wallet-cli to change.");
return;
}
@@ -456,8 +456,8 @@ namespace tools
{
MINFO("The daemon is not set up to background mine.");
MINFO("With background mining enabled, the daemon will mine when idle and not on battery.");
- MINFO("Enabling this supports the network you are using, and makes you eligible for receiving new monero");
- MINFO("Set setup-background-mining to 1 in monero-wallet-cli to change.");
+ MINFO("Enabling this supports the network you are using, and makes you eligible for receiving new XMZ");
+ MINFO("Set setup-background-mining to 1 in monzero-wallet-cli to change.");
return;
}
@@ -1055,7 +1055,7 @@ namespace tools
}
if (addresses.empty())
{
- er.message = std::string("No Monero address found at ") + url;
+ er.message = std::string("No Monzero address found at ") + url;
return {};
}
return addresses[0];
@@ -2468,7 +2468,7 @@ namespace tools
}
if (addresses.empty())
{
- er.message = std::string("No Monero address found at ") + url;
+ er.message = std::string("No Monzero address found at ") + url;
return {};
}
return addresses[0];
@@ -3275,7 +3275,7 @@ namespace tools
}
if (addresses.empty())
{
- er.message = std::string("No Monero address found at ") + url;
+ er.message = std::string("No Monzero address found at ") + url;
return {};
}
return addresses[0];
@@ -3323,7 +3323,7 @@ namespace tools
}
if (addresses.empty())
{
- er.message = std::string("No Monero address found at ") + url;
+ er.message = std::string("No Monzero address found at ") + url;
return {};
}
return addresses[0];
@@ -4655,7 +4655,7 @@ namespace tools
}
if (addresses.empty())
{
- er.message = std::string("No Monero address found at ") + url;
+ er.message = std::string("No Monzero address found at ") + url;
return {};
}
address = addresses[0];
@@ -5080,8 +5080,8 @@ 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=<file>|--generate-from-json=<file>|--wallet-dir=<directory>] [--rpc-bind-port=<port>]",
- tools::wallet_rpc_server::tr("This is the RPC monero wallet. It needs to connect to a monero\ndaemon to work correctly."),
+ "monzero-wallet-rpc [--wallet-file=<file>|--generate-from-json=<file>|--wallet-dir=<directory>] [--rpc-bind-port=<port>]",
+ tools::wallet_rpc_server::tr("This is the RPC Monzero wallet. It needs to connect to a Monzero\ndaemon to work correctly."),
desc_params,
po::positional_options_description(),
[](const std::string &s, bool emphasis){ tools::scoped_message_writer(emphasis ? epee::console_color_white : epee::console_color_default, true) << s; },