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:
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "macOS deployment target (Apple clang only)")
project(loki
project(oxen
VERSION 8.1.4
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
# 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
# arguments) where it makes sense to take some other branch release with an extra value.
if(NOT DEFINED LOKI_RELEASE_SUFFIX)
set(LOKI_RELEASE_SUFFIX "")
if(NOT DEFINED OXEN_RELEASE_SUFFIX)
set(OXEN_RELEASE_SUFFIX "")
endif()
if(POLICY CMP0079)
@ -857,7 +857,7 @@ if (WIN32)
endif()
if (BUILD_INTEGRATION)
target_compile_definitions(extra INTERFACE LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
target_compile_definitions(extra INTERFACE OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
else()
option(USE_READLINE "Build with GNU readline support." ON)
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()
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)
if (LOKI_DEBUG_SHORT_PROOFS)
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 (OXEN_DEBUG_SHORT_PROOFS)
add_definitions(-DUPTIME_PROOF_BASE_MINUTE=3) # 20x faster uptime proofs
endif()
@ -958,11 +958,11 @@ endif()
# 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
# there is also a `make strip_binaries_all` target.)
get_property(loki_exec_tgts_all GLOBAL PROPERTY loki_executable_targets)
set(loki_exec_tgts "")
get_property(oxen_exec_tgts_all GLOBAL PROPERTY oxen_executable_targets)
set(oxen_exec_tgts "")
set(strip_binaries "")
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}>)
# Look for a EXCLUDE_FROM_ALL property:
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_excl_all DIRECTORY ${tgt_dir} PROPERTY EXCLUDE_FROM_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}>)
endif()
endforeach()
add_custom_target(strip_binaries ${strip_binaries} DEPENDS ${loki_exec_tgts})
add_custom_target(strip_binaries_all ${strip_binaries_all} DEPENDS ${loki_exec_tgts_all})
add_custom_target(strip_binaries ${strip_binaries} DEPENDS ${oxen_exec_tgts})
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)
set(git_tag "-unknown")
@ -1017,17 +1017,17 @@ elseif(tar_os STREQUAL "Windows")
endif()
set(default_archive create_zip) # .tar.xz files are too scary for Windows users
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
COMMAND ${CMAKE_COMMAND} -E rename bin "${tar_dir}"
COMMAND ${CMAKE_COMMAND} -E tar cvJ "${tar_dir}.tar.xz" -- "${tar_dir}"
COMMAND ${CMAKE_COMMAND} -E rename "${tar_dir}" bin
DEPENDS ${loki_exec_tgts})
DEPENDS ${oxen_exec_tgts})
add_custom_target(create_zip
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 rename "${tar_dir}" bin
DEPENDS ${loki_exec_tgts})
DEPENDS ${oxen_exec_tgts})
add_custom_target(create_archive DEPENDS ${default_archive})

View File

@ -44,8 +44,8 @@ function (enable_stack_trace target)
endif()
endfunction()
set_property(GLOBAL PROPERTY loki_executable_targets "")
function (loki_add_executable target binary)
set_property(GLOBAL PROPERTY oxen_executable_targets "")
function (oxen_add_executable target binary)
add_executable("${target}" ${ARGN})
target_link_libraries("${target}" PRIVATE extra)
enable_stack_trace("${target}")
@ -53,9 +53,9 @@ function (loki_add_executable target binary)
OUTPUT_NAME "${binary}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/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}")
set_property(GLOBAL PROPERTY loki_executable_targets "${exec_tgt}")
set_property(GLOBAL PROPERTY oxen_executable_targets "${exec_tgt}")
endfunction ()
include(Version)

View File

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

View File

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

View File

@ -37,7 +37,7 @@ target_link_libraries(blockchain_tools_common_libs INTERFACE
extra)
loki_add_executable(blockchain_import "loki-blockchain-import"
oxen_add_executable(blockchain_import "oxen-blockchain-import"
blockchain_import.cpp
bootstrap_file.cpp
blocksdat_file.cpp
@ -51,7 +51,7 @@ if(ARCH_WIDTH)
target_compile_definitions(blockchain_import PRIVATE ARCH_WIDTH=${ARCH_WIDTH})
endif()
loki_add_executable(blockchain_export "loki-blockchain-export"
oxen_add_executable(blockchain_export "oxen-blockchain-export"
blockchain_export.cpp
bootstrap_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)
loki_add_executable(blockchain_blackball "loki-blockchain-mark-spent-outputs"
oxen_add_executable(blockchain_blackball "oxen-blockchain-mark-spent-outputs"
blockchain_blackball.cpp
)
@ -69,28 +69,28 @@ target_link_libraries(blockchain_blackball
wallet)
loki_add_executable(blockchain_usage "loki-blockchain-usage"
oxen_add_executable(blockchain_usage "oxen-blockchain-usage"
blockchain_usage.cpp
)
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
)
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
)
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
)
target_link_libraries(blockchain_stats PRIVATE blockchain_tools_common_libs)
# TODO(loki): Blockchain pruning not supported in Loki yet
# loki_add_executable(blockchain_prune_known_spent_data "loki-blockchain-prune-known-spent-data"
# TODO(oxen): Blockchain pruning not supported in Oxen yet
# oxen_add_executable(blockchain_prune_known_spent_data "oxen-blockchain-prune-known-spent-data"
# blockchain_prune_known_spent_data.cpp
# )
#
@ -99,7 +99,7 @@ target_link_libraries(blockchain_stats PRIVATE blockchain_tools_common_libs)
# blockchain_tools_common_libs
# p2p)
#
# loki_add_executable(blockchain_prune "loki-blockchain-prune"
# oxen_add_executable(blockchain_prune "oxen-blockchain-prune"
# blockchain_prune.cpp
# )
#
@ -109,8 +109,8 @@ target_link_libraries(blockchain_stats PRIVATE blockchain_tools_common_libs)
# p2p)
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)
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()

View File

@ -1,4 +1,4 @@
# Loki Blockchain Utilities
# Oxen Blockchain Utilities
Copyright (c) 2014-2019, The Monero Project
Copyright (c) 2018, The Loki Project
@ -15,13 +15,13 @@ See also each utility's "--help" option.
`$ 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
`$ 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.
Defaults: `--batch on`, `--batch size 20000`, `--verify on`

View File

@ -46,8 +46,8 @@
#include "blockchain_db/blockchain_db.h"
#include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options;
using namespace cryptonote;
@ -383,7 +383,7 @@ int main(int argc, char* argv[])
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;
return 1;
}

View File

@ -46,8 +46,8 @@
#include "wallet/ringdb.h"
#include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options;
using namespace cryptonote;
@ -248,7 +248,7 @@ static void init(fs::path cache_filename)
dbr = mdb_txn_begin(env, NULL, 0, &txn);
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;
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);
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;
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);
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;
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 v[2];
LOKI_DEFER {
OXEN_DEFER {
for (int i = 0; i < 2; 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);
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;
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);
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;
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);
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;
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_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<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 = {
"db-sync-mode"
, "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))
{
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;
return 1;
}

View File

@ -33,8 +33,8 @@
#include "blockchain_db/blockchain_db.h"
#include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options;
using namespace cryptonote;
@ -83,7 +83,7 @@ int main(int argc, char* argv[])
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;
return 1;
}

View File

@ -34,8 +34,8 @@
#include "blockchain_objects.h"
#include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
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))
{
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;
return 1;
}

View File

@ -44,8 +44,8 @@
#include "cryptonote_core/cryptonote_core.h"
#include "common/hex.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace
{
@ -603,7 +603,7 @@ int main(int argc, char* argv[])
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;
return 1;
}

View File

@ -39,8 +39,8 @@
#include "blockchain_objects.h"
#include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
#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);
LOKI_DEFER {
OXEN_DEFER {
if (tx_active1) mdb_txn_abort(txn1);
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");
LOKI_DEFER {
OXEN_DEFER {
if (tx_active1) mdb_txn_abort(txn1);
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))
{
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;
return 1;
}

View File

@ -37,8 +37,8 @@
#include "blockchain_db/blockchain_db.h"
#include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options;
using namespace cryptonote;
@ -145,7 +145,7 @@ int main(int argc, char* argv[])
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;
return 1;
}

View File

@ -37,8 +37,8 @@
#include "version.h"
#include "epee/misc_os_dependent.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options;
using namespace cryptonote;
@ -97,7 +97,7 @@ int main(int argc, char* argv[])
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;
return 1;
}
@ -160,7 +160,7 @@ int main(int argc, char* argv[])
/*
* The default output can be plotted with GnuPlot using these commands:
set key autotitle columnhead
set title "Loki Blockchain Growth"
set title "Oxen Blockchain Growth"
set timefmt "%Y-%m-%d"
set xdata time
set xrange ["2014-04-17":*]

View File

@ -34,8 +34,8 @@
#include "blockchain_db/blockchain_db.h"
#include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options;
using namespace cryptonote;
@ -116,7 +116,7 @@ int main(int argc, char* argv[])
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;
return 1;
}

View File

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

View File

@ -32,8 +32,8 @@
#include "bootstrap_file.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bcutil"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bcutil"
namespace po = boost::program_options;
@ -42,7 +42,7 @@ using namespace cryptonote;
namespace
{
// 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 header_size = 1024;

View File

@ -44,7 +44,7 @@ legacy [--overwrite] FILENAME
If FILENAME already exists the command will fail unless the `--overwrite`
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
installations).
@ -158,7 +158,7 @@ int generate(bool ed25519, std::list<std::string_view> args) {
std::cout <<
"Public key: " << lokimq::to_hex(pubkey.begin(), 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 {
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) <<
"\nPublic key: " << lokimq::to_hex(pubkey.begin(), 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;
}
@ -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()))
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()) <<
"\nLokinet address: " << lokimq::to_base32z(pubkey.begin(), pubkey.end()) << ".snode";
"\nOxennet address: " << lokimq::to_base32z(pubkey.begin(), pubkey.end()) << ".snode";
}
if (pubkey_expected) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -26,16 +26,16 @@
// 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.
#ifndef LOKI_H
#define LOKI_H
#ifndef OXEN_H
#define OXEN_H
#define LOKI_HOUR(val) ((val) * LOKI_MINUTES(60))
#define LOKI_MINUTES(val) val * 60
#define OXEN_HOUR(val) ((val) * OXEN_MINUTES(60))
#define OXEN_MINUTES(val) val * 60
#include <cstddef>
#include <utility>
#define LOKI_RPC_DOC_INTROSPECT
#define OXEN_RPC_DOC_INTROSPECT
namespace oxen
{
double round (double);
@ -69,9 +69,9 @@ struct defer_helper
deferred<lambda_t> operator+(lambda_t lambda) { return lambda; }
};
#define LOKI_TOKEN_COMBINE2(x, y) x ## y
#define LOKI_TOKEN_COMBINE(x, y) LOKI_TOKEN_COMBINE2(x, y)
#define LOKI_DEFER auto const LOKI_TOKEN_COMBINE(oxen_defer_, __LINE__) = oxen::defer_helper() + [&]()
#define OXEN_TOKEN_COMBINE2(x, y) x ## y
#define OXEN_TOKEN_COMBINE(x, y) OXEN_TOKEN_COMBINE2(x, y)
#define OXEN_DEFER auto const OXEN_TOKEN_COMBINE(oxen_defer_, __LINE__) = oxen::defer_helper() + [&]()
template <typename T, size_t 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>
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
#if !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
#if !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
bool is_cin_tty() noexcept
{
return 0 != isatty(fileno(stdin));
@ -177,11 +177,11 @@ namespace
return true;
}
#endif // !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
#endif // !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
#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)
{
while (true)
@ -233,7 +233,7 @@ namespace
}
return true;
}
#endif // !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
#endif // !defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
} // anonymous namespace
@ -250,7 +250,7 @@ namespace tools
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(""));
#else
is_prompting = true;

View File

@ -31,8 +31,8 @@
#include "epee/misc_os_dependent.h"
#include "perf_timer.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "perf"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "perf"
#define PERF_LOG_ALWAYS(level, 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);
#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_L(name, unit, l) tools::LoggingPerformanceTimer pt_##name(#name, "perf." LOKI_DEFAULT_LOG_CATEGORY, unit, l)
#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." OXEN_DEFAULT_LOG_CATEGORY, unit, l)
#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_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_STOP(name) do { pt_##name.reset(NULL); } while(0)
#define PERF_TIMER_PAUSE(name) pt_##name->pause()

View File

@ -1,6 +1,6 @@
#include "scoped_message_writer.h"
#define LOKI_INTEGRATION_TEST_HOOKS_IMPLEMENTATION
#define OXEN_INTEGRATION_TEST_HOOKS_IMPLEMENTATION
#include "common/oxen_integration_test_hooks.h"
// 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;
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
#if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
std::cout << m_oss.str() << "\n";
return;
#endif

View File

@ -60,7 +60,7 @@ public:
, m_bright(bright)
, 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.
#endif
m_oss << prefix;

View File

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

View File

@ -47,14 +47,14 @@
#include "common/stack_trace.h"
#include "epee/misc_log_ex.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "stacktrace"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "stacktrace"
#define ST_LOG(x) \
do { \
auto elpp = 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 { \
std::cout << x << std::endl; \

View File

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

View File

@ -47,7 +47,7 @@
#if defined(HAS_INTEL_HW) || defined(HAS_ARM_HW)
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");
}
#endif
@ -103,7 +103,7 @@ public:
}
// 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(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)
return use;
const char *env = getenv("LOKI_USE_SOFTWARE_AES");
const char *env = getenv("OXEN_USE_SOFTWARE_AES");
if (!env) {
use = 0;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -37,7 +37,7 @@
namespace cryptonote
{
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct subaddress_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_SERVICE_NODE_STATE_CHANGE = 0x78,
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;
@ -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_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_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 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_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_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_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_FEE_V5 ((uint64_t)400000000)
#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_10_bulletproofs, // Bulletproofs, Service Node Grace Registration Period, Batched Governance
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_14_blink,
network_version_15_lns,

View File

@ -70,8 +70,8 @@ extern "C" {
}
#endif
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "blockchain"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "blockchain"
#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;
#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
// overriding fork heights for any nettype in our integration tests using
// 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"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "cn"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "cn"
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_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_pipe_name);
#endif
@ -416,7 +416,7 @@ namespace cryptonote
if (!epee::net_utils::is_ip_public(m_sn_public_ip)) {
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 {
MERROR("Address given for public-ip is not public: " << epee::string_tools::get_ip_string_from_int32(m_sn_public_ip));
storage_ok = false;
@ -510,7 +510,7 @@ namespace cryptonote
{
std::string s;
s.reserve(128);
s += 'v'; s += LOKI_VERSION_STR;
s += 'v'; s += OXEN_VERSION_STR;
s += "; Height: ";
s += std::to_string(get_blockchain_storage().get_current_blockchain_height());
s += ", SN: ";
@ -552,7 +552,7 @@ namespace cryptonote
{
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);
std::vector<std::pair<uint8_t, uint64_t>> integration_test_hardforks;
@ -642,7 +642,7 @@ namespace cryptonote
bool sync_on_blocks = true;
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)
{
// reset the db by removing the database file before opening it
@ -1987,7 +1987,7 @@ namespace cryptonote
std::vector<block_complete_entry> blocks;
m_miner.pause();
{
LOKI_DEFER { m_miner.resume(); };
OXEN_DEFER { m_miner.resume(); };
try
{
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");
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(
"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_mempool.on_idle();
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
#if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
integration_test::state.core_is_idle = true;
#endif
@ -2403,7 +2403,7 @@ namespace cryptonote
return true;
}
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
#if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
MDEBUG("Not checking block rate, integration test mode");
return true;
#endif

View File

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

View File

@ -30,8 +30,8 @@ extern "C"
#include <sodium/randombytes.h>
}
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "lns"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "lns"
namespace lns
{
@ -749,8 +749,8 @@ bool validate_lns_name(mapping_type type, std::string name, std::string *reason)
if (is_oxennet)
max_name_len = name.find('-') != std::string::npos
? LOKINET_DOMAIN_NAME_MAX
: LOKINET_DOMAIN_NAME_MAX_NOHYPHEN;
? OXENNET_DOMAIN_NAME_MAX
: OXENNET_DOMAIN_NAME_MAX_NOHYPHEN;
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
@ -774,7 +774,7 @@ bool validate_lns_name(mapping_type type, std::string name, std::string *reason)
// NOTE: Validate domain specific requirements
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'
// It's *approximately* this regex, but there are some extra restrictions below
// ^[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 = {};
std::stringstream err_stream;
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::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)
{
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;
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) {
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;
default: MERROR("Invalid mapping_type passed to mapping_value::decrypt"); return false;
}

View File

@ -1,5 +1,5 @@
#ifndef LOKI_NAME_SYSTEM_H
#define LOKI_NAME_SYSTEM_H
#ifndef OXEN_NAME_SYSTEM_H
#define OXEN_NAME_SYSTEM_H
#include "crypto/crypto.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_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 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 LOKINET_ADDRESS_BINARY_LENGTH = sizeof(crypto::ed25519_public_key);
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 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 OXENNET_ADDRESS_BINARY_LENGTH = sizeof(crypto::ed25519_public_key);
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
@ -42,7 +42,7 @@ constexpr size_t SODIUM_ENCRYPTION_EXTRA_BYTES = 40; // crypto_aead_xchacha20pol
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;
bool encrypted;
size_t len;
@ -321,4 +321,4 @@ private:
};
}; // 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>
};
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "pulse"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "pulse"
// Deliberately makes pulse communications flakey for testing purposes:
//#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)
{
std::stringstream stream;
LOKI_DEFER {
OXEN_DEFER {
if (error) *error = stream.str();
};

View File

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

View File

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

View File

@ -39,8 +39,8 @@
#include "common/oxen_integration_test_hooks.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "quorum_cop"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "quorum_cop"
namespace service_nodes
{
@ -100,7 +100,7 @@ namespace service_nodes
bool check_uptime_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_checkpointing) check_checkpoint_obligation = false;
#endif
@ -257,7 +257,7 @@ namespace service_nodes
{
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_obligation_quorum && type == quorum_type::obligations) continue;
#endif
@ -438,7 +438,7 @@ namespace service_nodes
// NOTE: Don't warn uptime proofs if the daemon is just
// recently started and is candidate for testing (i.e.
// 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;
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 {
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_WAIT_FOR_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 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_MIN_VOTES_TO_CHANGE_STATE = 1;
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(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.");
#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.");
#endif
@ -212,7 +212,7 @@ namespace service_nodes {
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_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
struct proof_version

View File

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

View File

@ -43,8 +43,8 @@
#include <string>
#include <vector>
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "service_nodes"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "service_nodes"
namespace service_nodes
{
@ -590,7 +590,7 @@ namespace service_nodes
std::unique_lock lock{m_lock};
// 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;
#else
constexpr uint64_t TIME_BETWEEN_RELAY = 60 * 2;

View File

@ -50,8 +50,8 @@
#include "common/perf_timer.h"
#include "crypto/hash.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "txpool"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "txpool"
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 "tx_sanity_check.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "verify"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "verify"
namespace cryptonote
{

View File

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

View File

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

View File

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

View File

@ -53,8 +53,8 @@
#include "common/lock.h"
#include "common/util.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "net.cn"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "net.cn"
#define MLOG_P2P_MESSAGE(x) MCINFO("net.p2p.msg", context << x)
#define MLOGIF_P2P_MESSAGE(init, test, x) \
@ -69,7 +69,7 @@
} while(0)
#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
{
@ -1359,7 +1359,7 @@ namespace cryptonote
m_core.pause_mine();
m_add_timer.resume();
bool starting = true;
LOKI_DEFER
OXEN_DEFER
{
m_add_timer.pause();
m_core.resume_mine();
@ -1475,7 +1475,7 @@ namespace cryptonote
{
bool remove_spans = false;
LOKI_DEFER
OXEN_DEFER
{
if (!m_core.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 "p2p/net_node.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "net.p2p.tx"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "net.p2p.tx"
namespace cryptonote
{

View File

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

View File

@ -27,7 +27,7 @@
# 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.
loki_add_executable(daemon "lokid"
oxen_add_executable(daemon "oxend"
command_parser_executor.cpp
command_server.cpp
daemon.cpp

View File

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

View File

@ -35,12 +35,12 @@
#include "common/oxen_integration_test_hooks.h"
#if defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
#if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
#include <thread>
#endif
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "daemon"
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(
"relay_votes_and_uptime", [rpc_server](const auto&) {
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 defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
#if defined(OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
auto handle_pipe = [&]()
{
// 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::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";
m_command_lookup.for_each([&ss] (const std::string&, const std::string& usage, const std::string&) {
ss << " " << usage << "\n"; });

View File

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

View File

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

View File

@ -51,8 +51,8 @@
#include "common/stack_trace.h"
#endif // STACK_TRACE
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "daemon"
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))
{
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 << visible_options << std::endl;
return 0;
}
// Loki Version
// Oxen 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;
}
@ -213,7 +213,7 @@ int main(int argc, char const * argv[])
// logging is now set up
// 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
{
@ -252,7 +252,7 @@ int main(int argc, char const * argv[])
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;
}
catch (std::exception const & ex)

View File

@ -51,8 +51,8 @@
#include <numeric>
#include <stack>
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "daemon"
using namespace cryptonote::rpc;
@ -65,7 +65,7 @@ namespace {
{
std::cout << prompt << std::flush;
std::string result;
#if defined (LOKI_ENABLE_INTEGRATION_TEST_HOOKS)
#if defined (OXEN_ENABLE_INTEGRATION_TEST_HOOKS)
integration_test::write_buffered_stdout();
result = integration_test::read_from_pipe();
#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)
{
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;
@ -928,7 +928,7 @@ static void print_pool(const std::vector<cryptonote::rpc::tx_info> &transactions
w << "blob_size: " << tx_info.blob_size << "\n"
<< "weight: " << tx_info.weight << "\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.
/// (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"
@ -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
// mlog_set_categories(""), so emit the block message using msg writer
// 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.");
#endif
@ -1922,7 +1922,7 @@ bool rpc_command_executor::prepare_registration()
uint64_t block_height = std::max(res.height, res.target_height);
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;
#else
cryptonote::network_type const nettype =
@ -2432,7 +2432,7 @@ bool rpc_command_executor::prune_blockchain()
tools::success_msg_writer() << "Blockchain pruned";
#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
return true;
}

View File

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

View File

@ -27,7 +27,7 @@
# 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.
loki_add_executable(cn_deserialize "loki-utils-deserialize"
oxen_add_executable(cn_deserialize "oxen-utils-deserialize"
cn_deserialize.cpp
)
@ -37,7 +37,7 @@ target_link_libraries(cn_deserialize
p2p
extra)
loki_add_executable(object_sizes "loki-utils-object-sizes"
oxen_add_executable(object_sizes "oxen-utils-object-sizes"
object_sizes.cpp
)
@ -53,7 +53,7 @@ set(dns_checks_sources
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
PRIVATE

View File

@ -36,8 +36,8 @@
#include "version.h"
#include <lokimq/hex.h>
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "debugtools.deserialize"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "debugtools.deserialize"
namespace po = boost::program_options;
@ -80,10 +80,10 @@ struct extra_printer {
std::cout << "LNS " << (x.is_buying() ? "registration" : x.is_updating() ? "update" : "(unknown)");
switch (x.type)
{
case lns::mapping_type::oxennet: std::cout << " - Lokinet (1y)"; break;
case lns::mapping_type::oxennet_2years: std::cout << " - Lokinet (2y)"; break;
case lns::mapping_type::oxennet_5years: std::cout << " - Lokinet (5y)"; break;
case lns::mapping_type::oxennet_10years: std::cout << " - Lokinet (10y)"; break;
case lns::mapping_type::oxennet: std::cout << " - Oxennet (1y)"; break;
case lns::mapping_type::oxennet_2years: std::cout << " - Oxennet (2y)"; break;
case lns::mapping_type::oxennet_5years: std::cout << " - Oxennet (5y)"; 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::wallet: std::cout << " - Wallet address"; break;
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))
{
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;
return 1;
}

View File

@ -121,13 +121,13 @@ int main(int argc, char* argv[])
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;
return 1;
}
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"});

View File

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

View File

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

View File

@ -49,8 +49,8 @@ namespace hw {
#ifdef WITH_DEVICE_LEDGER
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device.ledger"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "device.ledger"
/* ===================================================================== */
/* === Debug ==== */
@ -482,8 +482,8 @@ namespace hw {
bool device_ledger::reset() {
reset_buffer();
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");
send_bytes(LOKI_VERSION_STR.data(), LOKI_VERSION_STR.size(), offset);
CHECK_AND_ASSERT_THROW_MES(offset + OXEN_VERSION_STR.size() <= BUFFER_SEND_SIZE, "OXEN_VERSION_STR is too long");
send_bytes(OXEN_VERSION_STR.data(), OXEN_VERSION_STR.size(), offset);
finish_and_exchange(offset);
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 {
// 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 */
#define MINIMAL_APP_VERSION_MAJOR 0

View File

@ -34,8 +34,8 @@
namespace hw {
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "device"
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}));
@ -49,8 +49,8 @@ namespace hw {
#ifdef WITH_DEVICE_LEDGER
namespace ledger {
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device.ledger"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "device.ledger"
#ifdef DEBUG_HWDEVICE

View File

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

View File

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

View File

@ -154,7 +154,7 @@ namespace trezor {
}
// Scoped session closer
LOKI_DEFER {
OXEN_DEFER {
if (open_session){
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_mixin(static_cast<google::protobuf::uint32>(tx.sources[0].outputs.size() - 1));
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);
if (client_version() <= 1){

View File

@ -44,8 +44,8 @@
#include "transport.hpp"
#include "messages/messages-common.pb.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "device.trezor.transport"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "device.trezor.transport"
using namespace std;
using json = rapidjson::Document;
@ -521,7 +521,7 @@ namespace trezor{
m_http_session.SetBody(body);
cpr::Response res;
LOKI_DEFER {
OXEN_DEFER {
if (!res.text.empty())
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)
#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);
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);
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);
#undef TREZOR_LIBUSB_SET_DEBUG

View File

@ -167,7 +167,7 @@ namespace trezor {
t_serialize(request, req);
std::string res;
LOKI_DEFER { if (!res.empty()) memwipe(res.data(), res.size()); };
OXEN_DEFER { if (!res.empty()) memwipe(res.data(), res.size()); };
try {
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
# 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
)

View File

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

View File

@ -63,8 +63,8 @@
#include "language_base.h"
#include "singleton.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "mnemonic"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "mnemonic"
namespace crypto
{
@ -293,7 +293,7 @@ namespace crypto
}
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;
if (!find_seed_language(seed, has_checksum, matched_indices, &language))
{

View File

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

View File

@ -63,8 +63,8 @@
#include <miniupnp/miniupnpc/upnperrors.h>
#endif
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "net.p2p"
#undef OXEN_DEFAULT_LOG_CATEGORY
#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))))
@ -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(),
[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)
{
@ -2251,7 +2251,7 @@ namespace nodetool
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))
{
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 "bulletproofs.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "bulletproofs"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "bulletproofs"
//#define DEBUG_BP

View File

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

View File

@ -35,8 +35,8 @@
using namespace crypto;
using namespace std;
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "ringct"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "ringct"
#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_config.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "ringct"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "ringct"
#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 std;
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "ringct"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "ringct"
namespace rct {

View File

@ -64,8 +64,8 @@
#include "p2p/net_node.h"
#include "version.h"
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon.rpc"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "daemon.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();
if (!context.admin)
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() :
"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;
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();
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)" :
"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)
{
@ -2327,7 +2327,7 @@ namespace cryptonote { namespace rpc {
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_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
{
@ -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>(
req.version, service_nodes::MIN_LOKINET_VERSION,
"Lokinet", m_core.m_last_oxennet_ping, LOKINET_PING_LIFETIME,
return handle_ping<OXENNET_PING>(
req.version, service_nodes::MIN_OXENNET_VERSION,
"Oxennet", m_core.m_last_oxennet_ping, OXENNET_PING_LIFETIME,
[this](bool significant) { if (significant) m_core.reset_proof_interval(); });
}
//------------------------------------------------------------------------------------------------------------------------------

View File

@ -43,12 +43,12 @@
#include "p2p/net_node.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"
#endif
#undef LOKI_DEFAULT_LOG_CATEGORY
#define LOKI_DEFAULT_LOG_CATEGORY "daemon.rpc"
#undef OXEN_DEFAULT_LOG_CATEGORY
#define OXEN_DEFAULT_LOG_CATEGORY "daemon.rpc"
namespace boost::program_options {
class options_description;
@ -262,7 +262,7 @@ namespace cryptonote::rpc {
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);
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_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);
@ -273,7 +273,7 @@ namespace cryptonote::rpc {
LNS_RESOLVE::response invoke(LNS_RESOLVE::request&& req, rpc_context 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()
{
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_BEGIN(LOKINET_PING::request)
KV_SERIALIZE_MAP_CODE_BEGIN(OXENNET_PING::request)
KV_SERIALIZE(version);
KV_SERIALIZE_MAP_CODE_END()

View File

@ -133,7 +133,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get the node's current height.
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.
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.
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.
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.
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.
struct GET_TRANSACTIONS : PUBLIC, LEGACY
{
@ -314,7 +314,7 @@ namespace rpc {
};
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> 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
@ -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.
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.
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
{
uint64_t amount; // Amount of Loki in TXID.
@ -444,7 +444,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get outputs. Binary request.
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
{
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.
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.
struct START_MINING : LEGACY
{
@ -568,7 +568,7 @@ namespace rpc {
struct response : STATUS {};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Stop mining on the daemon.
struct STOP_MINING : LEGACY
{
@ -578,7 +578,7 @@ namespace rpc {
struct response : STATUS {};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get the mining status of the daemon.
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.
// Note that all of the std::optional<> fields here are not included if the request is a public
// (restricted) RPC request.
@ -657,7 +657,7 @@ namespace rpc {
};
//-----------------------------------------------
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct GET_NET_STATS : LEGACY
{
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,
// 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
@ -688,7 +688,7 @@ namespace rpc {
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.
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.
struct GETBLOCKHASH : PUBLIC
{
@ -721,7 +721,7 @@ namespace rpc {
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.
struct GETBLOCKTEMPLATE : PUBLIC
{
@ -755,7 +755,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Submit a mined block to the network.
struct SUBMITBLOCK : PUBLIC
{
@ -771,7 +771,7 @@ namespace rpc {
struct response : STATUS {};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Developer only.
struct GENERATEBLOCKS : RPC_COMMAND
{
@ -797,7 +797,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct block_header_response
{
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.
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.
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 miner_reward; // The amount of new generated in this block and rewarded to the miner. 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 OXEN = 1e9 atomic units.
uint64_t block_size; // The block size 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.
@ -825,7 +825,7 @@ namespace rpc {
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.
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.
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.
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.
// For full block information, both lookups use the same method, but with different input parameters.
struct GET_BLOCK : PUBLIC
@ -932,7 +932,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get the known peers list.
struct GET_PEER_LIST : LEGACY
{
@ -979,7 +979,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct public_node
{
std::string host;
@ -992,7 +992,7 @@ namespace rpc {
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.
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.
struct SET_LOG_HASH_RATE : LEGACY
{
@ -1032,7 +1032,7 @@ namespace rpc {
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
// control set the set_log_categories command instead.
struct SET_LOG_LEVEL : LEGACY
@ -1049,7 +1049,7 @@ namespace rpc {
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:
// 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,
@ -1083,7 +1083,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct tx_info
{
std::string id_hash; // The transaction ID hash.
@ -1109,7 +1109,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct spent_key_image_info
{
std::string id_hash; // Key image.
@ -1118,7 +1118,7 @@ namespace rpc {
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,
// as well as spent key image information for the txpool in the node's memory.
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.
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.
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
{
uint64_t weight; //
@ -1195,7 +1195,7 @@ namespace rpc {
uint64_t time_in_pool;
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get all transaction pool backlog.
struct GET_TRANSACTION_POOL_BACKLOG : PUBLIC
{
@ -1213,7 +1213,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct txpool_histo
{
uint32_t txs; // Number of transactions.
@ -1222,7 +1222,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct txpool_stats
{
uint64_t bytes_total; // Total size of all transactions in pool.
@ -1244,7 +1244,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get the transaction pool statistics.
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.
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.
// This method includes a starting block height and an ending block height as
// 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.
struct SET_BOOTSTRAP_DAEMON : RPC_COMMAND
{
@ -1325,7 +1325,7 @@ namespace rpc {
struct response : STATUS {};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Send a command to the daemon to safely disconnect and shut down.
struct STOP_DAEMON : LEGACY
{
@ -1335,7 +1335,7 @@ namespace rpc {
struct response : STATUS {};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get daemon bandwidth limits.
struct GET_LIMIT : LEGACY
{
@ -1354,7 +1354,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Set daemon bandwidth limits.
struct SET_LIMIT : LEGACY
{
@ -1378,7 +1378,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Limit number of Outgoing peers.
struct OUT_PEERS : LEGACY
{
@ -1398,7 +1398,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Limit number of Incoming peers.
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.
struct HARD_FORK_INFO : PUBLIC
{
@ -1448,7 +1448,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get list of banned IPs.
struct GETBANS : RPC_COMMAND
{
@ -1474,7 +1474,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Ban another node by IP.
struct SETBANS : RPC_COMMAND
{
@ -1500,7 +1500,7 @@ namespace rpc {
struct response : STATUS {};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Determine whether a given IP address is banned
struct BANNED : RPC_COMMAND
{
@ -1523,7 +1523,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Flush tx ids from transaction pool..
struct FLUSH_TRANSACTION_POOL : RPC_COMMAND
{
@ -1539,7 +1539,7 @@ namespace rpc {
struct response : STATUS {};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// 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.
struct GET_OUTPUT_HISTOGRAM : PUBLIC
@ -1581,7 +1581,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get current RPC protocol version.
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.
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
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.
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.
struct RELAY_TX : RPC_COMMAND
{
@ -1697,7 +1697,7 @@ namespace rpc {
struct response : STATUS {};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get synchronisation information.
struct SYNC_INFO : RPC_COMMAND
{
@ -1747,7 +1747,7 @@ namespace rpc {
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct GET_OUTPUT_DISTRIBUTION : PUBLIC
{
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
struct GET_OUTPUT_DISTRIBUTION_BIN : PUBLIC, BINARY
{
@ -1795,7 +1795,7 @@ namespace rpc {
using response = GET_OUTPUT_DISTRIBUTION::response;
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct POP_BLOCKS : LEGACY
{
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
{
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.
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
{
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
{
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;
};
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
// 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.
@ -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
// 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
@ -1986,7 +1986,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// TODO: Undocumented, -- unused
struct PERFORM_BLOCKCHAIN_TEST : RPC_COMMAND
{
@ -2009,7 +2009,7 @@ namespace rpc {
};
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct service_node_contribution
{
std::string key_image; // The contribution's key image that is locked on the network.
@ -2019,7 +2019,7 @@ namespace rpc {
KV_MAP_SERIALIZABLE
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
struct service_node_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
};
LOKI_RPC_DOC_INTROSPECT
OXEN_RPC_DOC_INTROSPECT
// Get information on some, all, or a random subset of Service Nodes.
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.
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
{
static constexpr auto names() { return NAMES("storage_server_ping"); }
@ -2191,8 +2191,8 @@ namespace rpc {
struct response : STATUS {};
};
LOKI_RPC_DOC_INTROSPECT
struct LOKINET_PING : RPC_COMMAND
OXEN_RPC_DOC_INTROSPECT
struct OXENNET_PING : RPC_COMMAND
{
static constexpr auto names() { return NAMES("oxennet_ping"); }
@ -2205,7 +2205,7 @@ namespace rpc {
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.
// For devnet and testnet values, ensure the daemon is started with the
// `--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.
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.
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.
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.
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
{
static constexpr auto names() { return NAMES("report_peer_storage_server_status"); }
@ -2421,7 +2421,7 @@ namespace rpc {
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
// for Session and Lokinet.
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
// public key; by default purchases are owned by the spend public key of the purchasing wallet.
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,
// single-value resolutions that do not care about registration details, etc.; if you need more
// 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.
struct FLUSH_CACHE : RPC_COMMAND
{
@ -2640,7 +2640,7 @@ namespace rpc {
GET_SERVICE_NODES,
GET_SERVICE_NODE_STATUS,
STORAGE_SERVER_PING,
LOKINET_PING,
OXENNET_PING,
GET_STAKING_REQUIREMENT,
GET_SERVICE_NODE_BLACKLISTED_KEY_IMAGES,
GET_OUTPUT_BLACKLIST,

View File

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

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