executable names changed

This commit is contained in:
Sean Darcy 2021-01-04 14:19:42 +11:00 committed by Jason Rhinelander
parent cbc5fa917c
commit ccd712542d
126 changed files with 667 additions and 667 deletions

View File

@ -50,17 +50,17 @@ message(STATUS "CMake version ${CMAKE_VERSION}")
# Has to be set before `project()`, and ignored on non-macos: # Has to be set before `project()`, and ignored on non-macos:
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "macOS deployment target (Apple clang only)") set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "macOS deployment target (Apple clang only)")
project(loki project(oxen
VERSION 8.1.4 VERSION 8.1.4
LANGUAGES CXX C) LANGUAGES CXX C)
set(LOKI_RELEASE_CODENAME "Salty Saga") set(OXEN_RELEASE_CODENAME "Salty Saga")
# String value to append to the full version string; this is intended to easily identify whether a # String value to append to the full version string; this is intended to easily identify whether a
# binary was build from the release or development branches. This should be permanently set to an # binary was build from the release or development branches. This should be permanently set to an
# empty string on `stable`, "-dev" on the `dev` branch, and can be set externally (via cmake # empty string on `stable`, "-dev" on the `dev` branch, and can be set externally (via cmake
# arguments) where it makes sense to take some other branch release with an extra value. # arguments) where it makes sense to take some other branch release with an extra value.
if(NOT DEFINED LOKI_RELEASE_SUFFIX) if(NOT DEFINED OXEN_RELEASE_SUFFIX)
set(LOKI_RELEASE_SUFFIX "") set(OXEN_RELEASE_SUFFIX "")
endif() endif()
if(POLICY CMP0079) if(POLICY CMP0079)
@ -857,7 +857,7 @@ if (WIN32)
endif() endif()
if (BUILD_INTEGRATION) if (BUILD_INTEGRATION)
target_compile_definitions(extra INTERFACE LOKI_ENABLE_INTEGRATION_TEST_HOOKS) target_compile_definitions(extra INTERFACE OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
else() else()
option(USE_READLINE "Build with GNU readline support." ON) option(USE_READLINE "Build with GNU readline support." ON)
if(USE_READLINE AND BUILD_STATIC_DEPS) if(USE_READLINE AND BUILD_STATIC_DEPS)
@ -894,8 +894,8 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AN
endif() endif()
endif() endif()
option(LOKI_DEBUG_SHORT_PROOFS "Developer option to substantially reduce uptime proof intervals for local test network debugging (the result lokid will not be usable on the live networks)" OFF) option(OXEN_DEBUG_SHORT_PROOFS "Developer option to substantially reduce uptime proof intervals for local test network debugging (the result oxend will not be usable on the live networks)" OFF)
if (LOKI_DEBUG_SHORT_PROOFS) if (OXEN_DEBUG_SHORT_PROOFS)
add_definitions(-DUPTIME_PROOF_BASE_MINUTE=3) # 20x faster uptime proofs add_definitions(-DUPTIME_PROOF_BASE_MINUTE=3) # 20x faster uptime proofs
endif() endif()
@ -958,11 +958,11 @@ endif()
# Set up a `make strip_binaries` target that strips built binaries. This depends on all # Set up a `make strip_binaries` target that strips built binaries. This depends on all
# default-built binaries and strips them after build. (To also build and strip debug utilities # default-built binaries and strips them after build. (To also build and strip debug utilities
# there is also a `make strip_binaries_all` target.) # there is also a `make strip_binaries_all` target.)
get_property(loki_exec_tgts_all GLOBAL PROPERTY loki_executable_targets) get_property(oxen_exec_tgts_all GLOBAL PROPERTY oxen_executable_targets)
set(loki_exec_tgts "") set(oxen_exec_tgts "")
set(strip_binaries "") set(strip_binaries "")
set(strip_binaries_all "") set(strip_binaries_all "")
foreach(tgt ${loki_exec_tgts_all}) foreach(tgt ${oxen_exec_tgts_all})
list(APPEND strip_binaries_all COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${tgt}>) list(APPEND strip_binaries_all COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${tgt}>)
# Look for a EXCLUDE_FROM_ALL property: # Look for a EXCLUDE_FROM_ALL property:
get_property(tgt_excl_all TARGET ${tgt} PROPERTY EXCLUDE_FROM_ALL) get_property(tgt_excl_all TARGET ${tgt} PROPERTY EXCLUDE_FROM_ALL)
@ -971,12 +971,12 @@ foreach(tgt ${loki_exec_tgts_all})
get_property(tgt_dir TARGET ${tgt} PROPERTY SOURCE_DIR) get_property(tgt_dir TARGET ${tgt} PROPERTY SOURCE_DIR)
get_property(tgt_dir_excl_all DIRECTORY ${tgt_dir} PROPERTY EXCLUDE_FROM_ALL) get_property(tgt_dir_excl_all DIRECTORY ${tgt_dir} PROPERTY EXCLUDE_FROM_ALL)
if (NOT tgt_excl_all AND NOT tgt_dir_excl_all) if (NOT tgt_excl_all AND NOT tgt_dir_excl_all)
list(APPEND loki_exec_tgts ${tgt}) list(APPEND oxen_exec_tgts ${tgt})
list(APPEND strip_binaries COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${tgt}>) list(APPEND strip_binaries COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${tgt}>)
endif() endif()
endforeach() endforeach()
add_custom_target(strip_binaries ${strip_binaries} DEPENDS ${loki_exec_tgts}) add_custom_target(strip_binaries ${strip_binaries} DEPENDS ${oxen_exec_tgts})
add_custom_target(strip_binaries_all ${strip_binaries_all} DEPENDS ${loki_exec_tgts_all}) add_custom_target(strip_binaries_all ${strip_binaries_all} DEPENDS ${oxen_exec_tgts_all})
execute_process(COMMAND tar --version RESULT_VARIABLE tar_exit_code OUTPUT_VARIABLE tar_vers) execute_process(COMMAND tar --version RESULT_VARIABLE tar_exit_code OUTPUT_VARIABLE tar_vers)
set(git_tag "-unknown") set(git_tag "-unknown")
@ -1017,17 +1017,17 @@ elseif(tar_os STREQUAL "Windows")
endif() endif()
set(default_archive create_zip) # .tar.xz files are too scary for Windows users set(default_archive create_zip) # .tar.xz files are too scary for Windows users
endif() endif()
set(tar_dir "loki-${tar_os}-${PROJECT_VERSION}${LOKI_RELEASE_SUFFIX}${git_tag}") set(tar_dir "oxen-${tar_os}-${PROJECT_VERSION}${OXEN_RELEASE_SUFFIX}${git_tag}")
add_custom_target(create_tarxz add_custom_target(create_tarxz
COMMAND ${CMAKE_COMMAND} -E rename bin "${tar_dir}" COMMAND ${CMAKE_COMMAND} -E rename bin "${tar_dir}"
COMMAND ${CMAKE_COMMAND} -E tar cvJ "${tar_dir}.tar.xz" -- "${tar_dir}" COMMAND ${CMAKE_COMMAND} -E tar cvJ "${tar_dir}.tar.xz" -- "${tar_dir}"
COMMAND ${CMAKE_COMMAND} -E rename "${tar_dir}" bin COMMAND ${CMAKE_COMMAND} -E rename "${tar_dir}" bin
DEPENDS ${loki_exec_tgts}) DEPENDS ${oxen_exec_tgts})
add_custom_target(create_zip add_custom_target(create_zip
COMMAND ${CMAKE_COMMAND} -E rename bin "${tar_dir}" COMMAND ${CMAKE_COMMAND} -E rename bin "${tar_dir}"
COMMAND ${CMAKE_COMMAND} -E tar cv "${tar_dir}.zip" --format=zip -- "${tar_dir}" COMMAND ${CMAKE_COMMAND} -E tar cv "${tar_dir}.zip" --format=zip -- "${tar_dir}"
COMMAND ${CMAKE_COMMAND} -E rename "${tar_dir}" bin COMMAND ${CMAKE_COMMAND} -E rename "${tar_dir}" bin
DEPENDS ${loki_exec_tgts}) DEPENDS ${oxen_exec_tgts})
add_custom_target(create_archive DEPENDS ${default_archive}) add_custom_target(create_archive DEPENDS ${default_archive})

View File

@ -44,8 +44,8 @@ function (enable_stack_trace target)
endif() endif()
endfunction() endfunction()
set_property(GLOBAL PROPERTY loki_executable_targets "") set_property(GLOBAL PROPERTY oxen_executable_targets "")
function (loki_add_executable target binary) function (oxen_add_executable target binary)
add_executable("${target}" ${ARGN}) add_executable("${target}" ${ARGN})
target_link_libraries("${target}" PRIVATE extra) target_link_libraries("${target}" PRIVATE extra)
enable_stack_trace("${target}") enable_stack_trace("${target}")
@ -53,9 +53,9 @@ function (loki_add_executable target binary)
OUTPUT_NAME "${binary}" OUTPUT_NAME "${binary}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
install(TARGETS "${target}" DESTINATION bin) install(TARGETS "${target}" DESTINATION bin)
get_property(exec_tgt GLOBAL PROPERTY loki_executable_targets) get_property(exec_tgt GLOBAL PROPERTY oxen_executable_targets)
list(APPEND exec_tgt "${target}") list(APPEND exec_tgt "${target}")
set_property(GLOBAL PROPERTY loki_executable_targets "${exec_tgt}") set_property(GLOBAL PROPERTY oxen_executable_targets "${exec_tgt}")
endfunction () endfunction ()
include(Version) include(Version)

View File

@ -38,8 +38,8 @@
#include "lmdb/db_lmdb.h" #include "lmdb/db_lmdb.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "blockchain.db" #define OXEN_DEFAULT_LOG_CATEGORY "blockchain.db"
namespace cryptonote namespace cryptonote
{ {

View File

@ -48,8 +48,8 @@
#include "cryptonote_core/service_node_list.h" #include "cryptonote_core/service_node_list.h"
#include "cryptonote_basic/hardfork.h" #include "cryptonote_basic/hardfork.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "blockchain.db.lmdb" #define OXEN_DEFAULT_LOG_CATEGORY "blockchain.db.lmdb"
using namespace crypto; using namespace crypto;

View File

@ -37,7 +37,7 @@ target_link_libraries(blockchain_tools_common_libs INTERFACE
extra) extra)
loki_add_executable(blockchain_import "loki-blockchain-import" oxen_add_executable(blockchain_import "oxen-blockchain-import"
blockchain_import.cpp blockchain_import.cpp
bootstrap_file.cpp bootstrap_file.cpp
blocksdat_file.cpp blocksdat_file.cpp
@ -51,7 +51,7 @@ if(ARCH_WIDTH)
target_compile_definitions(blockchain_import PRIVATE ARCH_WIDTH=${ARCH_WIDTH}) target_compile_definitions(blockchain_import PRIVATE ARCH_WIDTH=${ARCH_WIDTH})
endif() endif()
loki_add_executable(blockchain_export "loki-blockchain-export" oxen_add_executable(blockchain_export "oxen-blockchain-export"
blockchain_export.cpp blockchain_export.cpp
bootstrap_file.cpp bootstrap_file.cpp
blocksdat_file.cpp blocksdat_file.cpp
@ -59,7 +59,7 @@ loki_add_executable(blockchain_export "loki-blockchain-export"
target_link_libraries(blockchain_export PRIVATE blockchain_tools_common_libs) target_link_libraries(blockchain_export PRIVATE blockchain_tools_common_libs)
loki_add_executable(blockchain_blackball "loki-blockchain-mark-spent-outputs" oxen_add_executable(blockchain_blackball "oxen-blockchain-mark-spent-outputs"
blockchain_blackball.cpp blockchain_blackball.cpp
) )
@ -69,28 +69,28 @@ target_link_libraries(blockchain_blackball
wallet) wallet)
loki_add_executable(blockchain_usage "loki-blockchain-usage" oxen_add_executable(blockchain_usage "oxen-blockchain-usage"
blockchain_usage.cpp blockchain_usage.cpp
) )
target_link_libraries(blockchain_usage PRIVATE blockchain_tools_common_libs) target_link_libraries(blockchain_usage PRIVATE blockchain_tools_common_libs)
loki_add_executable(blockchain_ancestry "loki-blockchain-ancestry" oxen_add_executable(blockchain_ancestry "oxen-blockchain-ancestry"
blockchain_ancestry.cpp blockchain_ancestry.cpp
) )
target_link_libraries(blockchain_ancestry PRIVATE blockchain_tools_common_libs) target_link_libraries(blockchain_ancestry PRIVATE blockchain_tools_common_libs)
loki_add_executable(blockchain_depth "loki-blockchain-depth" oxen_add_executable(blockchain_depth "oxen-blockchain-depth"
blockchain_depth.cpp blockchain_depth.cpp
) )
target_link_libraries(blockchain_depth PRIVATE blockchain_tools_common_libs) target_link_libraries(blockchain_depth PRIVATE blockchain_tools_common_libs)
loki_add_executable(blockchain_stats "loki-blockchain-stats" oxen_add_executable(blockchain_stats "oxen-blockchain-stats"
blockchain_stats.cpp blockchain_stats.cpp
) )
target_link_libraries(blockchain_stats PRIVATE blockchain_tools_common_libs) target_link_libraries(blockchain_stats PRIVATE blockchain_tools_common_libs)
# TODO(loki): Blockchain pruning not supported in Loki yet # TODO(oxen): Blockchain pruning not supported in Oxen yet
# loki_add_executable(blockchain_prune_known_spent_data "loki-blockchain-prune-known-spent-data" # oxen_add_executable(blockchain_prune_known_spent_data "oxen-blockchain-prune-known-spent-data"
# blockchain_prune_known_spent_data.cpp # blockchain_prune_known_spent_data.cpp
# ) # )
# #
@ -99,7 +99,7 @@ target_link_libraries(blockchain_stats PRIVATE blockchain_tools_common_libs)
# blockchain_tools_common_libs # blockchain_tools_common_libs
# p2p) # p2p)
# #
# loki_add_executable(blockchain_prune "loki-blockchain-prune" # oxen_add_executable(blockchain_prune "oxen-blockchain-prune"
# blockchain_prune.cpp # blockchain_prune.cpp
# ) # )
# #
@ -109,8 +109,8 @@ target_link_libraries(blockchain_stats PRIVATE blockchain_tools_common_libs)
# p2p) # p2p)
if (TARGET sodium_vendor OR NOT SODIUM_VERSION VERSION_LESS 1.0.17) if (TARGET sodium_vendor OR NOT SODIUM_VERSION VERSION_LESS 1.0.17)
loki_add_executable(sn_key_tool "loki-sn-keys" sn_key_tool.cpp) oxen_add_executable(sn_key_tool "oxen-sn-keys" sn_key_tool.cpp)
target_link_libraries(sn_key_tool PRIVATE sodium lokimq filesystem) target_link_libraries(sn_key_tool PRIVATE sodium lokimq filesystem)
else() else()
message(STATUS "Not building loki-sn-keys tool (requires libsodium >= 1.0.17)") message(STATUS "Not building oxen-sn-keys tool (requires libsodium >= 1.0.17)")
endif() endif()

View File

@ -1,4 +1,4 @@
# Loki Blockchain Utilities # Oxen Blockchain Utilities
Copyright (c) 2014-2019, The Monero Project Copyright (c) 2014-2019, The Monero Project
Copyright (c) 2018, The Loki Project Copyright (c) 2018, The Loki Project
@ -15,13 +15,13 @@ See also each utility's "--help" option.
`$ oxen-blockchain-export` `$ oxen-blockchain-export`
This loads the existing blockchain and exports it to `$LOKI_DATA_DIR/export/blockchain.raw` This loads the existing blockchain and exports it to `$OXEN_DATA_DIR/export/blockchain.raw`
### Import the exported file ### Import the exported file
`$ oxen-blockchain-import` `$ oxen-blockchain-import`
This imports blocks from `$LOKI_DATA_DIR/export/blockchain.raw` (exported using the This imports blocks from `$OXEN_DATA_DIR/export/blockchain.raw` (exported using the
`oxen-blockchain-export` tool as described above) into the current database. `oxen-blockchain-export` tool as described above) into the current database.
Defaults: `--batch on`, `--batch size 20000`, `--verify on` Defaults: `--batch on`, `--batch size 20000`, `--verify on`

View File

@ -46,8 +46,8 @@
#include "blockchain_db/blockchain_db.h" #include "blockchain_db/blockchain_db.h"
#include "version.h" #include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options; namespace po = boost::program_options;
using namespace cryptonote; using namespace cryptonote;
@ -383,7 +383,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }

View File

@ -46,8 +46,8 @@
#include "wallet/ringdb.h" #include "wallet/ringdb.h"
#include "version.h" #include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options; namespace po = boost::program_options;
using namespace cryptonote; using namespace cryptonote;
@ -248,7 +248,7 @@ static void init(fs::path cache_filename)
dbr = mdb_txn_begin(env, NULL, 0, &txn); dbr = mdb_txn_begin(env, NULL, 0, &txn);
CHECK_AND_ASSERT_THROW_MES(!dbr, "Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr))); CHECK_AND_ASSERT_THROW_MES(!dbr, "Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr)));
LOKI_DEFER { if (tx_active) mdb_txn_abort(txn); }; OXEN_DEFER { if (tx_active) mdb_txn_abort(txn); };
tx_active = true; tx_active = true;
dbr = mdb_dbi_open(txn, "relative_rings", MDB_CREATE | MDB_INTEGERKEY, &dbi_relative_rings); dbr = mdb_dbi_open(txn, "relative_rings", MDB_CREATE | MDB_INTEGERKEY, &dbi_relative_rings);
@ -351,7 +351,7 @@ static bool for_all_transactions(const fs::path& filename, uint64_t& start_idx,
dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn); dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
if (dbr) throw std::runtime_error("Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr))); if (dbr) throw std::runtime_error("Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr)));
LOKI_DEFER { if (tx_active) mdb_txn_abort(txn); }; OXEN_DEFER { if (tx_active) mdb_txn_abort(txn); };
tx_active = true; tx_active = true;
dbr = mdb_dbi_open(txn, "txs_pruned", MDB_INTEGERKEY, &dbi); dbr = mdb_dbi_open(txn, "txs_pruned", MDB_INTEGERKEY, &dbi);
@ -431,7 +431,7 @@ static bool for_all_transactions(const fs::path& filename, const uint64_t& start
dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn); dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
if (dbr) throw std::runtime_error("Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr))); if (dbr) throw std::runtime_error("Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr)));
LOKI_DEFER { if (tx_active) mdb_txn_abort(txn); }; OXEN_DEFER { if (tx_active) mdb_txn_abort(txn); };
tx_active = true; tx_active = true;
dbr = mdb_dbi_open(txn, "blocks", MDB_INTEGERKEY, &dbi_blocks); dbr = mdb_dbi_open(txn, "blocks", MDB_INTEGERKEY, &dbi_blocks);
@ -530,7 +530,7 @@ static uint64_t find_first_diverging_transaction(const fs::path& first_filename,
MDB_val k; MDB_val k;
MDB_val v[2]; MDB_val v[2];
LOKI_DEFER { OXEN_DEFER {
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
if (tx_active[i]) mdb_txn_abort(txn[i]); if (tx_active[i]) mdb_txn_abort(txn[i]);
}; };
@ -617,7 +617,7 @@ static uint64_t get_num_spent_outputs()
int dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn); int dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
CHECK_AND_ASSERT_THROW_MES(!dbr, "Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr))); CHECK_AND_ASSERT_THROW_MES(!dbr, "Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr)));
LOKI_DEFER { if (tx_active) mdb_txn_abort(txn); }; OXEN_DEFER { if (tx_active) mdb_txn_abort(txn); };
tx_active = true; tx_active = true;
MDB_cursor *cur; MDB_cursor *cur;
@ -753,7 +753,7 @@ static uint64_t get_processed_txidx(const std::string &name)
int dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn); int dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
CHECK_AND_ASSERT_THROW_MES(!dbr, "Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr))); CHECK_AND_ASSERT_THROW_MES(!dbr, "Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr)));
LOKI_DEFER { if (tx_active) mdb_txn_abort(txn); }; OXEN_DEFER { if (tx_active) mdb_txn_abort(txn); };
tx_active = true; tx_active = true;
uint64_t height = 0; uint64_t height = 0;
@ -1029,7 +1029,7 @@ static crypto::hash get_genesis_block_hash(const fs::path& filename)
dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn); dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
if (dbr) throw std::runtime_error("Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr))); if (dbr) throw std::runtime_error("Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr)));
LOKI_DEFER { if (tx_active) mdb_txn_abort(txn); }; OXEN_DEFER { if (tx_active) mdb_txn_abort(txn); };
tx_active = true; tx_active = true;
dbr = mdb_dbi_open(txn, "block_info", MDB_INTEGERKEY | MDB_DUPSORT | MDB_DUPFIXED, &dbi); dbr = mdb_dbi_open(txn, "block_info", MDB_INTEGERKEY | MDB_DUPSORT | MDB_DUPFIXED, &dbi);
@ -1191,7 +1191,7 @@ int main(int argc, char* argv[])
const command_line::arg_descriptor<bool> arg_rct_only = {"rct-only", "Only work on ringCT outputs", false}; const command_line::arg_descriptor<bool> arg_rct_only = {"rct-only", "Only work on ringCT outputs", false};
const command_line::arg_descriptor<bool> arg_check_subsets = {"check-subsets", "Check ring subsets (very expensive)", false}; const command_line::arg_descriptor<bool> arg_check_subsets = {"check-subsets", "Check ring subsets (very expensive)", false};
const command_line::arg_descriptor<bool> arg_verbose = {"verbose", "Verbose output)", false}; const command_line::arg_descriptor<bool> arg_verbose = {"verbose", "Verbose output)", false};
const command_line::arg_descriptor<std::vector<std::string> > arg_inputs = {"inputs", "Path to Loki DB, and path to any fork DBs"}; const command_line::arg_descriptor<std::vector<std::string> > arg_inputs = {"inputs", "Path to Oxen DB, and path to any fork DBs"};
const command_line::arg_descriptor<std::string> arg_db_sync_mode = { const command_line::arg_descriptor<std::string> arg_db_sync_mode = {
"db-sync-mode" "db-sync-mode"
, "Specify sync option, using format [safe|fast|fastest]:[nrecords_per_sync]." , "Specify sync option, using format [safe|fast|fastest]:[nrecords_per_sync]."
@ -1234,7 +1234,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }

View File

@ -33,8 +33,8 @@
#include "blockchain_db/blockchain_db.h" #include "blockchain_db/blockchain_db.h"
#include "version.h" #include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options; namespace po = boost::program_options;
using namespace cryptonote; using namespace cryptonote;
@ -83,7 +83,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }

View File

@ -34,8 +34,8 @@
#include "blockchain_objects.h" #include "blockchain_objects.h"
#include "version.h" #include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options; namespace po = boost::program_options;
@ -86,7 +86,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }

View File

@ -44,8 +44,8 @@
#include "cryptonote_core/cryptonote_core.h" #include "cryptonote_core/cryptonote_core.h"
#include "common/hex.h" #include "common/hex.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace namespace
{ {
@ -603,7 +603,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }

View File

@ -39,8 +39,8 @@
#include "blockchain_objects.h" #include "blockchain_objects.h"
#include "version.h" #include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
#define MDB_val_set(var, val) MDB_val var = {sizeof(val), (void *)&val} #define MDB_val_set(var, val) MDB_val var = {sizeof(val), (void *)&val}
@ -156,7 +156,7 @@ static void copy_table(MDB_env *env0, MDB_env *env1, const char *table, unsigned
MINFO("Copying " << table); MINFO("Copying " << table);
LOKI_DEFER { OXEN_DEFER {
if (tx_active1) mdb_txn_abort(txn1); if (tx_active1) mdb_txn_abort(txn1);
if (tx_active0) mdb_txn_abort(txn0); if (tx_active0) mdb_txn_abort(txn0);
}; };
@ -253,7 +253,7 @@ static void prune(MDB_env *env0, MDB_env *env1)
MGINFO("Creating pruned txs_prunable"); MGINFO("Creating pruned txs_prunable");
LOKI_DEFER { OXEN_DEFER {
if (tx_active1) mdb_txn_abort(txn1); if (tx_active1) mdb_txn_abort(txn1);
if (tx_active0) mdb_txn_abort(txn0); if (tx_active0) mdb_txn_abort(txn0);
}; };
@ -479,7 +479,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }

View File

@ -37,8 +37,8 @@
#include "blockchain_db/blockchain_db.h" #include "blockchain_db/blockchain_db.h"
#include "version.h" #include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options; namespace po = boost::program_options;
using namespace cryptonote; using namespace cryptonote;
@ -145,7 +145,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }

View File

@ -37,8 +37,8 @@
#include "version.h" #include "version.h"
#include "epee/misc_os_dependent.h" #include "epee/misc_os_dependent.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options; namespace po = boost::program_options;
using namespace cryptonote; using namespace cryptonote;
@ -97,7 +97,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }
@ -160,7 +160,7 @@ int main(int argc, char* argv[])
/* /*
* The default output can be plotted with GnuPlot using these commands: * The default output can be plotted with GnuPlot using these commands:
set key autotitle columnhead set key autotitle columnhead
set title "Loki Blockchain Growth" set title "Oxen Blockchain Growth"
set timefmt "%Y-%m-%d" set timefmt "%Y-%m-%d"
set xdata time set xdata time
set xrange ["2014-04-17":*] set xrange ["2014-04-17":*]

View File

@ -34,8 +34,8 @@
#include "blockchain_db/blockchain_db.h" #include "blockchain_db/blockchain_db.h"
#include "version.h" #include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options; namespace po = boost::program_options;
using namespace cryptonote; using namespace cryptonote;
@ -116,7 +116,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }

View File

@ -29,8 +29,8 @@
#include "blocksdat_file.h" #include "blocksdat_file.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options; namespace po = boost::program_options;

View File

@ -32,8 +32,8 @@
#include "bootstrap_file.h" #include "bootstrap_file.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil" #define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options; namespace po = boost::program_options;
@ -42,7 +42,7 @@ using namespace cryptonote;
namespace namespace
{ {
// This number was picked by taking the leading 4 bytes from this output: // This number was picked by taking the leading 4 bytes from this output:
// echo Loki bootstrap file | sha1sum // echo Oxen bootstrap file | sha1sum
const uint32_t blockchain_raw_magic = 0x28721586; const uint32_t blockchain_raw_magic = 0x28721586;
const uint32_t header_size = 1024; const uint32_t header_size = 1024;

View File

@ -44,7 +44,7 @@ legacy [--overwrite] FILENAME
If FILENAME already exists the command will fail unless the `--overwrite` If FILENAME already exists the command will fail unless the `--overwrite`
flag is specified. flag is specified.
Note that legacy keypairs are not needed as of Loki 8.x; you can use just a Note that legacy keypairs are not needed as of Oxen 8.x; you can use just a
Ed25519 keypair (and this is the default for new service node Ed25519 keypair (and this is the default for new service node
installations). installations).
@ -158,7 +158,7 @@ int generate(bool ed25519, std::list<std::string_view> args) {
std::cout << std::cout <<
"Public key: " << lokimq::to_hex(pubkey.begin(), pubkey.end()) << "Public key: " << lokimq::to_hex(pubkey.begin(), pubkey.end()) <<
"\nX25519 pubkey: " << lokimq::to_hex(x_pubkey.begin(), x_pubkey.end()) << "\nX25519 pubkey: " << lokimq::to_hex(x_pubkey.begin(), x_pubkey.end()) <<
"\nLokinet address: " << lokimq::to_base32z(pubkey.begin(), pubkey.end()) << ".snode\n"; "\nOxennet address: " << lokimq::to_base32z(pubkey.begin(), pubkey.end()) << ".snode\n";
} else { } else {
std::cout << "Public key: " << lokimq::to_hex(pubkey.begin(), pubkey.end()) << "\n"; std::cout << "Public key: " << lokimq::to_hex(pubkey.begin(), pubkey.end()) << "\n";
} }
@ -243,7 +243,7 @@ int show(std::list<std::string_view> args) {
"\nSecret key: " << lokimq::to_hex(seckey.begin(), seckey.begin() + 32) << "\nSecret key: " << lokimq::to_hex(seckey.begin(), seckey.begin() + 32) <<
"\nPublic key: " << lokimq::to_hex(pubkey.begin(), pubkey.end()) << "\nPublic key: " << lokimq::to_hex(pubkey.begin(), pubkey.end()) <<
"\nX25519 pubkey: " << lokimq::to_hex(x_pubkey.begin(), x_pubkey.end()) << "\nX25519 pubkey: " << lokimq::to_hex(x_pubkey.begin(), x_pubkey.end()) <<
"\nLokinet address: " << lokimq::to_base32z(pubkey.begin(), pubkey.end()) << ".snode\n\n"; "\nOxennet address: " << lokimq::to_base32z(pubkey.begin(), pubkey.end()) << ".snode\n\n";
return 0; return 0;
} }
@ -300,7 +300,7 @@ int restore(bool ed25519, std::list<std::string_view> args) {
if (0 != crypto_sign_ed25519_pk_to_curve25519(x_pubkey.data(), pubkey.data())) if (0 != crypto_sign_ed25519_pk_to_curve25519(x_pubkey.data(), pubkey.data()))
return error(14, "Unable to convert Ed25519 pubkey to X25519 pubkey; is this a really valid secret key?"); return error(14, "Unable to convert Ed25519 pubkey to X25519 pubkey; is this a really valid secret key?");
std::cout << "X25519 pubkey: " << lokimq::to_hex(x_pubkey.begin(), x_pubkey.end()) << std::cout << "X25519 pubkey: " << lokimq::to_hex(x_pubkey.begin(), x_pubkey.end()) <<
"\nLokinet address: " << lokimq::to_base32z(pubkey.begin(), pubkey.end()) << ".snode"; "\nOxennet address: " << lokimq::to_base32z(pubkey.begin(), pubkey.end()) << ".snode";
} }
if (pubkey_expected) { if (pubkey_expected) {

View File

@ -44,8 +44,8 @@
#include "common/file.h" #include "common/file.h"
#include "common/hex.h" #include "common/hex.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "checkpoints" #define OXEN_DEFAULT_LOG_CATEGORY "checkpoints"
namespace cryptonote namespace cryptonote
{ {
@ -309,7 +309,7 @@ namespace cryptonote
if (db->is_read_only()) if (db->is_read_only())
return true; return true;
#if !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
if (nettype == MAINNET) if (nettype == MAINNET)
{ {
for (size_t i = 0; i < oxen::array_count(HARDCODED_MAINNET_CHECKPOINTS); ++i) for (size_t i = 0; i < oxen::array_count(HARDCODED_MAINNET_CHECKPOINTS); ++i)

View File

@ -41,8 +41,8 @@
#include "common/threadpool.h" #include "common/threadpool.h"
#include "crypto/crypto.h" #include "crypto/crypto.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "net.dns" #define OXEN_DEFAULT_LOG_CATEGORY "net.dns"
using namespace std::literals; using namespace std::literals;
static constexpr std::array DEFAULT_DNS_PUBLIC_ADDR = static constexpr std::array DEFAULT_DNS_PUBLIC_ADDR =

View File

@ -59,8 +59,8 @@
#include "cryptonote_config.h" #include "cryptonote_config.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "util" #define OXEN_DEFAULT_LOG_CATEGORY "util"
namespace tools { namespace tools {

View File

@ -38,8 +38,8 @@
#include <algorithm> #include <algorithm>
#include "file.h" #include "file.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "i18n" #define OXEN_DEFAULT_LOG_CATEGORY "i18n"
#define MAX_LANGUAGE_SIZE 16 #define MAX_LANGUAGE_SIZE 16

View File

@ -32,8 +32,8 @@
#include "spawn.h" #include "spawn.h"
#include "notify.h" #include "notify.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "notify" #define OXEN_DEFAULT_LOG_CATEGORY "notify"
namespace tools namespace tools
{ {

View File

@ -26,16 +26,16 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef LOKI_H #ifndef OXEN_H
#define LOKI_H #define OXEN_H
#define LOKI_HOUR(val) ((val) * LOKI_MINUTES(60)) #define OXEN_HOUR(val) ((val) * OXEN_MINUTES(60))
#define LOKI_MINUTES(val) val * 60 #define OXEN_MINUTES(val) val * 60
#include <cstddef> #include <cstddef>
#include <utility> #include <utility>
#define LOKI_RPC_DOC_INTROSPECT #define OXEN_RPC_DOC_INTROSPECT
namespace oxen namespace oxen
{ {
double round (double); double round (double);
@ -69,9 +69,9 @@ struct defer_helper
deferred<lambda_t> operator+(lambda_t lambda) { return lambda; } deferred<lambda_t> operator+(lambda_t lambda) { return lambda; }
}; };
#define LOKI_TOKEN_COMBINE2(x, y) x ## y #define OXEN_TOKEN_COMBINE2(x, y) x ## y
#define LOKI_TOKEN_COMBINE(x, y) LOKI_TOKEN_COMBINE2(x, y) #define OXEN_TOKEN_COMBINE(x, y) OXEN_TOKEN_COMBINE2(x, y)
#define LOKI_DEFER auto const LOKI_TOKEN_COMBINE(oxen_defer_, __LINE__) = oxen::defer_helper() + [&]() #define OXEN_DEFER auto const OXEN_TOKEN_COMBINE(oxen_defer_, __LINE__) = oxen::defer_helper() + [&]()
template <typename T, size_t N> template <typename T, size_t N>
constexpr size_t array_count(T (&)[N]) { return N; } constexpr size_t array_count(T (&)[N]) { return N; }
@ -79,6 +79,6 @@ constexpr size_t array_count(T (&)[N]) { return N; }
template <typename T, size_t N> template <typename T, size_t N>
constexpr size_t char_count(T (&)[N]) { return N - 1; } constexpr size_t char_count(T (&)[N]) { return N - 1; }
}; // namespace Loki }; // namespace Oxen
#endif // LOKI_H #endif // OXEN_H

View File

@ -115,7 +115,7 @@ namespace
#else // end WIN32 #else // end WIN32
#if !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
bool is_cin_tty() noexcept bool is_cin_tty() noexcept
{ {
return 0 != isatty(fileno(stdin)); return 0 != isatty(fileno(stdin));
@ -177,11 +177,11 @@ namespace
return true; return true;
} }
#endif // !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #endif // !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
#endif // end !WIN32 #endif // end !WIN32
#if !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
bool read_from_tty(const bool verify, const char *message, bool hide_input, epee::wipeable_string& pass1, epee::wipeable_string& pass2) bool read_from_tty(const bool verify, const char *message, bool hide_input, epee::wipeable_string& pass1, epee::wipeable_string& pass2)
{ {
while (true) while (true)
@ -233,7 +233,7 @@ namespace
} }
return true; return true;
} }
#endif // !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #endif // !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
} // anonymous namespace } // anonymous namespace
@ -250,7 +250,7 @@ namespace tools
std::optional<password_container> password_container::prompt(const bool verify, const char *message, bool hide_input) std::optional<password_container> password_container::prompt(const bool verify, const char *message, bool hide_input)
{ {
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
return password_container(std::string("")); return password_container(std::string(""));
#else #else
is_prompting = true; is_prompting = true;

View File

@ -31,8 +31,8 @@
#include "epee/misc_os_dependent.h" #include "epee/misc_os_dependent.h"
#include "perf_timer.h" #include "perf_timer.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "perf" #define OXEN_DEFAULT_LOG_CATEGORY "perf"
#define PERF_LOG_ALWAYS(level, cat, x) \ #define PERF_LOG_ALWAYS(level, cat, x) \
el::base::Writer(level, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::FileOnlyLog).construct(cat) << x el::base::Writer(level, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::FileOnlyLog).construct(cat) << x

View File

@ -72,11 +72,11 @@ private:
void set_performance_timer_log_level(el::Level level); void set_performance_timer_log_level(el::Level level);
#define PERF_TIMER_UNIT(name, unit) tools::LoggingPerformanceTimer pt_##name(#name, "perf." LOKI_DEFAULT_LOG_CATEGORY, unit, tools::performance_timer_log_level) #define PERF_TIMER_UNIT(name, unit) tools::LoggingPerformanceTimer pt_##name(#name, "perf." OXEN_DEFAULT_LOG_CATEGORY, unit, tools::performance_timer_log_level)
#define PERF_TIMER_UNIT_L(name, unit, l) tools::LoggingPerformanceTimer pt_##name(#name, "perf." LOKI_DEFAULT_LOG_CATEGORY, unit, l) #define PERF_TIMER_UNIT_L(name, unit, l) tools::LoggingPerformanceTimer pt_##name(#name, "perf." OXEN_DEFAULT_LOG_CATEGORY, unit, l)
#define PERF_TIMER(name) PERF_TIMER_UNIT(name, 1000000) #define PERF_TIMER(name) PERF_TIMER_UNIT(name, 1000000)
#define PERF_TIMER_L(name, l) PERF_TIMER_UNIT_L(name, 1000000, l) #define PERF_TIMER_L(name, l) PERF_TIMER_UNIT_L(name, 1000000, l)
#define PERF_TIMER_START_UNIT(name, unit) std::unique_ptr<tools::LoggingPerformanceTimer> pt_##name(new tools::LoggingPerformanceTimer(#name, "perf." LOKI_DEFAULT_LOG_CATEGORY, unit, el::Level::Info)) #define PERF_TIMER_START_UNIT(name, unit) std::unique_ptr<tools::LoggingPerformanceTimer> pt_##name(new tools::LoggingPerformanceTimer(#name, "perf." OXEN_DEFAULT_LOG_CATEGORY, unit, el::Level::Info))
#define PERF_TIMER_START(name) PERF_TIMER_START_UNIT(name, 1000000) #define PERF_TIMER_START(name) PERF_TIMER_START_UNIT(name, 1000000)
#define PERF_TIMER_STOP(name) do { pt_##name.reset(NULL); } while(0) #define PERF_TIMER_STOP(name) do { pt_##name.reset(NULL); } while(0)
#define PERF_TIMER_PAUSE(name) pt_##name->pause() #define PERF_TIMER_PAUSE(name) pt_##name->pause()

View File

@ -1,6 +1,6 @@
#include "scoped_message_writer.h" #include "scoped_message_writer.h"
#define LOKI_INTEGRATION_TEST_HOOKS_IMPLEMENTATION #define OXEN_INTEGRATION_TEST_HOOKS_IMPLEMENTATION
#include "common/oxen_integration_test_hooks.h" #include "common/oxen_integration_test_hooks.h"
// NOTE(oxen): This file only exists because I need a way to hook into the // NOTE(oxen): This file only exists because I need a way to hook into the
@ -16,7 +16,7 @@ tools::scoped_message_writer::~scoped_message_writer()
{ {
m_flush = false; m_flush = false;
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
std::cout << m_oss.str() << "\n"; std::cout << m_oss.str() << "\n";
return; return;
#endif #endif

View File

@ -60,7 +60,7 @@ public:
, m_bright(bright) , m_bright(bright)
, m_log_level(log_level) , m_log_level(log_level)
{ {
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
m_color = epee::console_color_default; // NOTE(oxen): No ANSI color codes in the output. Makes parsing harder. m_color = epee::console_color_default; // NOTE(oxen): No ANSI color codes in the output. Makes parsing harder.
#endif #endif
m_oss << prefix; m_oss << prefix;

View File

@ -42,8 +42,8 @@
#include "oxen.h" #include "oxen.h"
#include "string_util.h" #include "string_util.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "spawn" #define OXEN_DEFAULT_LOG_CATEGORY "spawn"
namespace tools namespace tools
{ {
@ -87,7 +87,7 @@ int spawn(const fs::path& filename, const std::vector<std::string>& args, bool w
return -1; return -1;
} }
LOKI_DEFER { OXEN_DEFER {
CloseHandle(pi.hThread); CloseHandle(pi.hThread);
CloseHandle(pi.hProcess); CloseHandle(pi.hProcess);
}; };

View File

@ -47,14 +47,14 @@
#include "common/stack_trace.h" #include "common/stack_trace.h"
#include "epee/misc_log_ex.h" #include "epee/misc_log_ex.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "stacktrace" #define OXEN_DEFAULT_LOG_CATEGORY "stacktrace"
#define ST_LOG(x) \ #define ST_LOG(x) \
do { \ do { \
auto elpp = ELPP; \ auto elpp = ELPP; \
if (elpp) { \ if (elpp) { \
CINFO(el::base::Writer,el::base::DispatchAction::FileOnlyLog,LOKI_DEFAULT_LOG_CATEGORY) << x; \ CINFO(el::base::Writer,el::base::DispatchAction::FileOnlyLog,OXEN_DEFAULT_LOG_CATEGORY) << x; \
} \ } \
else { \ else { \
std::cout << x << std::endl; \ std::cout << x << std::endl; \

View File

@ -53,8 +53,8 @@
#include <gnu/libc-version.h> #include <gnu/libc-version.h>
#endif #endif
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "util" #define OXEN_DEFAULT_LOG_CATEGORY "util"
namespace tools namespace tools
{ {

View File

@ -47,7 +47,7 @@
#if defined(HAS_INTEL_HW) || defined(HAS_ARM_HW) #if defined(HAS_INTEL_HW) || defined(HAS_ARM_HW)
inline bool force_software_aes() inline bool force_software_aes()
{ {
const char *env = getenv("LOKI_USE_SOFTWARE_AES"); const char *env = getenv("OXEN_USE_SOFTWARE_AES");
return env && strcmp(env, "0") && strcmp(env, "no"); return env && strcmp(env, "0") && strcmp(env, "no");
} }
#endif #endif
@ -103,7 +103,7 @@ public:
} }
// Disable copy/move ctors; copying, in particular, is going to be really inefficient and we // Disable copy/move ctors; copying, in particular, is going to be really inefficient and we
// don't need to move it anywhere in LOKI code anyway. // don't need to move it anywhere in OXEN code anyway.
cn_heavy_hash(const cn_heavy_hash& other) = delete; cn_heavy_hash(const cn_heavy_hash& other) = delete;
cn_heavy_hash(cn_heavy_hash&& other) = delete; cn_heavy_hash(cn_heavy_hash&& other) = delete;
cn_heavy_hash& operator= (const cn_heavy_hash& other) = delete; cn_heavy_hash& operator= (const cn_heavy_hash& other) = delete;

View File

@ -373,7 +373,7 @@ STATIC INLINE int force_software_aes(void)
if (use != -1) if (use != -1)
return use; return use;
const char *env = getenv("LOKI_USE_SOFTWARE_AES"); const char *env = getenv("OXEN_USE_SOFTWARE_AES");
if (!env) { if (!env) {
use = 0; use = 0;
} }

View File

@ -43,8 +43,8 @@ extern "C"
#include "cryptonote_config.h" #include "cryptonote_config.h"
#include "common/meta.h" #include "common/meta.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "account" #define OXEN_DEFAULT_LOG_CATEGORY "account"
using namespace std; using namespace std;

View File

@ -43,8 +43,8 @@
#include "common/oxen.h" #include "common/oxen.h"
#include <cfenv> #include <cfenv>
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "cn" #define OXEN_DEFAULT_LOG_CATEGORY "cn"
namespace cryptonote { namespace cryptonote {

View File

@ -50,8 +50,8 @@
#include "cryptonote_core/service_node_voting.h" #include "cryptonote_core/service_node_voting.h"
#include "cryptonote_core/oxen_name_system.h" #include "cryptonote_core/oxen_name_system.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "cn" #define OXEN_DEFAULT_LOG_CATEGORY "cn"
using namespace crypto; using namespace crypto;

View File

@ -37,8 +37,8 @@
#include "difficulty.h" #include "difficulty.h"
#include "hardfork.h" #include "hardfork.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "difficulty" #define OXEN_DEFAULT_LOG_CATEGORY "difficulty"
namespace cryptonote { namespace cryptonote {

View File

@ -35,8 +35,8 @@
#include "blockchain_db/blockchain_db.h" #include "blockchain_db/blockchain_db.h"
#include "hardfork.h" #include "hardfork.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "hardfork" #define OXEN_DEFAULT_LOG_CATEGORY "hardfork"
using namespace cryptonote; using namespace cryptonote;

View File

@ -43,8 +43,8 @@
#include "epee/string_tools.h" #include "epee/string_tools.h"
#include "epee/storages/portable_storage_template_helper.h" #include "epee/storages/portable_storage_template_helper.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "miner" #define OXEN_DEFAULT_LOG_CATEGORY "miner"
#define AUTODETECT_WINDOW 10 // seconds #define AUTODETECT_WINDOW 10 // seconds
#define AUTODETECT_GAIN_THRESHOLD 1.02f // 2% #define AUTODETECT_GAIN_THRESHOLD 1.02f // 2%

View File

@ -37,7 +37,7 @@
namespace cryptonote namespace cryptonote
{ {
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct subaddress_index struct subaddress_index
{ {
uint32_t major; // The account index, major index uint32_t major; // The account index, major index

View File

@ -62,7 +62,7 @@ constexpr uint8_t
TX_EXTRA_TAG_TX_KEY_IMAGE_UNLOCK = 0x77, TX_EXTRA_TAG_TX_KEY_IMAGE_UNLOCK = 0x77,
TX_EXTRA_TAG_SERVICE_NODE_STATE_CHANGE = 0x78, TX_EXTRA_TAG_SERVICE_NODE_STATE_CHANGE = 0x78,
TX_EXTRA_TAG_BURN = 0x79, TX_EXTRA_TAG_BURN = 0x79,
TX_EXTRA_TAG_LOKI_NAME_SYSTEM = 0x7A, TX_EXTRA_TAG_OXEN_NAME_SYSTEM = 0x7A,
TX_EXTRA_MYSTERIOUS_MINERGATE_TAG = 0xDE; TX_EXTRA_MYSTERIOUS_MINERGATE_TAG = 0xDE;
@ -573,4 +573,4 @@ BINARY_VARIANT_TAG(cryptonote::tx_extra_tx_secret_key, cryptonote:
BINARY_VARIANT_TAG(cryptonote::tx_extra_tx_key_image_proofs, cryptonote::TX_EXTRA_TAG_TX_KEY_IMAGE_PROOFS); BINARY_VARIANT_TAG(cryptonote::tx_extra_tx_key_image_proofs, cryptonote::TX_EXTRA_TAG_TX_KEY_IMAGE_PROOFS);
BINARY_VARIANT_TAG(cryptonote::tx_extra_tx_key_image_unlock, cryptonote::TX_EXTRA_TAG_TX_KEY_IMAGE_UNLOCK); BINARY_VARIANT_TAG(cryptonote::tx_extra_tx_key_image_unlock, cryptonote::TX_EXTRA_TAG_TX_KEY_IMAGE_UNLOCK);
BINARY_VARIANT_TAG(cryptonote::tx_extra_burn, cryptonote::TX_EXTRA_TAG_BURN); BINARY_VARIANT_TAG(cryptonote::tx_extra_burn, cryptonote::TX_EXTRA_TAG_BURN);
BINARY_VARIANT_TAG(cryptonote::tx_extra_oxen_name_system, cryptonote::TX_EXTRA_TAG_LOKI_NAME_SYSTEM); BINARY_VARIANT_TAG(cryptonote::tx_extra_oxen_name_system, cryptonote::TX_EXTRA_TAG_OXEN_NAME_SYSTEM);

View File

@ -73,7 +73,7 @@ static_assert(STAKING_PORTIONS % 12 == 0, "Use a multiple of twelve, so that it
#define UPTIME_PROOF_MAX_TIME_IN_SECONDS (UPTIME_PROOF_FREQUENCY_IN_SECONDS * 2 + UPTIME_PROOF_BUFFER_IN_SECONDS) // How long until proofs of other network service nodes are considered expired #define UPTIME_PROOF_MAX_TIME_IN_SECONDS (UPTIME_PROOF_FREQUENCY_IN_SECONDS * 2 + UPTIME_PROOF_BUFFER_IN_SECONDS) // How long until proofs of other network service nodes are considered expired
#define STORAGE_SERVER_PING_LIFETIME UPTIME_PROOF_FREQUENCY_IN_SECONDS #define STORAGE_SERVER_PING_LIFETIME UPTIME_PROOF_FREQUENCY_IN_SECONDS
#define LOKINET_PING_LIFETIME UPTIME_PROOF_FREQUENCY_IN_SECONDS #define OXENNET_PING_LIFETIME UPTIME_PROOF_FREQUENCY_IN_SECONDS
#define CRYPTONOTE_REWARD_BLOCKS_WINDOW 100 #define CRYPTONOTE_REWARD_BLOCKS_WINDOW 100
#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V1 20000 // NOTE(oxen): For testing suite, //size of block (bytes) after which reward for block calculated using block size - before first fork #define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V1 20000 // NOTE(oxen): For testing suite, //size of block (bytes) after which reward for block calculated using block size - before first fork
@ -83,10 +83,10 @@ static_assert(STAKING_PORTIONS % 12 == 0, "Use a multiple of twelve, so that it
#define CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE 600 #define CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE 600
#define CRYPTONOTE_DISPLAY_DECIMAL_POINT 9 #define CRYPTONOTE_DISPLAY_DECIMAL_POINT 9
#define FEE_PER_KB ((uint64_t)2000000000) // 2 LOKI (= 2 * pow(10, 9)) #define FEE_PER_KB ((uint64_t)2000000000) // 2 OXEN (= 2 * pow(10, 9))
#define FEE_PER_BYTE ((uint64_t)215) // Fallback used in wallet if no fee is available from RPC #define FEE_PER_BYTE ((uint64_t)215) // Fallback used in wallet if no fee is available from RPC
#define FEE_PER_BYTE_V12 ((uint64_t)17200) // Higher fee (and fallback) in v12 (only, v13 switches back) #define FEE_PER_BYTE_V12 ((uint64_t)17200) // Higher fee (and fallback) in v12 (only, v13 switches back)
#define FEE_PER_OUTPUT ((uint64_t)20000000) // 0.02 LOKI per tx output (in addition to the per-byte fee), starting in v13 #define FEE_PER_OUTPUT ((uint64_t)20000000) // 0.02 OXEN per tx output (in addition to the per-byte fee), starting in v13
#define DYNAMIC_FEE_PER_KB_BASE_BLOCK_REWARD ((uint64_t)10000000000000) // 10 * pow(10,12) #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)400000000) #define DYNAMIC_FEE_PER_KB_BASE_FEE_V5 ((uint64_t)400000000)
#define DYNAMIC_FEE_REFERENCE_TRANSACTION_WEIGHT ((uint64_t)3000) #define DYNAMIC_FEE_REFERENCE_TRANSACTION_WEIGHT ((uint64_t)3000)
@ -324,7 +324,7 @@ namespace cryptonote
network_version_9_service_nodes, // Proof Of Stake w/ Service Nodes network_version_9_service_nodes, // Proof Of Stake w/ Service Nodes
network_version_10_bulletproofs, // Bulletproofs, Service Node Grace Registration Period, Batched Governance network_version_10_bulletproofs, // Bulletproofs, Service Node Grace Registration Period, Batched Governance
network_version_11_infinite_staking, // Infinite Staking, CN-Turtle network_version_11_infinite_staking, // Infinite Staking, CN-Turtle
network_version_12_checkpointing, // Checkpointing, Relaxed Deregistration, RandomXL, Loki Storage Server network_version_12_checkpointing, // Checkpointing, Relaxed Deregistration, RandomXL, Oxen Storage Server
network_version_13_enforce_checkpoints, network_version_13_enforce_checkpoints,
network_version_14_blink, network_version_14_blink,
network_version_15_lns, network_version_15_lns,

View File

@ -70,8 +70,8 @@ extern "C" {
} }
#endif #endif
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "blockchain" #define OXEN_DEFAULT_LOG_CATEGORY "blockchain"
#define FIND_BLOCKCHAIN_SUPPLEMENT_MAX_SIZE (100*1024*1024) // 100 MB #define FIND_BLOCKCHAIN_SUPPLEMENT_MAX_SIZE (100*1024*1024) // 100 MB
@ -427,7 +427,7 @@ bool Blockchain::init(BlockchainDB* db, sqlite3 *lns_db, const network_type nett
m_db = db; m_db = db;
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
// NOTE(doyle): Passing in test options in integration mode means we're // NOTE(doyle): Passing in test options in integration mode means we're
// overriding fork heights for any nettype in our integration tests using // overriding fork heights for any nettype in our integration tests using
// a command line argument. So m_nettype should just be nettype. In // a command line argument. So m_nettype should just be nettype. In

View File

@ -70,8 +70,8 @@ extern "C" {
#include "common/oxen_integration_test_hooks.h" #include "common/oxen_integration_test_hooks.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "cn" #define OXEN_DEFAULT_LOG_CATEGORY "cn"
DISABLE_VS_WARNINGS(4355) DISABLE_VS_WARNINGS(4355)
@ -356,7 +356,7 @@ namespace cryptonote
command_line::add_arg(desc, arg_keep_alt_blocks); command_line::add_arg(desc, arg_keep_alt_blocks);
command_line::add_arg(desc, arg_store_quorum_history); command_line::add_arg(desc, arg_store_quorum_history);
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
command_line::add_arg(desc, integration_test::arg_hardforks_override); command_line::add_arg(desc, integration_test::arg_hardforks_override);
command_line::add_arg(desc, integration_test::arg_pipe_name); command_line::add_arg(desc, integration_test::arg_pipe_name);
#endif #endif
@ -416,7 +416,7 @@ namespace cryptonote
if (!epee::net_utils::is_ip_public(m_sn_public_ip)) { if (!epee::net_utils::is_ip_public(m_sn_public_ip)) {
if (m_service_node_list.debug_allow_local_ips) { if (m_service_node_list.debug_allow_local_ips) {
MWARNING("Address given for public-ip is not public; allowing it because dev-allow-local-ips was specified. This service node WILL NOT WORK ON THE PUBLIC LOKI NETWORK!"); MWARNING("Address given for public-ip is not public; allowing it because dev-allow-local-ips was specified. This service node WILL NOT WORK ON THE PUBLIC OXEN NETWORK!");
} else { } else {
MERROR("Address given for public-ip is not public: " << epee::string_tools::get_ip_string_from_int32(m_sn_public_ip)); MERROR("Address given for public-ip is not public: " << epee::string_tools::get_ip_string_from_int32(m_sn_public_ip));
storage_ok = false; storage_ok = false;
@ -510,7 +510,7 @@ namespace cryptonote
{ {
std::string s; std::string s;
s.reserve(128); s.reserve(128);
s += 'v'; s += LOKI_VERSION_STR; s += 'v'; s += OXEN_VERSION_STR;
s += "; Height: "; s += "; Height: ";
s += std::to_string(get_blockchain_storage().get_current_blockchain_height()); s += std::to_string(get_blockchain_storage().get_current_blockchain_height());
s += ", SN: "; s += ", SN: ";
@ -552,7 +552,7 @@ namespace cryptonote
{ {
start_time = std::time(nullptr); start_time = std::time(nullptr);
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
const std::string arg_hardforks_override = command_line::get_arg(vm, integration_test::arg_hardforks_override); const std::string arg_hardforks_override = command_line::get_arg(vm, integration_test::arg_hardforks_override);
std::vector<std::pair<uint8_t, uint64_t>> integration_test_hardforks; std::vector<std::pair<uint8_t, uint64_t>> integration_test_hardforks;
@ -642,7 +642,7 @@ namespace cryptonote
bool sync_on_blocks = true; bool sync_on_blocks = true;
uint64_t sync_threshold = 1; uint64_t sync_threshold = 1;
#if !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) // In integration mode, don't delete the DB. This should be explicitly done in the tests. Otherwise the more likely behaviour is persisting the DB across multiple daemons in the same test. #if !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS) // In integration mode, don't delete the DB. This should be explicitly done in the tests. Otherwise the more likely behaviour is persisting the DB across multiple daemons in the same test.
if (m_nettype == FAKECHAIN && !keep_fakechain) if (m_nettype == FAKECHAIN && !keep_fakechain)
{ {
// reset the db by removing the database file before opening it // reset the db by removing the database file before opening it
@ -1987,7 +1987,7 @@ namespace cryptonote
std::vector<block_complete_entry> blocks; std::vector<block_complete_entry> blocks;
m_miner.pause(); m_miner.pause();
{ {
LOKI_DEFER { m_miner.resume(); }; OXEN_DEFER { m_miner.resume(); };
try try
{ {
blocks.push_back(get_block_complete_entry(b, m_mempool)); blocks.push_back(get_block_complete_entry(b, m_mempool));
@ -2241,7 +2241,7 @@ namespace cryptonote
"is running! It is required to run alongside the Loki daemon"); "is running! It is required to run alongside the Loki daemon");
return; return;
} }
if (!check_external_ping(m_last_oxennet_ping, LOKINET_PING_LIFETIME, "Lokinet")) if (!check_external_ping(m_last_oxennet_ping, OXENNET_PING_LIFETIME, "Lokinet"))
{ {
MGINFO_RED( MGINFO_RED(
"Failed to submit uptime proof: have not heard from oxennet recently. Make sure that it " "Failed to submit uptime proof: have not heard from oxennet recently. Make sure that it "
@ -2299,7 +2299,7 @@ namespace cryptonote
m_miner.on_idle(); m_miner.on_idle();
m_mempool.on_idle(); m_mempool.on_idle();
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
integration_test::state.core_is_idle = true; integration_test::state.core_is_idle = true;
#endif #endif
@ -2403,7 +2403,7 @@ namespace cryptonote
return true; return true;
} }
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
MDEBUG("Not checking block rate, integration test mode"); MDEBUG("Not checking block rate, integration test mode");
return true; return true;
#endif #endif

View File

@ -1107,7 +1107,7 @@ namespace cryptonote
const blobdata bd = get_block_hashing_blob(b); const blobdata bd = get_block_hashing_blob(b);
const uint8_t hf_version = b.major_version; const uint8_t hf_version = b.major_version;
#if defined(LOKI_INTEGRATION_TESTS) #if defined(OXEN_INTEGRATION_TESTS)
miners = 0; miners = 0;
#endif #endif

View File

@ -30,8 +30,8 @@ extern "C"
#include <sodium/randombytes.h> #include <sodium/randombytes.h>
} }
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "lns" #define OXEN_DEFAULT_LOG_CATEGORY "lns"
namespace lns namespace lns
{ {
@ -749,8 +749,8 @@ bool validate_lns_name(mapping_type type, std::string name, std::string *reason)
if (is_oxennet) if (is_oxennet)
max_name_len = name.find('-') != std::string::npos max_name_len = name.find('-') != std::string::npos
? LOKINET_DOMAIN_NAME_MAX ? OXENNET_DOMAIN_NAME_MAX
: LOKINET_DOMAIN_NAME_MAX_NOHYPHEN; : OXENNET_DOMAIN_NAME_MAX_NOHYPHEN;
else if (type == mapping_type::session) max_name_len = lns::SESSION_DISPLAY_NAME_MAX; else if (type == mapping_type::session) max_name_len = lns::SESSION_DISPLAY_NAME_MAX;
else if (type == mapping_type::wallet) max_name_len = lns::WALLET_NAME_MAX; else if (type == mapping_type::wallet) max_name_len = lns::WALLET_NAME_MAX;
else else
@ -774,7 +774,7 @@ bool validate_lns_name(mapping_type type, std::string name, std::string *reason)
// NOTE: Validate domain specific requirements // NOTE: Validate domain specific requirements
if (is_oxennet) if (is_oxennet)
{ {
// LOKINET // OXENNET
// Domain has to start with an alphanumeric, and can have (alphanumeric or hyphens) in between, the character before the suffix <char>'.oxen' must be alphanumeric followed by the suffix '.oxen' // Domain has to start with an alphanumeric, and can have (alphanumeric or hyphens) in between, the character before the suffix <char>'.oxen' must be alphanumeric followed by the suffix '.oxen'
// It's *approximately* this regex, but there are some extra restrictions below // It's *approximately* this regex, but there are some extra restrictions below
// ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.oxen$ // ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.oxen$
@ -955,7 +955,7 @@ bool mapping_value::validate_encrypted(mapping_type type, std::string_view value
if (blob) *blob = {}; if (blob) *blob = {};
std::stringstream err_stream; std::stringstream err_stream;
int value_len = crypto_aead_xchacha20poly1305_ietf_ABYTES + crypto_aead_xchacha20poly1305_ietf_NPUBBYTES; int value_len = crypto_aead_xchacha20poly1305_ietf_ABYTES + crypto_aead_xchacha20poly1305_ietf_NPUBBYTES;
if (is_oxennet_type(type)) value_len += LOKINET_ADDRESS_BINARY_LENGTH; if (is_oxennet_type(type)) value_len += OXENNET_ADDRESS_BINARY_LENGTH;
else if (type == mapping_type::wallet) value_len += WALLET_ACCOUNT_BINARY_LENGTH; else if (type == mapping_type::wallet) value_len += WALLET_ACCOUNT_BINARY_LENGTH;
else if (type == mapping_type::session) else if (type == mapping_type::session)
{ {
@ -1031,7 +1031,7 @@ static bool verify_lns_signature(crypto::hash const &hash, lns::generic_signatur
static bool validate_against_previous_mapping(lns::name_system_db &lns_db, uint64_t blockchain_height, cryptonote::transaction const &tx, cryptonote::tx_extra_oxen_name_system const &lns_extra, std::string *reason) static bool validate_against_previous_mapping(lns::name_system_db &lns_db, uint64_t blockchain_height, cryptonote::transaction const &tx, cryptonote::tx_extra_oxen_name_system const &lns_extra, std::string *reason)
{ {
std::stringstream err_stream; std::stringstream err_stream;
LOKI_DEFER { if (reason && reason->empty()) *reason = err_stream.str(); }; OXEN_DEFER { if (reason && reason->empty()) *reason = err_stream.str(); };
crypto::hash expected_prev_txid = crypto::null_hash; crypto::hash expected_prev_txid = crypto::null_hash;
std::string name_hash = hash_to_base64(lns_extra.name_hash); std::string name_hash = hash_to_base64(lns_extra.name_hash);
@ -1383,7 +1383,7 @@ bool mapping_value::decrypt(std::string_view name, mapping_type type, const cryp
{ {
switch(type) { switch(type) {
case mapping_type::session: dec_length = SESSION_PUBLIC_KEY_BINARY_LENGTH; break; case mapping_type::session: dec_length = SESSION_PUBLIC_KEY_BINARY_LENGTH; break;
case mapping_type::oxennet: dec_length = LOKINET_ADDRESS_BINARY_LENGTH; break; case mapping_type::oxennet: dec_length = OXENNET_ADDRESS_BINARY_LENGTH; break;
case mapping_type::wallet: dec_length = WALLET_ACCOUNT_BINARY_LENGTH; break; case mapping_type::wallet: dec_length = WALLET_ACCOUNT_BINARY_LENGTH; break;
default: MERROR("Invalid mapping_type passed to mapping_value::decrypt"); return false; default: MERROR("Invalid mapping_type passed to mapping_value::decrypt"); return false;
} }

View File

@ -1,5 +1,5 @@
#ifndef LOKI_NAME_SYSTEM_H #ifndef OXEN_NAME_SYSTEM_H
#define LOKI_NAME_SYSTEM_H #define OXEN_NAME_SYSTEM_H
#include "crypto/crypto.h" #include "crypto/crypto.h"
#include "cryptonote_config.h" #include "cryptonote_config.h"
@ -28,9 +28,9 @@ namespace lns
constexpr size_t WALLET_NAME_MAX = 97; // mainnet addresses are 95 but testnet/devnet are 97 constexpr size_t WALLET_NAME_MAX = 97; // mainnet addresses are 95 but testnet/devnet are 97
constexpr size_t WALLET_ACCOUNT_BINARY_LENGTH = 2 * sizeof(crypto::public_key); constexpr size_t WALLET_ACCOUNT_BINARY_LENGTH = 2 * sizeof(crypto::public_key);
constexpr size_t LOKINET_DOMAIN_NAME_MAX = 63 + 5; // DNS components name must be at most 63 (+ 5 for .oxen); this limit applies if there is at least one hyphen (and thus includes punycode) constexpr size_t OXENNET_DOMAIN_NAME_MAX = 63 + 5; // DNS components name must be at most 63 (+ 5 for .oxen); this limit applies if there is at least one hyphen (and thus includes punycode)
constexpr size_t LOKINET_DOMAIN_NAME_MAX_NOHYPHEN = 32 + 5; // If the name does not contain a - then we restrict it to 32 characters so that it cannot be (and is obviously not) an encoded .oxen address (52 characters) constexpr size_t OXENNET_DOMAIN_NAME_MAX_NOHYPHEN = 32 + 5; // If the name does not contain a - then we restrict it to 32 characters so that it cannot be (and is obviously not) an encoded .oxen address (52 characters)
constexpr size_t LOKINET_ADDRESS_BINARY_LENGTH = sizeof(crypto::ed25519_public_key); constexpr size_t OXENNET_ADDRESS_BINARY_LENGTH = sizeof(crypto::ed25519_public_key);
constexpr size_t SESSION_DISPLAY_NAME_MAX = 64; constexpr size_t SESSION_DISPLAY_NAME_MAX = 64;
constexpr size_t SESSION_PUBLIC_KEY_BINARY_LENGTH = 1 + sizeof(crypto::ed25519_public_key); // Session keys at prefixed with 0x05 + ed25519 key constexpr size_t SESSION_PUBLIC_KEY_BINARY_LENGTH = 1 + sizeof(crypto::ed25519_public_key); // Session keys at prefixed with 0x05 + ed25519 key
@ -42,7 +42,7 @@ constexpr size_t SODIUM_ENCRYPTION_EXTRA_BYTES = 40; // crypto_aead_xchacha20pol
struct mapping_value struct mapping_value
{ {
static size_t constexpr BUFFER_SIZE = std::max({WALLET_ACCOUNT_BINARY_LENGTH, LOKINET_ADDRESS_BINARY_LENGTH, SESSION_PUBLIC_KEY_BINARY_LENGTH}) + SODIUM_ENCRYPTION_EXTRA_BYTES; static size_t constexpr BUFFER_SIZE = std::max({WALLET_ACCOUNT_BINARY_LENGTH, OXENNET_ADDRESS_BINARY_LENGTH, SESSION_PUBLIC_KEY_BINARY_LENGTH}) + SODIUM_ENCRYPTION_EXTRA_BYTES;
std::array<uint8_t, BUFFER_SIZE> buffer; std::array<uint8_t, BUFFER_SIZE> buffer;
bool encrypted; bool encrypted;
size_t len; size_t len;
@ -321,4 +321,4 @@ private:
}; };
}; // namespace service_nodes }; // namespace service_nodes
#endif // LOKI_NAME_SYSTEM_H #endif // OXEN_NAME_SYSTEM_H

View File

@ -18,8 +18,8 @@ extern "C"
#include <sodium/crypto_generichash.h> #include <sodium/crypto_generichash.h>
}; };
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "pulse" #define OXEN_DEFAULT_LOG_CATEGORY "pulse"
// Deliberately makes pulse communications flakey for testing purposes: // Deliberately makes pulse communications flakey for testing purposes:
//#define PULSE_TEST_CODE //#define PULSE_TEST_CODE
@ -344,7 +344,7 @@ std::string msg_source_string(round_context const &context, pulse::message const
bool msg_signature_check(pulse::message const &msg, crypto::hash const &top_block_hash, service_nodes::quorum const &quorum, std::string *error) bool msg_signature_check(pulse::message const &msg, crypto::hash const &top_block_hash, service_nodes::quorum const &quorum, std::string *error)
{ {
std::stringstream stream; std::stringstream stream;
LOKI_DEFER { OXEN_DEFER {
if (error) *error = stream.str(); if (error) *error = stream.str();
}; };

View File

@ -61,8 +61,8 @@ extern "C" {
#include "service_node_swarm.h" #include "service_node_swarm.h"
#include "version.h" #include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "service_nodes" #define OXEN_DEFAULT_LOG_CATEGORY "service_nodes"
namespace service_nodes namespace service_nodes
{ {
@ -2761,7 +2761,7 @@ namespace service_nodes
assert(m_service_node_keys); assert(m_service_node_keys);
const auto& keys = *m_service_node_keys; const auto& keys = *m_service_node_keys;
cryptonote::NOTIFY_UPTIME_PROOF::request result = {}; cryptonote::NOTIFY_UPTIME_PROOF::request result = {};
result.snode_version = LOKI_VERSION; result.snode_version = OXEN_VERSION;
result.timestamp = time(nullptr); result.timestamp = time(nullptr);
result.pubkey = keys.pub; result.pubkey = keys.pub;
result.public_ip = public_ip; result.public_ip = public_ip;

View File

@ -49,7 +49,7 @@ namespace service_nodes
{ {
constexpr uint64_t INVALID_HEIGHT = static_cast<uint64_t>(-1); constexpr uint64_t INVALID_HEIGHT = static_cast<uint64_t>(-1);
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct participation_entry struct participation_entry
{ {
bool is_pulse = false; bool is_pulse = false;

View File

@ -39,8 +39,8 @@
#include "common/oxen_integration_test_hooks.h" #include "common/oxen_integration_test_hooks.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "quorum_cop" #define OXEN_DEFAULT_LOG_CATEGORY "quorum_cop"
namespace service_nodes namespace service_nodes
{ {
@ -100,7 +100,7 @@ namespace service_nodes
bool check_uptime_obligation = true; bool check_uptime_obligation = true;
bool check_checkpoint_obligation = true; bool check_checkpoint_obligation = true;
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
if (integration_test::state.disable_obligation_uptime_proof) check_uptime_obligation = false; if (integration_test::state.disable_obligation_uptime_proof) check_uptime_obligation = false;
if (integration_test::state.disable_obligation_checkpointing) check_checkpoint_obligation = false; if (integration_test::state.disable_obligation_checkpointing) check_checkpoint_obligation = false;
#endif #endif
@ -257,7 +257,7 @@ namespace service_nodes
{ {
quorum_type const type = static_cast<quorum_type>(i); quorum_type const type = static_cast<quorum_type>(i);
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
if (integration_test::state.disable_checkpoint_quorum && type == quorum_type::checkpointing) continue; if (integration_test::state.disable_checkpoint_quorum && type == quorum_type::checkpointing) continue;
if (integration_test::state.disable_obligation_quorum && type == quorum_type::obligations) continue; if (integration_test::state.disable_obligation_quorum && type == quorum_type::obligations) continue;
#endif #endif
@ -438,7 +438,7 @@ namespace service_nodes
// NOTE: Don't warn uptime proofs if the daemon is just // NOTE: Don't warn uptime proofs if the daemon is just
// recently started and is candidate for testing (i.e. // recently started and is candidate for testing (i.e.
// restarting the daemon) // restarting the daemon)
if (!my_test_results.uptime_proved && live_time < LOKI_HOUR(1)) if (!my_test_results.uptime_proved && live_time < OXEN_HOUR(1))
continue; continue;
LOG_PRINT_L0("Service Node (yours) is active but is not passing tests for quorum: " << m_obligations_height); LOG_PRINT_L0("Service Node (yours) is active but is not passing tests for quorum: " << m_obligations_height);

View File

@ -7,7 +7,7 @@
namespace service_nodes { namespace service_nodes {
constexpr size_t PULSE_QUORUM_ENTROPY_LAG = 21; // How many blocks back from the tip of the Blockchain to source entropy for the Pulse quorums. constexpr size_t PULSE_QUORUM_ENTROPY_LAG = 21; // How many blocks back from the tip of the Blockchain to source entropy for the Pulse quorums.
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
constexpr auto PULSE_ROUND_TIME = 20s; constexpr auto PULSE_ROUND_TIME = 20s;
constexpr auto PULSE_WAIT_FOR_HANDSHAKES_DURATION = 3s; constexpr auto PULSE_WAIT_FOR_HANDSHAKES_DURATION = 3s;
constexpr auto PULSE_WAIT_FOR_OTHER_VALIDATOR_HANDSHAKES_DURATION = 3s; constexpr auto PULSE_WAIT_FOR_OTHER_VALIDATOR_HANDSHAKES_DURATION = 3s;
@ -151,7 +151,7 @@ namespace service_nodes {
constexpr size_t STATE_CHANGE_MIN_NODES_TO_TEST = 50; constexpr size_t STATE_CHANGE_MIN_NODES_TO_TEST = 50;
constexpr uint64_t VOTE_LIFETIME = BLOCKS_EXPECTED_IN_HOURS(2); constexpr uint64_t VOTE_LIFETIME = BLOCKS_EXPECTED_IN_HOURS(2);
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
constexpr size_t STATE_CHANGE_QUORUM_SIZE = 5; constexpr size_t STATE_CHANGE_QUORUM_SIZE = 5;
constexpr size_t STATE_CHANGE_MIN_VOTES_TO_CHANGE_STATE = 1; constexpr size_t STATE_CHANGE_MIN_VOTES_TO_CHANGE_STATE = 1;
constexpr int MIN_TIME_IN_S_BEFORE_VOTING = 0; constexpr int MIN_TIME_IN_S_BEFORE_VOTING = 0;
@ -172,7 +172,7 @@ namespace service_nodes {
static_assert(STATE_CHANGE_MIN_VOTES_TO_CHANGE_STATE <= STATE_CHANGE_QUORUM_SIZE, "The number of votes required to kick can't exceed the actual quorum size, otherwise we never kick."); static_assert(STATE_CHANGE_MIN_VOTES_TO_CHANGE_STATE <= STATE_CHANGE_QUORUM_SIZE, "The number of votes required to kick can't exceed the actual quorum size, otherwise we never kick.");
static_assert(CHECKPOINT_MIN_VOTES <= CHECKPOINT_QUORUM_SIZE, "The number of votes required to add a checkpoint can't exceed the actual quorum size, otherwise we never add checkpoints."); static_assert(CHECKPOINT_MIN_VOTES <= CHECKPOINT_QUORUM_SIZE, "The number of votes required to add a checkpoint can't exceed the actual quorum size, otherwise we never add checkpoints.");
static_assert(BLINK_MIN_VOTES <= BLINK_SUBQUORUM_SIZE, "The number of votes required can't exceed the actual blink subquorum size, otherwise we never approve."); static_assert(BLINK_MIN_VOTES <= BLINK_SUBQUORUM_SIZE, "The number of votes required can't exceed the actual blink subquorum size, otherwise we never approve.");
#ifndef LOKI_ENABLE_INTEGRATION_TEST_HOOKS #ifndef OXEN_ENABLE_INTEGRATION_TEST_HOOKS
static_assert(BLINK_MIN_VOTES > BLINK_SUBQUORUM_SIZE / 2, "Blink approvals must require a majority of quorum members to prevent conflicting, signed blinks."); static_assert(BLINK_MIN_VOTES > BLINK_SUBQUORUM_SIZE / 2, "Blink approvals must require a majority of quorum members to prevent conflicting, signed blinks.");
#endif #endif
@ -212,7 +212,7 @@ namespace service_nodes {
constexpr uint64_t VOTE_OR_TX_VERIFY_HEIGHT_BUFFER = 5; constexpr uint64_t VOTE_OR_TX_VERIFY_HEIGHT_BUFFER = 5;
constexpr std::array<int, 3> MIN_STORAGE_SERVER_VERSION{{2, 0, 7}}; constexpr std::array<int, 3> MIN_STORAGE_SERVER_VERSION{{2, 0, 7}};
constexpr std::array<int, 3> MIN_LOKINET_VERSION{{0, 8, 0}}; constexpr std::array<int, 3> MIN_OXENNET_VERSION{{0, 8, 0}};
// The minimum accepted version number, broadcasted by Service Nodes via uptime proofs for each hardfork // The minimum accepted version number, broadcasted by Service Nodes via uptime proofs for each hardfork
struct proof_version struct proof_version

View File

@ -1,8 +1,8 @@
#include "service_node_swarm.h" #include "service_node_swarm.h"
#include "common/random.h" #include "common/random.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "service_nodes" #define OXEN_DEFAULT_LOG_CATEGORY "service_nodes"
#ifdef UNIT_TEST #ifdef UNIT_TEST
#define prod_static #define prod_static

View File

@ -43,8 +43,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "service_nodes" #define OXEN_DEFAULT_LOG_CATEGORY "service_nodes"
namespace service_nodes namespace service_nodes
{ {
@ -590,7 +590,7 @@ namespace service_nodes
std::unique_lock lock{m_lock}; std::unique_lock lock{m_lock};
// TODO(doyle): Rate-limiting: A better threshold value that follows suite with transaction relay time back-off // TODO(doyle): Rate-limiting: A better threshold value that follows suite with transaction relay time back-off
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
constexpr uint64_t TIME_BETWEEN_RELAY = 0; constexpr uint64_t TIME_BETWEEN_RELAY = 0;
#else #else
constexpr uint64_t TIME_BETWEEN_RELAY = 60 * 2; constexpr uint64_t TIME_BETWEEN_RELAY = 60 * 2;

View File

@ -50,8 +50,8 @@
#include "common/perf_timer.h" #include "common/perf_timer.h"
#include "crypto/hash.h" #include "crypto/hash.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "txpool" #define OXEN_DEFAULT_LOG_CATEGORY "txpool"
DISABLE_VS_WARNINGS(4244 4345 4503) //'boost::foreach_detail_::or_' : decorated name length exceeded, name was truncated DISABLE_VS_WARNINGS(4244 4345 4503) //'boost::foreach_detail_::or_' : decorated name length exceeded, name was truncated

View File

@ -33,8 +33,8 @@
#include "blockchain.h" #include "blockchain.h"
#include "tx_sanity_check.h" #include "tx_sanity_check.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "verify" #define OXEN_DEFAULT_LOG_CATEGORY "verify"
namespace cryptonote namespace cryptonote
{ {

View File

@ -38,8 +38,8 @@
#include "common/pruning.h" #include "common/pruning.h"
#include "block_queue.h" #include "block_queue.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "cn.block_queue" #define OXEN_DEFAULT_LOG_CATEGORY "cn.block_queue"
namespace std { namespace std {
template<> template<>

View File

@ -39,8 +39,8 @@
#include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid.hpp>
#include "crypto/hash.h" #include "crypto/hash.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "cn.block_queue" #define OXEN_DEFAULT_LOG_CATEGORY "cn.block_queue"
namespace cryptonote namespace cryptonote
{ {

View File

@ -99,7 +99,7 @@ namespace cryptonote
/************************************************************************/ /************************************************************************/
/* */ /* */
/************************************************************************/ /************************************************************************/
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct serializable_blink_metadata { struct serializable_blink_metadata {
crypto::hash tx_hash; crypto::hash tx_hash;
uint64_t height; uint64_t height;
@ -112,7 +112,7 @@ namespace cryptonote
/************************************************************************/ /************************************************************************/
/* */ /* */
/************************************************************************/ /************************************************************************/
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct block_complete_entry struct block_complete_entry
{ {
blobdata block; blobdata block;

View File

@ -53,8 +53,8 @@
#include "common/lock.h" #include "common/lock.h"
#include "common/util.h" #include "common/util.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "net.cn" #define OXEN_DEFAULT_LOG_CATEGORY "net.cn"
#define MLOG_P2P_MESSAGE(x) MCINFO("net.p2p.msg", context << x) #define MLOG_P2P_MESSAGE(x) MCINFO("net.p2p.msg", context << x)
#define MLOGIF_P2P_MESSAGE(init, test, x) \ #define MLOGIF_P2P_MESSAGE(init, test, x) \
@ -69,7 +69,7 @@
} while(0) } while(0)
#define MLOG_PEER_STATE(x) \ #define MLOG_PEER_STATE(x) \
MCINFO(LOKI_DEFAULT_LOG_CATEGORY, context << "[" << epee::string_tools::to_string_hex(context.m_pruning_seed) << "] state: " << x << " in state " << cryptonote::get_protocol_state_string(context.m_state)) MCINFO(OXEN_DEFAULT_LOG_CATEGORY, context << "[" << epee::string_tools::to_string_hex(context.m_pruning_seed) << "] state: " << x << " in state " << cryptonote::get_protocol_state_string(context.m_state))
namespace cryptonote namespace cryptonote
{ {
@ -1359,7 +1359,7 @@ namespace cryptonote
m_core.pause_mine(); m_core.pause_mine();
m_add_timer.resume(); m_add_timer.resume();
bool starting = true; bool starting = true;
LOKI_DEFER OXEN_DEFER
{ {
m_add_timer.pause(); m_add_timer.pause();
m_core.resume_mine(); m_core.resume_mine();
@ -1475,7 +1475,7 @@ namespace cryptonote
{ {
bool remove_spans = false; bool remove_spans = false;
LOKI_DEFER OXEN_DEFER
{ {
if (!m_core.cleanup_handle_incoming_blocks()) if (!m_core.cleanup_handle_incoming_blocks())
LOG_PRINT_CCONTEXT_L0("Failure in cleanup_handle_incoming_blocks"); LOG_PRINT_CCONTEXT_L0("Failure in cleanup_handle_incoming_blocks");

View File

@ -43,8 +43,8 @@
#include "net/dandelionpp.h" #include "net/dandelionpp.h"
#include "p2p/net_node.h" #include "p2p/net_node.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "net.p2p.tx" #define OXEN_DEFAULT_LOG_CATEGORY "net.p2p.tx"
namespace cryptonote namespace cryptonote
{ {

View File

@ -42,8 +42,8 @@
#include <shared_mutex> #include <shared_mutex>
#include <iterator> #include <iterator>
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "qnet" #define OXEN_DEFAULT_LOG_CATEGORY "qnet"
namespace quorumnet { namespace quorumnet {

View File

@ -27,7 +27,7 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
loki_add_executable(daemon "lokid" oxen_add_executable(daemon "oxend"
command_parser_executor.cpp command_parser_executor.cpp
command_server.cpp command_server.cpp
daemon.cpp daemon.cpp

View File

@ -36,8 +36,8 @@
#include "daemon/command_parser_executor.h" #include "daemon/command_parser_executor.h"
#include "rpc/core_rpc_server_commands_defs.h" #include "rpc/core_rpc_server_commands_defs.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon" #define OXEN_DEFAULT_LOG_CATEGORY "daemon"
namespace daemonize { namespace daemonize {

View File

@ -35,12 +35,12 @@
#include "common/oxen_integration_test_hooks.h" #include "common/oxen_integration_test_hooks.h"
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
#include <thread> #include <thread>
#endif #endif
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon" #define OXEN_DEFAULT_LOG_CATEGORY "daemon"
namespace daemonize { namespace daemonize {
@ -396,7 +396,7 @@ void command_server::init_commands(cryptonote::rpc::core_rpc_server* rpc_server)
}, },
""); "");
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
m_command_lookup.set_handler( m_command_lookup.set_handler(
"relay_votes_and_uptime", [rpc_server](const auto&) { "relay_votes_and_uptime", [rpc_server](const auto&) {
rpc_server->on_relay_uptime_and_votes(); rpc_server->on_relay_uptime_and_votes();
@ -458,7 +458,7 @@ bool command_server::start_handling(std::function<void(void)> exit_handler)
{ {
if (m_is_rpc) return false; if (m_is_rpc) return false;
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
auto handle_pipe = [&]() auto handle_pipe = [&]()
{ {
// TODO(doyle): Hack, don't hook into input until the daemon has completely initialised, i.e. you can print the status // TODO(doyle): Hack, don't hook into input until the daemon has completely initialised, i.e. you can print the status
@ -516,7 +516,7 @@ bool command_server::help(const std::vector<std::string>& args)
std::string command_server::get_commands_str() std::string command_server::get_commands_str()
{ {
std::stringstream ss; std::stringstream ss;
ss << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")" << std::endl; ss << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")" << std::endl;
ss << "Commands:\n"; ss << "Commands:\n";
m_command_lookup.for_each([&ss] (const std::string&, const std::string& usage, const std::string&) { m_command_lookup.for_each([&ss] (const std::string&, const std::string& usage, const std::string&) {
ss << " " << usage << "\n"; }); ss << " " << usage << "\n"; });

View File

@ -66,8 +66,8 @@ extern "C" {
using namespace std::literals; using namespace std::literals;
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon" #define OXEN_DEFAULT_LOG_CATEGORY "daemon"
namespace daemonize { namespace daemonize {
@ -287,7 +287,7 @@ bool daemon::run(bool interactive)
stop(); stop();
}}; }};
LOKI_DEFER OXEN_DEFER
{ {
stop_sig = true; stop_sig = true;
stop_thread.join(); stop_thread.join();

View File

@ -42,8 +42,8 @@
#include "cryptonote_protocol/cryptonote_protocol_handler.h" #include "cryptonote_protocol/cryptonote_protocol_handler.h"
#include "epee/misc_log_ex.h" #include "epee/misc_log_ex.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon" #define OXEN_DEFAULT_LOG_CATEGORY "daemon"
namespace daemonize namespace daemonize
{ {

View File

@ -51,8 +51,8 @@
#include "common/stack_trace.h" #include "common/stack_trace.h"
#endif // STACK_TRACE #endif // STACK_TRACE
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon" #define OXEN_DEFAULT_LOG_CATEGORY "daemon"
namespace po = boost::program_options; namespace po = boost::program_options;
@ -120,16 +120,16 @@ int main(int argc, char const * argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << "Usage: " + std::string{argv[0]} + " [options|settings] [daemon_command...]" << std::endl << std::endl; std::cout << "Usage: " + std::string{argv[0]} + " [options|settings] [daemon_command...]" << std::endl << std::endl;
std::cout << visible_options << std::endl; std::cout << visible_options << std::endl;
return 0; return 0;
} }
// Loki Version // Oxen Version
if (command_line::get_arg(vm, command_line::arg_version)) if (command_line::get_arg(vm, command_line::arg_version))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
return 0; return 0;
} }
@ -213,7 +213,7 @@ int main(int argc, char const * argv[])
// logging is now set up // logging is now set up
// FIXME: only print this when starting up as a daemon but not when running rpc commands // FIXME: only print this when starting up as a daemon but not when running rpc commands
MGINFO_GREEN("Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")"); MGINFO_GREEN("Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")");
// If there are positional options, we're running a daemon command // If there are positional options, we're running a daemon command
{ {
@ -252,7 +252,7 @@ int main(int argc, char const * argv[])
MINFO("Moving from main() into the daemonize now."); MINFO("Moving from main() into the daemonize now.");
return daemonizer::daemonize<daemonize::daemon>("Loki Daemon", argc, argv, std::move(vm)) return daemonizer::daemonize<daemonize::daemon>("Oxen Daemon", argc, argv, std::move(vm))
? 0 : 1; ? 0 : 1;
} }
catch (std::exception const & ex) catch (std::exception const & ex)

View File

@ -51,8 +51,8 @@
#include <numeric> #include <numeric>
#include <stack> #include <stack>
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon" #define OXEN_DEFAULT_LOG_CATEGORY "daemon"
using namespace cryptonote::rpc; using namespace cryptonote::rpc;
@ -65,7 +65,7 @@ namespace {
{ {
std::cout << prompt << std::flush; std::cout << prompt << std::flush;
std::string result; std::string result;
#if defined (LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined (OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
integration_test::write_buffered_stdout(); integration_test::write_buffered_stdout();
result = integration_test::read_from_pipe(); result = integration_test::read_from_pipe();
#else #else
@ -608,7 +608,7 @@ bool rpc_command_executor::mining_status() {
if (!mining_busy && mres.active && mres.speed > 0 && mres.block_target > 0 && mres.difficulty > 0) if (!mining_busy && mres.active && mres.speed > 0 && mres.block_target > 0 && mres.difficulty > 0)
{ {
uint64_t daily = 86400 / (double)mres.difficulty * mres.speed * mres.block_reward; uint64_t daily = 86400 / (double)mres.difficulty * mres.speed * mres.block_reward;
tools::msg_writer() << "Expected: " << cryptonote::print_money(daily) << " LOKI daily, " << cryptonote::print_money(7*daily) << " weekly"; tools::msg_writer() << "Expected: " << cryptonote::print_money(daily) << " OXEN daily, " << cryptonote::print_money(7*daily) << " weekly";
} }
return true; return true;
@ -928,7 +928,7 @@ static void print_pool(const std::vector<cryptonote::rpc::tx_info> &transactions
w << "blob_size: " << tx_info.blob_size << "\n" w << "blob_size: " << tx_info.blob_size << "\n"
<< "weight: " << tx_info.weight << "\n" << "weight: " << tx_info.weight << "\n"
<< "fee: " << cryptonote::print_money(tx_info.fee) << "\n" << "fee: " << cryptonote::print_money(tx_info.fee) << "\n"
/// NB(Loki): in v13 we have min_fee = per_out*outs + per_byte*bytes, only the total fee/byte matters for /// NB(Oxen): in v13 we have min_fee = per_out*outs + per_byte*bytes, only the total fee/byte matters for
/// the purpose of building a block template from the pool, so we still print the overall fee / byte here. /// the purpose of building a block template from the pool, so we still print the overall fee / byte here.
/// (we can't back out the individual per_out and per_byte that got used anyway). /// (we can't back out the individual per_out and per_byte that got used anyway).
<< "fee/byte: " << cryptonote::print_money(tx_info.fee / (double)tx_info.weight) << "\n" << "fee/byte: " << cryptonote::print_money(tx_info.fee / (double)tx_info.weight) << "\n"
@ -1227,7 +1227,7 @@ bool rpc_command_executor::ban(const std::string &address, time_t seconds, bool
// TODO(doyle): Work around because integration tests break when using // TODO(doyle): Work around because integration tests break when using
// mlog_set_categories(""), so emit the block message using msg writer // mlog_set_categories(""), so emit the block message using msg writer
// instead of the logging system. // instead of the logging system.
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
tools::success_msg_writer() << "Host " << address << (clear_ban ? " unblocked." : " blocked."); tools::success_msg_writer() << "Host " << address << (clear_ban ? " unblocked." : " blocked.");
#endif #endif
@ -1922,7 +1922,7 @@ bool rpc_command_executor::prepare_registration()
uint64_t block_height = std::max(res.height, res.target_height); uint64_t block_height = std::max(res.height, res.target_height);
uint8_t hf_version = hf_res.version; uint8_t hf_version = hf_res.version;
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
cryptonote::network_type const nettype = cryptonote::FAKECHAIN; cryptonote::network_type const nettype = cryptonote::FAKECHAIN;
#else #else
cryptonote::network_type const nettype = cryptonote::network_type const nettype =
@ -2432,7 +2432,7 @@ bool rpc_command_executor::prune_blockchain()
tools::success_msg_writer() << "Blockchain pruned"; tools::success_msg_writer() << "Blockchain pruned";
#else #else
tools::fail_msg_writer() << "Blockchain pruning is not supported in Loki yet"; tools::fail_msg_writer() << "Blockchain pruning is not supported in Oxen yet";
#endif #endif
return true; return true;
} }

View File

@ -39,8 +39,8 @@
#include "cryptonote_basic/cryptonote_basic.h" #include "cryptonote_basic/cryptonote_basic.h"
#include "rpc/core_rpc_server.h" #include "rpc/core_rpc_server.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon" #define OXEN_DEFAULT_LOG_CATEGORY "daemon"
namespace daemonize { namespace daemonize {

View File

@ -27,7 +27,7 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
loki_add_executable(cn_deserialize "loki-utils-deserialize" oxen_add_executable(cn_deserialize "oxen-utils-deserialize"
cn_deserialize.cpp cn_deserialize.cpp
) )
@ -37,7 +37,7 @@ target_link_libraries(cn_deserialize
p2p p2p
extra) extra)
loki_add_executable(object_sizes "loki-utils-object-sizes" oxen_add_executable(object_sizes "oxen-utils-object-sizes"
object_sizes.cpp object_sizes.cpp
) )
@ -53,7 +53,7 @@ set(dns_checks_sources
dns_checks.cpp dns_checks.cpp
) )
loki_add_executable(dns_checks "loki-utils-dns-checks" dns_checks.cpp) oxen_add_executable(dns_checks "oxen-utils-dns-checks" dns_checks.cpp)
target_link_libraries(dns_checks target_link_libraries(dns_checks
PRIVATE PRIVATE

View File

@ -36,8 +36,8 @@
#include "version.h" #include "version.h"
#include <lokimq/hex.h> #include <lokimq/hex.h>
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "debugtools.deserialize" #define OXEN_DEFAULT_LOG_CATEGORY "debugtools.deserialize"
namespace po = boost::program_options; namespace po = boost::program_options;
@ -80,10 +80,10 @@ struct extra_printer {
std::cout << "LNS " << (x.is_buying() ? "registration" : x.is_updating() ? "update" : "(unknown)"); std::cout << "LNS " << (x.is_buying() ? "registration" : x.is_updating() ? "update" : "(unknown)");
switch (x.type) switch (x.type)
{ {
case lns::mapping_type::oxennet: std::cout << " - Lokinet (1y)"; break; case lns::mapping_type::oxennet: std::cout << " - Oxennet (1y)"; break;
case lns::mapping_type::oxennet_2years: std::cout << " - Lokinet (2y)"; break; case lns::mapping_type::oxennet_2years: std::cout << " - Oxennet (2y)"; break;
case lns::mapping_type::oxennet_5years: std::cout << " - Lokinet (5y)"; break; case lns::mapping_type::oxennet_5years: std::cout << " - Oxennet (5y)"; break;
case lns::mapping_type::oxennet_10years: std::cout << " - Lokinet (10y)"; break; case lns::mapping_type::oxennet_10years: std::cout << " - Oxennet (10y)"; break;
case lns::mapping_type::session: std::cout << " - Session address"; break; case lns::mapping_type::session: std::cout << " - Session address"; break;
case lns::mapping_type::wallet: std::cout << " - Wallet address"; break; case lns::mapping_type::wallet: std::cout << " - Wallet address"; break;
case lns::mapping_type::update_record_internal: case lns::mapping_type::update_record_internal:
@ -155,7 +155,7 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }

View File

@ -121,13 +121,13 @@ int main(int argc, char* argv[])
if (command_line::get_arg(vm, command_line::arg_help)) if (command_line::get_arg(vm, command_line::arg_help))
{ {
std::cout << "Loki '" << LOKI_RELEASE_NAME << "' (v" << LOKI_VERSION_FULL << ")\n\n"; std::cout << "Oxen '" << OXEN_RELEASE_NAME << "' (v" << OXEN_VERSION_FULL << ")\n\n";
std::cout << desc_options << std::endl; std::cout << desc_options << std::endl;
return 1; return 1;
} }
mlog_configure("", true); mlog_configure("", true);
mlog_set_categories("+" LOKI_DEFAULT_LOG_CATEGORY ":INFO"); mlog_set_categories("+" OXEN_DEFAULT_LOG_CATEGORY ":INFO");
lookup(LOOKUP_A, {"seeds.moneroseeds.se", "seeds.moneroseeds.ae.org", "seeds.moneroseeds.ch", "seeds.moneroseeds.li"}); lookup(LOOKUP_A, {"seeds.moneroseeds.se", "seeds.moneroseeds.ae.org", "seeds.moneroseeds.ch", "seeds.moneroseeds.li"});

View File

@ -45,8 +45,8 @@
#include "wallet/api/unsigned_transaction.h" #include "wallet/api/unsigned_transaction.h"
#include "wallet/api/pending_transaction.h" #include "wallet/api/pending_transaction.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "debugtools.objectsizes" #define OXEN_DEFAULT_LOG_CATEGORY "debugtools.objectsizes"
class size_logger class size_logger
{ {

View File

@ -35,8 +35,8 @@
namespace hw { namespace hw {
namespace io { namespace io {
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device.io" #define OXEN_DEFAULT_LOG_CATEGORY "device.io"
#define ASSERT_X(exp,msg) CHECK_AND_ASSERT_THROW_MES(exp, msg); #define ASSERT_X(exp,msg) CHECK_AND_ASSERT_THROW_MES(exp, msg);
@ -120,7 +120,7 @@ namespace hw {
hid_device_info *result = nullptr; hid_device_info *result = nullptr;
for (; devices_list != nullptr; devices_list = devices_list->next) { for (; devices_list != nullptr; devices_list = devices_list->next) {
LOKI_DEFER { OXEN_DEFER {
MDEBUG( (result == devices_list ? "SELECTED" : "SKIPPED ") << MDEBUG( (result == devices_list ? "SELECTED" : "SKIPPED ") <<
" HID Device" << " HID Device" <<
" path " << safe_hid_path(devices_list) << " path " << safe_hid_path(devices_list) <<

View File

@ -49,8 +49,8 @@ namespace hw {
#ifdef WITH_DEVICE_LEDGER #ifdef WITH_DEVICE_LEDGER
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device.ledger" #define OXEN_DEFAULT_LOG_CATEGORY "device.ledger"
/* ===================================================================== */ /* ===================================================================== */
/* === Debug ==== */ /* === Debug ==== */
@ -482,8 +482,8 @@ namespace hw {
bool device_ledger::reset() { bool device_ledger::reset() {
reset_buffer(); reset_buffer();
int offset = set_command_header_noopt(INS_RESET); int offset = set_command_header_noopt(INS_RESET);
CHECK_AND_ASSERT_THROW_MES(offset + LOKI_VERSION_STR.size() <= BUFFER_SEND_SIZE, "LOKI_VERSION_STR is too long"); CHECK_AND_ASSERT_THROW_MES(offset + OXEN_VERSION_STR.size() <= BUFFER_SEND_SIZE, "OXEN_VERSION_STR is too long");
send_bytes(LOKI_VERSION_STR.data(), LOKI_VERSION_STR.size(), offset); send_bytes(OXEN_VERSION_STR.data(), OXEN_VERSION_STR.size(), offset);
finish_and_exchange(offset); finish_and_exchange(offset);
CHECK_AND_ASSERT_THROW_MES(length_recv>=3, "Communication error, less than three bytes received. Check your application version."); CHECK_AND_ASSERT_THROW_MES(length_recv>=3, "Communication error, less than three bytes received. Check your application version.");

View File

@ -44,7 +44,7 @@ namespace hw {
namespace ledger { namespace ledger {
// Required coin value as returned by INS_GET_NETWORK during connection // Required coin value as returned by INS_GET_NETWORK during connection
constexpr auto COIN_NETWORK = "LOKI"sv; constexpr auto COIN_NETWORK = "OXEN"sv;
/* Minimal supported version */ /* Minimal supported version */
#define MINIMAL_APP_VERSION_MAJOR 0 #define MINIMAL_APP_VERSION_MAJOR 0

View File

@ -34,8 +34,8 @@
namespace hw { namespace hw {
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device" #define OXEN_DEFAULT_LOG_CATEGORY "device"
void log_hexbuffer(std::string_view msg, const void* buff, size_t len) { void log_hexbuffer(std::string_view msg, const void* buff, size_t len) {
MDEBUG(msg << ": " << lokimq::to_hex(std::string_view{reinterpret_cast<const char*>(buff), len})); MDEBUG(msg << ": " << lokimq::to_hex(std::string_view{reinterpret_cast<const char*>(buff), len}));
@ -49,8 +49,8 @@ namespace hw {
#ifdef WITH_DEVICE_LEDGER #ifdef WITH_DEVICE_LEDGER
namespace ledger { namespace ledger {
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device.ledger" #define OXEN_DEFAULT_LOG_CATEGORY "device.ledger"
#ifdef DEBUG_HWDEVICE #ifdef DEBUG_HWDEVICE

View File

@ -35,8 +35,8 @@ namespace trezor {
#ifdef WITH_DEVICE_TREZOR #ifdef WITH_DEVICE_TREZOR
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device.trezor" #define OXEN_DEFAULT_LOG_CATEGORY "device.trezor"
#define HW_TREZOR_NAME "Trezor" #define HW_TREZOR_NAME "Trezor"

View File

@ -37,8 +37,8 @@ namespace trezor {
#ifdef WITH_DEVICE_TREZOR #ifdef WITH_DEVICE_TREZOR
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device.trezor" #define OXEN_DEFAULT_LOG_CATEGORY "device.trezor"
#define TREZOR_BIP44_HARDENED_ZERO 0x80000000 #define TREZOR_BIP44_HARDENED_ZERO 0x80000000
const uint32_t device_trezor_base::DEFAULT_BIP44_PATH[] = {0x8000002c, 0x80000080}; const uint32_t device_trezor_base::DEFAULT_BIP44_PATH[] = {0x8000002c, 0x80000080};
@ -363,7 +363,7 @@ namespace trezor {
require_connected(); require_connected();
std::string tmp_session_id; std::string tmp_session_id;
auto initMsg = std::make_shared<messages::management::Initialize>(); auto initMsg = std::make_shared<messages::management::Initialize>();
LOKI_DEFER { OXEN_DEFER {
memwipe(&tmp_session_id[0], tmp_session_id.size()); memwipe(&tmp_session_id[0], tmp_session_id.size());
}; };
@ -456,7 +456,7 @@ namespace trezor {
m.set_allocated_pin(&pin_field); m.set_allocated_pin(&pin_field);
} }
LOKI_DEFER { OXEN_DEFER {
m.release_pin(); m.release_pin();
if (!pin_field.empty()){ if (!pin_field.empty()){
memwipe(&pin_field[0], pin_field.size()); memwipe(&pin_field[0], pin_field.size());
@ -513,7 +513,7 @@ namespace trezor {
} }
} }
LOKI_DEFER { OXEN_DEFER {
m.release_passphrase(); m.release_passphrase();
if (!passphrase_field.empty()){ if (!passphrase_field.empty()){
memwipe(&passphrase_field[0], passphrase_field.size()); memwipe(&passphrase_field[0], passphrase_field.size());

View File

@ -154,7 +154,7 @@ namespace trezor {
} }
// Scoped session closer // Scoped session closer
LOKI_DEFER { OXEN_DEFER {
if (open_session){ if (open_session){
this->get_transport()->close(); this->get_transport()->close();
} }

View File

@ -559,7 +559,7 @@ namespace tx {
tsx_data.set_num_inputs(static_cast<google::protobuf::uint32>(input_size)); tsx_data.set_num_inputs(static_cast<google::protobuf::uint32>(input_size));
tsx_data.set_mixin(static_cast<google::protobuf::uint32>(tx.sources[0].outputs.size() - 1)); tsx_data.set_mixin(static_cast<google::protobuf::uint32>(tx.sources[0].outputs.size() - 1));
tsx_data.set_account(tx.subaddr_account); tsx_data.set_account(tx.subaddr_account);
tsx_data.set_monero_version(std::string{LOKI_VERSION_STR} + "|" + std::string{LOKI_VERSION_TAG}); tsx_data.set_monero_version(std::string{OXEN_VERSION_STR} + "|" + std::string{OXEN_VERSION_TAG});
tsx_data.set_hard_fork(m_aux_data->hard_fork ? *m_aux_data->hard_fork : 0); tsx_data.set_hard_fork(m_aux_data->hard_fork ? *m_aux_data->hard_fork : 0);
if (client_version() <= 1){ if (client_version() <= 1){

View File

@ -44,8 +44,8 @@
#include "transport.hpp" #include "transport.hpp"
#include "messages/messages-common.pb.h" #include "messages/messages-common.pb.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device.trezor.transport" #define OXEN_DEFAULT_LOG_CATEGORY "device.trezor.transport"
using namespace std; using namespace std;
using json = rapidjson::Document; using json = rapidjson::Document;
@ -521,7 +521,7 @@ namespace trezor{
m_http_session.SetBody(body); m_http_session.SetBody(body);
cpr::Response res; cpr::Response res;
LOKI_DEFER { OXEN_DEFER {
if (!res.text.empty()) if (!res.text.empty())
memwipe(res.text.data(), res.text.size()); memwipe(res.text.data(), res.text.size());
}; };
@ -852,11 +852,11 @@ namespace trezor{
# define TREZOR_LIBUSB_SET_DEBUG(ctx, level) libusb_set_debug(ctx, level) # define TREZOR_LIBUSB_SET_DEBUG(ctx, level) libusb_set_debug(ctx, level)
#endif #endif
if (ELPP->vRegistry()->allowed(el::Level::Debug, LOKI_DEFAULT_LOG_CATEGORY)) if (ELPP->vRegistry()->allowed(el::Level::Debug, OXEN_DEFAULT_LOG_CATEGORY))
TREZOR_LIBUSB_SET_DEBUG(ctx, 3); TREZOR_LIBUSB_SET_DEBUG(ctx, 3);
else if (ELPP->vRegistry()->allowed(el::Level::Warning, LOKI_DEFAULT_LOG_CATEGORY)) else if (ELPP->vRegistry()->allowed(el::Level::Warning, OXEN_DEFAULT_LOG_CATEGORY))
TREZOR_LIBUSB_SET_DEBUG(ctx, 2); TREZOR_LIBUSB_SET_DEBUG(ctx, 2);
else if (ELPP->vRegistry()->allowed(el::Level::Error, LOKI_DEFAULT_LOG_CATEGORY)) else if (ELPP->vRegistry()->allowed(el::Level::Error, OXEN_DEFAULT_LOG_CATEGORY))
TREZOR_LIBUSB_SET_DEBUG(ctx, 1); TREZOR_LIBUSB_SET_DEBUG(ctx, 1);
#undef TREZOR_LIBUSB_SET_DEBUG #undef TREZOR_LIBUSB_SET_DEBUG

View File

@ -167,7 +167,7 @@ namespace trezor {
t_serialize(request, req); t_serialize(request, req);
std::string res; std::string res;
LOKI_DEFER { if (!res.empty()) memwipe(res.data(), res.size()); }; OXEN_DEFER { if (!res.empty()) memwipe(res.data(), res.size()); };
try { try {
res = post_json(uri, std::move(req)); res = post_json(uri, std::move(req));

View File

@ -27,7 +27,7 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
loki_add_executable(gen_multisig "loki-gen-trusted-multisig" oxen_add_executable(gen_multisig "oxen-gen-trusted-multisig"
gen_multisig.cpp gen_multisig.cpp
) )

View File

@ -51,8 +51,8 @@ using namespace cryptonote;
using boost::lexical_cast; using boost::lexical_cast;
namespace po = boost::program_options; namespace po = boost::program_options;
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "wallet.gen_multisig" #define OXEN_DEFAULT_LOG_CATEGORY "wallet.gen_multisig"
namespace genms namespace genms
{ {

View File

@ -63,8 +63,8 @@
#include "language_base.h" #include "language_base.h"
#include "singleton.h" #include "singleton.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "mnemonic" #define OXEN_DEFAULT_LOG_CATEGORY "mnemonic"
namespace crypto namespace crypto
{ {
@ -293,7 +293,7 @@ namespace crypto
} }
std::vector<uint32_t> matched_indices; std::vector<uint32_t> matched_indices;
LOKI_DEFER { memwipe(matched_indices.data(), matched_indices.size() * sizeof(matched_indices[0])); }; OXEN_DEFER { memwipe(matched_indices.data(), matched_indices.size() * sizeof(matched_indices[0])); };
Language::Base *language; Language::Base *language;
if (!find_seed_language(seed, has_checksum, matched_indices, &language)) if (!find_seed_language(seed, has_checksum, matched_indices, &language))
{ {

View File

@ -35,8 +35,8 @@
#include "multisig.h" #include "multisig.h"
#include "cryptonote_config.h" #include "cryptonote_config.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "multisig" #define OXEN_DEFAULT_LOG_CATEGORY "multisig"
using namespace std; using namespace std;

View File

@ -63,8 +63,8 @@
#include <miniupnp/miniupnpc/upnperrors.h> #include <miniupnp/miniupnpc/upnperrors.h>
#endif #endif
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "net.p2p" #define OXEN_DEFAULT_LOG_CATEGORY "net.p2p"
#define NET_MAKE_IP(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4)))) #define NET_MAKE_IP(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
@ -961,7 +961,7 @@ namespace nodetool
bool r = epee::net_utils::async_invoke_remote_command2<typename COMMAND_HANDSHAKE::response>(context_.m_connection_id, COMMAND_HANDSHAKE::ID, arg, zone.m_net_server.get_config_object(), bool r = epee::net_utils::async_invoke_remote_command2<typename COMMAND_HANDSHAKE::response>(context_.m_connection_id, COMMAND_HANDSHAKE::ID, arg, zone.m_net_server.get_config_object(),
[this, &pi, &ev, &hsh_result, &just_take_peerlist, &context_, &timeout](int code, typename COMMAND_HANDSHAKE::response&& rsp, p2p_connection_context& context) [this, &pi, &ev, &hsh_result, &just_take_peerlist, &context_, &timeout](int code, typename COMMAND_HANDSHAKE::response&& rsp, p2p_connection_context& context)
{ {
LOKI_DEFER { ev.set_value(); }; OXEN_DEFER { ev.set_value(); };
if(code < 0) if(code < 0)
{ {
@ -2251,7 +2251,7 @@ namespace nodetool
return 1; return 1;
} }
#if !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
if(has_too_many_connections(context.m_remote_address)) if(has_too_many_connections(context.m_remote_address))
{ {
LOG_PRINT_CCONTEXT_L1("CONNECTION FROM " << context.m_remote_address.host_str() << " REFUSED, too many connections from the same address"); LOG_PRINT_CCONTEXT_L1("CONNECTION FROM " << context.m_remote_address.host_str() << " REFUSED, too many connections from the same address");

View File

@ -43,8 +43,8 @@ extern "C"
#include "multiexp.h" #include "multiexp.h"
#include "bulletproofs.h" #include "bulletproofs.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bulletproofs" #define OXEN_DEFAULT_LOG_CATEGORY "bulletproofs"
//#define DEBUG_BP //#define DEBUG_BP

View File

@ -38,8 +38,8 @@ extern "C"
#include "rctOps.h" #include "rctOps.h"
#include "multiexp.h" #include "multiexp.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "multiexp" #define OXEN_DEFAULT_LOG_CATEGORY "multiexp"
//#define MULTIEXP_PERF(x) x //#define MULTIEXP_PERF(x) x
#define MULTIEXP_PERF(x) #define MULTIEXP_PERF(x)

View File

@ -35,8 +35,8 @@
using namespace crypto; using namespace crypto;
using namespace std; using namespace std;
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "ringct" #define OXEN_DEFAULT_LOG_CATEGORY "ringct"
#define CHECK_AND_ASSERT_THROW_MES_L1(expr, message) {if(!(expr)) {MWARNING(message); throw std::runtime_error(message);}} #define CHECK_AND_ASSERT_THROW_MES_L1(expr, message) {if(!(expr)) {MWARNING(message); throw std::runtime_error(message);}}

View File

@ -37,8 +37,8 @@
#include "cryptonote_basic/cryptonote_format_utils.h" #include "cryptonote_basic/cryptonote_format_utils.h"
#include "cryptonote_config.h" #include "cryptonote_config.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "ringct" #define OXEN_DEFAULT_LOG_CATEGORY "ringct"
#define CHECK_AND_ASSERT_MES_L1(expr, ret, message) {if(!(expr)) {MCERROR("verify", message); return ret;}} #define CHECK_AND_ASSERT_MES_L1(expr, ret, message) {if(!(expr)) {MCERROR("verify", message); return ret;}}

View File

@ -35,8 +35,8 @@
using namespace crypto; using namespace crypto;
using namespace std; using namespace std;
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "ringct" #define OXEN_DEFAULT_LOG_CATEGORY "ringct"
namespace rct { namespace rct {

View File

@ -64,8 +64,8 @@
#include "p2p/net_node.h" #include "p2p/net_node.h"
#include "version.h" #include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon.rpc" #define OXEN_DEFAULT_LOG_CATEGORY "daemon.rpc"
namespace cryptonote { namespace rpc { namespace cryptonote { namespace rpc {
@ -435,9 +435,9 @@ namespace cryptonote { namespace rpc {
res.database_size = m_core.get_blockchain_storage().get_db().get_database_size(); res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
if (!context.admin) if (!context.admin)
res.database_size = round_up(res.database_size, 1'000'000'000); res.database_size = round_up(res.database_size, 1'000'000'000);
res.version = context.admin ? LOKI_VERSION_FULL : std::to_string(LOKI_VERSION[0]); res.version = context.admin ? OXEN_VERSION_FULL : std::to_string(OXEN_VERSION[0]);
res.status_line = context.admin ? m_core.get_status_string() : res.status_line = context.admin ? m_core.get_status_string() :
"v" + std::to_string(LOKI_VERSION[0]) + "; Height: " + std::to_string(res.height); "v" + std::to_string(OXEN_VERSION[0]) + "; Height: " + std::to_string(res.height);
res.status = STATUS_OK; res.status = STATUS_OK;
return res; return res;
@ -1300,7 +1300,7 @@ namespace cryptonote { namespace rpc {
const uint8_t major_version = m_core.get_blockchain_storage().get_current_hard_fork_version(); const uint8_t major_version = m_core.get_blockchain_storage().get_current_hard_fork_version();
res.pow_algorithm = res.pow_algorithm =
major_version >= network_version_12_checkpointing ? "RandomX (LOKI variant)" : major_version >= network_version_12_checkpointing ? "RandomX (OXEN variant)" :
major_version == network_version_11_infinite_staking ? "Cryptonight Turtle Light (Variant 2)" : major_version == network_version_11_infinite_staking ? "Cryptonight Turtle Light (Variant 2)" :
"Cryptonight Heavy (Variant 2)"; "Cryptonight Heavy (Variant 2)";
@ -1541,7 +1541,7 @@ namespace cryptonote { namespace rpc {
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
// //
// Loki // Oxen
// //
GET_OUTPUT_BLACKLIST::response core_rpc_server::invoke(GET_OUTPUT_BLACKLIST::request&& req, rpc_context context) GET_OUTPUT_BLACKLIST::response core_rpc_server::invoke(GET_OUTPUT_BLACKLIST::request&& req, rpc_context context)
{ {
@ -2327,7 +2327,7 @@ namespace cryptonote { namespace rpc {
res.service_node_state.quorumnet_port = m_core.quorumnet_port(); res.service_node_state.quorumnet_port = m_core.quorumnet_port();
res.service_node_state.pubkey_ed25519 = std::move(get_service_node_key_res.service_node_ed25519_pubkey); res.service_node_state.pubkey_ed25519 = std::move(get_service_node_key_res.service_node_ed25519_pubkey);
res.service_node_state.pubkey_x25519 = std::move(get_service_node_key_res.service_node_x25519_pubkey); res.service_node_state.pubkey_x25519 = std::move(get_service_node_key_res.service_node_x25519_pubkey);
res.service_node_state.service_node_version = LOKI_VERSION; res.service_node_state.service_node_version = OXEN_VERSION;
} }
else else
{ {
@ -3306,11 +3306,11 @@ namespace cryptonote { namespace rpc {
}); });
} }
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------
LOKINET_PING::response core_rpc_server::invoke(LOKINET_PING::request&& req, rpc_context context) OXENNET_PING::response core_rpc_server::invoke(OXENNET_PING::request&& req, rpc_context context)
{ {
return handle_ping<LOKINET_PING>( return handle_ping<OXENNET_PING>(
req.version, service_nodes::MIN_LOKINET_VERSION, req.version, service_nodes::MIN_OXENNET_VERSION,
"Lokinet", m_core.m_last_oxennet_ping, LOKINET_PING_LIFETIME, "Oxennet", m_core.m_last_oxennet_ping, OXENNET_PING_LIFETIME,
[this](bool significant) { if (significant) m_core.reset_proof_interval(); }); [this](bool significant) { if (significant) m_core.reset_proof_interval(); });
} }
//------------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------------

View File

@ -43,12 +43,12 @@
#include "p2p/net_node.h" #include "p2p/net_node.h"
#include "cryptonote_protocol/cryptonote_protocol_handler.h" #include "cryptonote_protocol/cryptonote_protocol_handler.h"
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
#include "common/oxen_integration_test_hooks.h" #include "common/oxen_integration_test_hooks.h"
#endif #endif
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon.rpc" #define OXEN_DEFAULT_LOG_CATEGORY "daemon.rpc"
namespace boost::program_options { namespace boost::program_options {
class options_description; class options_description;
@ -262,7 +262,7 @@ namespace cryptonote::rpc {
GET_STAKING_REQUIREMENT::response invoke(GET_STAKING_REQUIREMENT::request&& req, rpc_context context); GET_STAKING_REQUIREMENT::response invoke(GET_STAKING_REQUIREMENT::request&& req, rpc_context context);
PERFORM_BLOCKCHAIN_TEST::response invoke(PERFORM_BLOCKCHAIN_TEST::request&& req, rpc_context context); PERFORM_BLOCKCHAIN_TEST::response invoke(PERFORM_BLOCKCHAIN_TEST::request&& req, rpc_context context);
STORAGE_SERVER_PING::response invoke(STORAGE_SERVER_PING::request&& req, rpc_context context); STORAGE_SERVER_PING::response invoke(STORAGE_SERVER_PING::request&& req, rpc_context context);
LOKINET_PING::response invoke(LOKINET_PING::request&& req, rpc_context context); OXENNET_PING::response invoke(OXENNET_PING::request&& req, rpc_context context);
GET_CHECKPOINTS::response invoke(GET_CHECKPOINTS::request&& req, rpc_context context); GET_CHECKPOINTS::response invoke(GET_CHECKPOINTS::request&& req, rpc_context context);
GET_SN_STATE_CHANGES::response invoke(GET_SN_STATE_CHANGES::request&& req, rpc_context context); GET_SN_STATE_CHANGES::response invoke(GET_SN_STATE_CHANGES::request&& req, rpc_context context);
REPORT_PEER_SS_STATUS::response invoke(REPORT_PEER_SS_STATUS::request&& req, rpc_context context); REPORT_PEER_SS_STATUS::response invoke(REPORT_PEER_SS_STATUS::request&& req, rpc_context context);
@ -273,7 +273,7 @@ namespace cryptonote::rpc {
LNS_RESOLVE::response invoke(LNS_RESOLVE::request&& req, rpc_context context); LNS_RESOLVE::response invoke(LNS_RESOLVE::request&& req, rpc_context context);
FLUSH_CACHE::response invoke(FLUSH_CACHE::request&& req, rpc_context); FLUSH_CACHE::response invoke(FLUSH_CACHE::request&& req, rpc_context);
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) #if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
void on_relay_uptime_and_votes() void on_relay_uptime_and_votes()
{ {
m_core.submit_uptime_proof(); m_core.submit_uptime_proof();

View File

@ -1216,7 +1216,7 @@ KV_SERIALIZE_MAP_CODE_BEGIN(STORAGE_SERVER_PING::request)
KV_SERIALIZE_MAP_CODE_END() KV_SERIALIZE_MAP_CODE_END()
KV_SERIALIZE_MAP_CODE_BEGIN(LOKINET_PING::request) KV_SERIALIZE_MAP_CODE_BEGIN(OXENNET_PING::request)
KV_SERIALIZE(version); KV_SERIALIZE(version);
KV_SERIALIZE_MAP_CODE_END() KV_SERIALIZE_MAP_CODE_END()

View File

@ -133,7 +133,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the node's current height. // Get the node's current height.
struct GET_HEIGHT : PUBLIC, LEGACY struct GET_HEIGHT : PUBLIC, LEGACY
{ {
@ -153,7 +153,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get all blocks info. Binary request. // Get all blocks info. Binary request.
struct GET_BLOCKS_FAST : PUBLIC, BINARY struct GET_BLOCKS_FAST : PUBLIC, BINARY
{ {
@ -198,7 +198,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get blocks by height. Binary request. // Get blocks by height. Binary request.
struct GET_BLOCKS_BY_HEIGHT : PUBLIC, BINARY struct GET_BLOCKS_BY_HEIGHT : PUBLIC, BINARY
{ {
@ -222,7 +222,7 @@ namespace rpc {
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the known blocks hashes which are not on the main chain. // Get the known blocks hashes which are not on the main chain.
struct GET_ALT_BLOCKS_HASHES : PUBLIC, BINARY struct GET_ALT_BLOCKS_HASHES : PUBLIC, BINARY
{ {
@ -239,7 +239,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get hashes. Binary request. // Get hashes. Binary request.
struct GET_HASHES_FAST : PUBLIC, BINARY struct GET_HASHES_FAST : PUBLIC, BINARY
{ {
@ -265,7 +265,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Look up one or more transactions by hash. // Look up one or more transactions by hash.
struct GET_TRANSACTIONS : PUBLIC, LEGACY struct GET_TRANSACTIONS : PUBLIC, LEGACY
{ {
@ -314,7 +314,7 @@ namespace rpc {
}; };
std::optional<std::string> pubkey; // The tx extra public key std::optional<std::string> pubkey; // The tx extra public key
std::optional<uint64_t> burn_amount; // The amount of LOKI that this transaction burns std::optional<uint64_t> burn_amount; // The amount of OXEN that this transaction burns
std::optional<std::string> extra_nonce; // Optional extra nonce value (in hex); will be empty if nonce is recognized as a payment id std::optional<std::string> extra_nonce; // Optional extra nonce value (in hex); will be empty if nonce is recognized as a payment id
std::optional<std::string> payment_id; // The payment ID, if present. This is either a 16 hex character (8-byte) encrypted payment id, or a 64 hex character (32-byte) deprecated, unencrypted payment ID std::optional<std::string> payment_id; // The payment ID, if present. This is either a 16 hex character (8-byte) encrypted payment id, or a 64 hex character (32-byte) deprecated, unencrypted payment ID
std::optional<uint32_t> mm_depth; // (Merge-mining) the merge-mined depth std::optional<uint32_t> mm_depth; // (Merge-mining) the merge-mined depth
@ -379,7 +379,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Check if outputs have been spent using the key image associated with the output. // Check if outputs have been spent using the key image associated with the output.
struct IS_KEY_IMAGE_SPENT : PUBLIC, LEGACY struct IS_KEY_IMAGE_SPENT : PUBLIC, LEGACY
{ {
@ -411,7 +411,7 @@ namespace rpc {
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get global outputs of transactions. Binary request. // Get global outputs of transactions. Binary request.
struct GET_TX_GLOBAL_OUTPUTS_INDEXES : PUBLIC, BINARY struct GET_TX_GLOBAL_OUTPUTS_INDEXES : PUBLIC, BINARY
{ {
@ -435,7 +435,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct get_outputs_out struct get_outputs_out
{ {
uint64_t amount; // Amount of Loki in TXID. uint64_t amount; // Amount of Loki in TXID.
@ -444,7 +444,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get outputs. Binary request. // Get outputs. Binary request.
struct GET_OUTPUTS_BIN : PUBLIC, BINARY struct GET_OUTPUTS_BIN : PUBLIC, BINARY
{ {
@ -482,7 +482,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct GET_OUTPUTS : PUBLIC, LEGACY struct GET_OUTPUTS : PUBLIC, LEGACY
{ {
static constexpr auto names() { return NAMES("get_outs"); } static constexpr auto names() { return NAMES("get_outs"); }
@ -519,7 +519,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Broadcast a raw transaction to the network. // Broadcast a raw transaction to the network.
struct SEND_RAW_TX : PUBLIC, LEGACY struct SEND_RAW_TX : PUBLIC, LEGACY
{ {
@ -549,7 +549,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Start mining on the daemon. // Start mining on the daemon.
struct START_MINING : LEGACY struct START_MINING : LEGACY
{ {
@ -568,7 +568,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Stop mining on the daemon. // Stop mining on the daemon.
struct STOP_MINING : LEGACY struct STOP_MINING : LEGACY
{ {
@ -578,7 +578,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the mining status of the daemon. // Get the mining status of the daemon.
struct MINING_STATUS : LEGACY struct MINING_STATUS : LEGACY
{ {
@ -601,7 +601,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Retrieve general information about the state of your node and the network. // Retrieve general information about the state of your node and the network.
// Note that all of the std::optional<> fields here are not included if the request is a public // Note that all of the std::optional<> fields here are not included if the request is a public
// (restricted) RPC request. // (restricted) RPC request.
@ -657,7 +657,7 @@ namespace rpc {
}; };
//----------------------------------------------- //-----------------------------------------------
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct GET_NET_STATS : LEGACY struct GET_NET_STATS : LEGACY
{ {
static constexpr auto names() { return NAMES("get_net_stats"); } static constexpr auto names() { return NAMES("get_net_stats"); }
@ -677,7 +677,7 @@ namespace rpc {
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Save the blockchain. The blockchain does not need saving and is always saved when modified, // Save the blockchain. The blockchain does not need saving and is always saved when modified,
// however it does a sync to flush the filesystem cache onto the disk for safety purposes against Operating System or Hardware crashes. // however it does a sync to flush the filesystem cache onto the disk for safety purposes against Operating System or Hardware crashes.
struct SAVE_BC : LEGACY struct SAVE_BC : LEGACY
@ -688,7 +688,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Look up how many blocks are in the longest chain known to the node. // Look up how many blocks are in the longest chain known to the node.
struct GETBLOCKCOUNT : PUBLIC struct GETBLOCKCOUNT : PUBLIC
{ {
@ -704,7 +704,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Look up a block's hash by its height. // Look up a block's hash by its height.
struct GETBLOCKHASH : PUBLIC struct GETBLOCKHASH : PUBLIC
{ {
@ -721,7 +721,7 @@ namespace rpc {
using response = std::string; // Block hash (string). using response = std::string; // Block hash (string).
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get a block template on which mining a new block. // Get a block template on which mining a new block.
struct GETBLOCKTEMPLATE : PUBLIC struct GETBLOCKTEMPLATE : PUBLIC
{ {
@ -755,7 +755,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Submit a mined block to the network. // Submit a mined block to the network.
struct SUBMITBLOCK : PUBLIC struct SUBMITBLOCK : PUBLIC
{ {
@ -771,7 +771,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Developer only. // Developer only.
struct GENERATEBLOCKS : RPC_COMMAND struct GENERATEBLOCKS : RPC_COMMAND
{ {
@ -797,7 +797,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct block_header_response struct block_header_response
{ {
uint8_t major_version; // The major version of the oxen protocol at this block height. uint8_t major_version; // The major version of the oxen protocol at this block height.
@ -811,8 +811,8 @@ namespace rpc {
std::string hash; // The hash of this block. std::string hash; // The hash of this block.
difficulty_type difficulty; // The strength of the Loki network based on mining power. difficulty_type difficulty; // The strength of the Loki network based on mining power.
difficulty_type cumulative_difficulty; // The cumulative strength of the Loki network based on mining power. difficulty_type cumulative_difficulty; // The cumulative strength of the Loki network based on mining power.
uint64_t reward; // The amount of new generated in this block and rewarded to the miner, foundation and service Nodes. Note: 1 LOKI = 1e9 atomic units. uint64_t reward; // The amount of new generated in this block and rewarded to the miner, foundation and service Nodes. Note: 1 OXEN = 1e9 atomic units.
uint64_t miner_reward; // The amount of new generated in this block and rewarded to the miner. Note: 1 LOKI = 1e9 atomic units. uint64_t miner_reward; // The amount of new generated in this block and rewarded to the miner. Note: 1 OXEN = 1e9 atomic units.
uint64_t block_size; // The block size in bytes. uint64_t block_size; // The block size in bytes.
uint64_t block_weight; // The block weight in bytes. uint64_t block_weight; // The block weight in bytes.
uint64_t num_txes; // Number of transactions in the block, not counting the coinbase tx. uint64_t num_txes; // Number of transactions in the block, not counting the coinbase tx.
@ -825,7 +825,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Block header information for the most recent block is easily retrieved with this method. No inputs are needed. // Block header information for the most recent block is easily retrieved with this method. No inputs are needed.
struct GET_LAST_BLOCK_HEADER : PUBLIC struct GET_LAST_BLOCK_HEADER : PUBLIC
{ {
@ -849,7 +849,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Block header information can be retrieved using either a block's hash or height. This method includes a block's hash as an input parameter to retrieve basic information about the block. // Block header information can be retrieved using either a block's hash or height. This method includes a block's hash as an input parameter to retrieve basic information about the block.
struct GET_BLOCK_HEADER_BY_HASH : PUBLIC struct GET_BLOCK_HEADER_BY_HASH : PUBLIC
{ {
@ -876,7 +876,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Similar to get_block_header_by_hash above, this method includes a block's height as an input parameter to retrieve basic information about the block. // Similar to get_block_header_by_hash above, this method includes a block's height as an input parameter to retrieve basic information about the block.
struct GET_BLOCK_HEADER_BY_HEIGHT : PUBLIC struct GET_BLOCK_HEADER_BY_HEIGHT : PUBLIC
{ {
@ -903,7 +903,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Full block information can be retrieved by either block height or hash, like with the above block header calls. // Full block information can be retrieved by either block height or hash, like with the above block header calls.
// For full block information, both lookups use the same method, but with different input parameters. // For full block information, both lookups use the same method, but with different input parameters.
struct GET_BLOCK : PUBLIC struct GET_BLOCK : PUBLIC
@ -932,7 +932,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the known peers list. // Get the known peers list.
struct GET_PEER_LIST : LEGACY struct GET_PEER_LIST : LEGACY
{ {
@ -979,7 +979,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct public_node struct public_node
{ {
std::string host; std::string host;
@ -992,7 +992,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Query the daemon's peerlist and retrieve peers who have set their public rpc port. // Query the daemon's peerlist and retrieve peers who have set their public rpc port.
struct GET_PUBLIC_NODES : PUBLIC struct GET_PUBLIC_NODES : PUBLIC
{ {
@ -1016,7 +1016,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Set the log hash rate display mode. // Set the log hash rate display mode.
struct SET_LOG_HASH_RATE : LEGACY struct SET_LOG_HASH_RATE : LEGACY
{ {
@ -1032,7 +1032,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Set the daemon log level. By default, log level is set to `0`. For more fine-tuned logging // Set the daemon log level. By default, log level is set to `0`. For more fine-tuned logging
// control set the set_log_categories command instead. // control set the set_log_categories command instead.
struct SET_LOG_LEVEL : LEGACY struct SET_LOG_LEVEL : LEGACY
@ -1049,7 +1049,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Set the daemon log categories. Categories are represented as a comma separated list of `<Category>:<level>` (similarly to syslog standard `<Facility>:<Severity-level>`), where: // Set the daemon log categories. Categories are represented as a comma separated list of `<Category>:<level>` (similarly to syslog standard `<Facility>:<Severity-level>`), where:
// Category is one of the following: * (all facilities), default, net, net.http, net.p2p, logging, net.trottle, blockchain.db, blockchain.db.lmdb, bcutil, checkpoints, net.dns, net.dl, // Category is one of the following: * (all facilities), default, net, net.http, net.p2p, logging, net.trottle, blockchain.db, blockchain.db.lmdb, bcutil, checkpoints, net.dns, net.dl,
// i18n, perf,stacktrace, updates, account, cn ,difficulty, hardfork, miner, blockchain, txpool, cn.block_queue, net.cn, daemon, debugtools.deserialize, debugtools.objectsizes, device.ledger, // i18n, perf,stacktrace, updates, account, cn ,difficulty, hardfork, miner, blockchain, txpool, cn.block_queue, net.cn, daemon, debugtools.deserialize, debugtools.objectsizes, device.ledger,
@ -1083,7 +1083,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct tx_info struct tx_info
{ {
std::string id_hash; // The transaction ID hash. std::string id_hash; // The transaction ID hash.
@ -1109,7 +1109,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct spent_key_image_info struct spent_key_image_info
{ {
std::string id_hash; // Key image. std::string id_hash; // Key image.
@ -1118,7 +1118,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Show information about valid transactions seen by the node but not yet mined into a block, // Show information about valid transactions seen by the node but not yet mined into a block,
// as well as spent key image information for the txpool in the node's memory. // as well as spent key image information for the txpool in the node's memory.
struct GET_TRANSACTION_POOL : PUBLIC, LEGACY struct GET_TRANSACTION_POOL : PUBLIC, LEGACY
@ -1144,7 +1144,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get hashes from transaction pool. Binary request. // Get hashes from transaction pool. Binary request.
struct GET_TRANSACTION_POOL_HASHES_BIN : PUBLIC, BINARY struct GET_TRANSACTION_POOL_HASHES_BIN : PUBLIC, BINARY
{ {
@ -1170,7 +1170,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get hashes from transaction pool. // Get hashes from transaction pool.
struct GET_TRANSACTION_POOL_HASHES : PUBLIC, LEGACY struct GET_TRANSACTION_POOL_HASHES : PUBLIC, LEGACY
{ {
@ -1187,7 +1187,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct tx_backlog_entry struct tx_backlog_entry
{ {
uint64_t weight; // uint64_t weight; //
@ -1195,7 +1195,7 @@ namespace rpc {
uint64_t time_in_pool; uint64_t time_in_pool;
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get all transaction pool backlog. // Get all transaction pool backlog.
struct GET_TRANSACTION_POOL_BACKLOG : PUBLIC struct GET_TRANSACTION_POOL_BACKLOG : PUBLIC
{ {
@ -1213,7 +1213,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct txpool_histo struct txpool_histo
{ {
uint32_t txs; // Number of transactions. uint32_t txs; // Number of transactions.
@ -1222,7 +1222,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct txpool_stats struct txpool_stats
{ {
uint64_t bytes_total; // Total size of all transactions in pool. uint64_t bytes_total; // Total size of all transactions in pool.
@ -1244,7 +1244,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the transaction pool statistics. // Get the transaction pool statistics.
struct GET_TRANSACTION_POOL_STATS : PUBLIC, LEGACY struct GET_TRANSACTION_POOL_STATS : PUBLIC, LEGACY
{ {
@ -1262,7 +1262,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Retrieve information about incoming and outgoing connections to your node. // Retrieve information about incoming and outgoing connections to your node.
struct GET_CONNECTIONS : RPC_COMMAND struct GET_CONNECTIONS : RPC_COMMAND
{ {
@ -1279,7 +1279,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Similar to get_block_header_by_height above, but for a range of blocks. // Similar to get_block_header_by_height above, but for a range of blocks.
// This method includes a starting block height and an ending block height as // This method includes a starting block height and an ending block height as
// parameters to retrieve basic information about the range of blocks. // parameters to retrieve basic information about the range of blocks.
@ -1307,7 +1307,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Set the bootstrap daemon to use for data on the blockchain whilst syncing the chain. // Set the bootstrap daemon to use for data on the blockchain whilst syncing the chain.
struct SET_BOOTSTRAP_DAEMON : RPC_COMMAND struct SET_BOOTSTRAP_DAEMON : RPC_COMMAND
{ {
@ -1325,7 +1325,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Send a command to the daemon to safely disconnect and shut down. // Send a command to the daemon to safely disconnect and shut down.
struct STOP_DAEMON : LEGACY struct STOP_DAEMON : LEGACY
{ {
@ -1335,7 +1335,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get daemon bandwidth limits. // Get daemon bandwidth limits.
struct GET_LIMIT : LEGACY struct GET_LIMIT : LEGACY
{ {
@ -1354,7 +1354,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Set daemon bandwidth limits. // Set daemon bandwidth limits.
struct SET_LIMIT : LEGACY struct SET_LIMIT : LEGACY
{ {
@ -1378,7 +1378,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Limit number of Outgoing peers. // Limit number of Outgoing peers.
struct OUT_PEERS : LEGACY struct OUT_PEERS : LEGACY
{ {
@ -1398,7 +1398,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Limit number of Incoming peers. // Limit number of Incoming peers.
struct IN_PEERS : LEGACY struct IN_PEERS : LEGACY
{ {
@ -1418,7 +1418,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Look up information regarding hard fork voting and readiness. // Look up information regarding hard fork voting and readiness.
struct HARD_FORK_INFO : PUBLIC struct HARD_FORK_INFO : PUBLIC
{ {
@ -1448,7 +1448,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get list of banned IPs. // Get list of banned IPs.
struct GETBANS : RPC_COMMAND struct GETBANS : RPC_COMMAND
{ {
@ -1474,7 +1474,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Ban another node by IP. // Ban another node by IP.
struct SETBANS : RPC_COMMAND struct SETBANS : RPC_COMMAND
{ {
@ -1500,7 +1500,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Determine whether a given IP address is banned // Determine whether a given IP address is banned
struct BANNED : RPC_COMMAND struct BANNED : RPC_COMMAND
{ {
@ -1523,7 +1523,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Flush tx ids from transaction pool.. // Flush tx ids from transaction pool..
struct FLUSH_TRANSACTION_POOL : RPC_COMMAND struct FLUSH_TRANSACTION_POOL : RPC_COMMAND
{ {
@ -1539,7 +1539,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get a histogram of output amounts. For all amounts (possibly filtered by parameters), // Get a histogram of output amounts. For all amounts (possibly filtered by parameters),
// gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount. // gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.
struct GET_OUTPUT_HISTOGRAM : PUBLIC struct GET_OUTPUT_HISTOGRAM : PUBLIC
@ -1581,7 +1581,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get current RPC protocol version. // Get current RPC protocol version.
struct GET_VERSION : PUBLIC struct GET_VERSION : PUBLIC
{ {
@ -1599,7 +1599,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the coinbase amount and the fees amount for n last blocks starting at particular height. // Get the coinbase amount and the fees amount for n last blocks starting at particular height.
struct GET_COINBASE_TX_SUM : RPC_COMMAND struct GET_COINBASE_TX_SUM : RPC_COMMAND
{ {
@ -1624,7 +1624,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Gives an estimation of per-output + per-byte fees // Gives an estimation of per-output + per-byte fees
struct GET_BASE_FEE_ESTIMATE : PUBLIC struct GET_BASE_FEE_ESTIMATE : PUBLIC
{ {
@ -1652,7 +1652,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Display alternative chains seen by the node. // Display alternative chains seen by the node.
struct GET_ALTERNATE_CHAINS : RPC_COMMAND struct GET_ALTERNATE_CHAINS : RPC_COMMAND
{ {
@ -1681,7 +1681,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Relay a list of transaction IDs. // Relay a list of transaction IDs.
struct RELAY_TX : RPC_COMMAND struct RELAY_TX : RPC_COMMAND
{ {
@ -1697,7 +1697,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get synchronisation information. // Get synchronisation information.
struct SYNC_INFO : RPC_COMMAND struct SYNC_INFO : RPC_COMMAND
{ {
@ -1747,7 +1747,7 @@ namespace rpc {
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct GET_OUTPUT_DISTRIBUTION : PUBLIC struct GET_OUTPUT_DISTRIBUTION : PUBLIC
{ {
static constexpr auto names() { return NAMES("get_output_distribution"); } static constexpr auto names() { return NAMES("get_output_distribution"); }
@ -1785,7 +1785,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Exactly like GET_OUTPUT_DISTRIBUTION, but does a binary RPC transfer instead of JSON // Exactly like GET_OUTPUT_DISTRIBUTION, but does a binary RPC transfer instead of JSON
struct GET_OUTPUT_DISTRIBUTION_BIN : PUBLIC, BINARY struct GET_OUTPUT_DISTRIBUTION_BIN : PUBLIC, BINARY
{ {
@ -1795,7 +1795,7 @@ namespace rpc {
using response = GET_OUTPUT_DISTRIBUTION::response; using response = GET_OUTPUT_DISTRIBUTION::response;
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct POP_BLOCKS : LEGACY struct POP_BLOCKS : LEGACY
{ {
static constexpr auto names() { return NAMES("pop_blocks"); } static constexpr auto names() { return NAMES("pop_blocks"); }
@ -1816,7 +1816,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct PRUNE_BLOCKCHAIN : RPC_COMMAND struct PRUNE_BLOCKCHAIN : RPC_COMMAND
{ {
static constexpr auto names() { return NAMES("prune_blockchain"); } static constexpr auto names() { return NAMES("prune_blockchain"); }
@ -1839,7 +1839,7 @@ namespace rpc {
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Accesses the list of public keys of the nodes who are participating or being tested in a quorum. // Accesses the list of public keys of the nodes who are participating or being tested in a quorum.
struct GET_QUORUM_STATE : PUBLIC struct GET_QUORUM_STATE : PUBLIC
{ {
@ -1895,7 +1895,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct GET_SERVICE_NODE_REGISTRATION_CMD_RAW : RPC_COMMAND struct GET_SERVICE_NODE_REGISTRATION_CMD_RAW : RPC_COMMAND
{ {
static constexpr auto names() { return NAMES("get_service_node_registration_cmd_raw"); } static constexpr auto names() { return NAMES("get_service_node_registration_cmd_raw"); }
@ -1918,7 +1918,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct GET_SERVICE_NODE_REGISTRATION_CMD : RPC_COMMAND struct GET_SERVICE_NODE_REGISTRATION_CMD : RPC_COMMAND
{ {
static constexpr auto names() { return NAMES("get_service_node_registration_cmd"); } static constexpr auto names() { return NAMES("get_service_node_registration_cmd"); }
@ -1943,7 +1943,7 @@ namespace rpc {
using response = GET_SERVICE_NODE_REGISTRATION_CMD_RAW::response; using response = GET_SERVICE_NODE_REGISTRATION_CMD_RAW::response;
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the service public keys of the queried daemon, encoded in hex. All three keys are used // Get the service public keys of the queried daemon, encoded in hex. All three keys are used
// when running as a service node; when running as a regular node only the x25519 key is regularly // when running as a service node; when running as a regular node only the x25519 key is regularly
// used for some RPC and and node-to-SN communication requests. // used for some RPC and and node-to-SN communication requests.
@ -1964,7 +1964,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the service private keys of the queried daemon, encoded in hex. Do not ever share // Get the service private keys of the queried daemon, encoded in hex. Do not ever share
// these keys: they would allow someone to impersonate your service node. All three keys are used // these keys: they would allow someone to impersonate your service node. All three keys are used
// when running as a service node; when running as a regular node only the x25519 key is regularly // when running as a service node; when running as a regular node only the x25519 key is regularly
@ -1986,7 +1986,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// TODO: Undocumented, -- unused // TODO: Undocumented, -- unused
struct PERFORM_BLOCKCHAIN_TEST : RPC_COMMAND struct PERFORM_BLOCKCHAIN_TEST : RPC_COMMAND
{ {
@ -2009,7 +2009,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct service_node_contribution struct service_node_contribution
{ {
std::string key_image; // The contribution's key image that is locked on the network. std::string key_image; // The contribution's key image that is locked on the network.
@ -2019,7 +2019,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct service_node_contributor struct service_node_contributor
{ {
uint64_t amount; // The total amount of locked Loki in atomic units for this contributor. uint64_t amount; // The total amount of locked Loki in atomic units for this contributor.
@ -2030,7 +2030,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE KV_MAP_SERIALIZABLE
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get information on some, all, or a random subset of Service Nodes. // Get information on some, all, or a random subset of Service Nodes.
struct GET_SERVICE_NODES : PUBLIC struct GET_SERVICE_NODES : PUBLIC
{ {
@ -2149,7 +2149,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get information on the queried daemon's Service Node state. // Get information on the queried daemon's Service Node state.
struct GET_SERVICE_NODE_STATUS : RPC_COMMAND struct GET_SERVICE_NODE_STATUS : RPC_COMMAND
{ {
@ -2174,7 +2174,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct STORAGE_SERVER_PING : RPC_COMMAND struct STORAGE_SERVER_PING : RPC_COMMAND
{ {
static constexpr auto names() { return NAMES("storage_server_ping"); } static constexpr auto names() { return NAMES("storage_server_ping"); }
@ -2191,8 +2191,8 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct LOKINET_PING : RPC_COMMAND struct OXENNET_PING : RPC_COMMAND
{ {
static constexpr auto names() { return NAMES("oxennet_ping"); } static constexpr auto names() { return NAMES("oxennet_ping"); }
@ -2205,7 +2205,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the required amount of Loki to become a Service Node at the queried height. // Get the required amount of Loki to become a Service Node at the queried height.
// For devnet and testnet values, ensure the daemon is started with the // For devnet and testnet values, ensure the daemon is started with the
// `--devnet` or `--testnet` flags respectively. // `--devnet` or `--testnet` flags respectively.
@ -2230,7 +2230,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get information on blacklisted Service Node key images. // Get information on blacklisted Service Node key images.
struct GET_SERVICE_NODE_BLACKLISTED_KEY_IMAGES : PUBLIC struct GET_SERVICE_NODE_BLACKLISTED_KEY_IMAGES : PUBLIC
{ {
@ -2256,7 +2256,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get information on output blacklist. // Get information on output blacklist.
struct GET_OUTPUT_BLACKLIST : PUBLIC, BINARY struct GET_OUTPUT_BLACKLIST : PUBLIC, BINARY
{ {
@ -2274,7 +2274,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Query hardcoded/service node checkpoints stored for the blockchain. Omit all arguments to retrieve the latest "count" checkpoints. // Query hardcoded/service node checkpoints stored for the blockchain. Omit all arguments to retrieve the latest "count" checkpoints.
struct GET_CHECKPOINTS : PUBLIC struct GET_CHECKPOINTS : PUBLIC
{ {
@ -2354,7 +2354,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Query hardcoded/service node checkpoints stored for the blockchain. Omit all arguments to retrieve the latest "count" checkpoints. // Query hardcoded/service node checkpoints stored for the blockchain. Omit all arguments to retrieve the latest "count" checkpoints.
struct GET_SN_STATE_CHANGES : PUBLIC struct GET_SN_STATE_CHANGES : PUBLIC
{ {
@ -2387,7 +2387,7 @@ namespace rpc {
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
struct REPORT_PEER_SS_STATUS : RPC_COMMAND struct REPORT_PEER_SS_STATUS : RPC_COMMAND
{ {
static constexpr auto names() { return NAMES("report_peer_storage_server_status"); } static constexpr auto names() { return NAMES("report_peer_storage_server_status"); }
@ -2421,7 +2421,7 @@ namespace rpc {
struct response : STATUS {}; struct response : STATUS {};
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get the name mapping for a Loki Name Service entry. Loki currently supports mappings // Get the name mapping for a Loki Name Service entry. Loki currently supports mappings
// for Session and Lokinet. // for Session and Lokinet.
struct LNS_NAMES_TO_OWNERS : PUBLIC struct LNS_NAMES_TO_OWNERS : PUBLIC
@ -2470,7 +2470,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Get all the name mappings for the queried owner. The owner can be either a ed25519 public key or Monero style // Get all the name mappings for the queried owner. The owner can be either a ed25519 public key or Monero style
// public key; by default purchases are owned by the spend public key of the purchasing wallet. // public key; by default purchases are owned by the spend public key of the purchasing wallet.
struct LNS_OWNERS_TO_NAMES : PUBLIC struct LNS_OWNERS_TO_NAMES : PUBLIC
@ -2510,7 +2510,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Performs a simple LNS lookup of a BLAKE2b-hashed name. This RPC method is meant for simple, // Performs a simple LNS lookup of a BLAKE2b-hashed name. This RPC method is meant for simple,
// single-value resolutions that do not care about registration details, etc.; if you need more // single-value resolutions that do not care about registration details, etc.; if you need more
// information use LNS_NAMES_TO_OWNERS instead. // information use LNS_NAMES_TO_OWNERS instead.
@ -2550,7 +2550,7 @@ namespace rpc {
}; };
}; };
LOKI_RPC_DOC_INTROSPECT OXEN_RPC_DOC_INTROSPECT
// Clear TXs from the daemon cache, currently only the cache storing TX hashes that were previously verified bad by the daemon. // Clear TXs from the daemon cache, currently only the cache storing TX hashes that were previously verified bad by the daemon.
struct FLUSH_CACHE : RPC_COMMAND struct FLUSH_CACHE : RPC_COMMAND
{ {
@ -2640,7 +2640,7 @@ namespace rpc {
GET_SERVICE_NODES, GET_SERVICE_NODES,
GET_SERVICE_NODE_STATUS, GET_SERVICE_NODE_STATUS,
STORAGE_SERVER_PING, STORAGE_SERVER_PING,
LOKINET_PING, OXENNET_PING,
GET_STAKING_REQUIREMENT, GET_STAKING_REQUIREMENT,
GET_SERVICE_NODE_BLACKLISTED_KEY_IMAGES, GET_SERVICE_NODE_BLACKLISTED_KEY_IMAGES,
GET_OUTPUT_BLACKLIST, GET_OUTPUT_BLACKLIST,

View File

@ -5,8 +5,8 @@
#include "common/string_util.h" #include "common/string_util.h"
#include "cpr/ssl_options.h" #include "cpr/ssl_options.h"
#undef LOKI_DEFAULT_LOG_CATEGORY #undef OXEN_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "rpc.http_client" #define OXEN_DEFAULT_LOG_CATEGORY "rpc.http_client"
namespace cryptonote::rpc { namespace cryptonote::rpc {

Some files were not shown because too many files have changed in this diff Show More