Compare commits
20 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3334756ce4 | ||
|
|
c0bb2dddda | ||
|
|
36a09972c9 | ||
|
|
03ce1e6c9d | ||
|
|
7ebedbbe9e | ||
|
|
cccd97fa01 | ||
|
|
0de1633f83 | ||
|
|
fa21489237 | ||
|
|
8e237a054c | ||
|
|
6a4fc0d34f | ||
|
|
d92c4bfdd5 | ||
|
|
a9b981f30b | ||
|
|
db96e6638d | ||
|
|
a91b097f4e | ||
|
|
c3b7ac9691 | ||
|
|
2884df9edc | ||
|
|
5ff0399568 | ||
|
|
935feb66f5 | ||
|
|
c25641b0e0 | ||
|
|
8460d07e24 |
12 changed files with 563 additions and 45 deletions
|
|
@ -6852,9 +6852,8 @@ wide_difficulty_type blockchain_storage::get_last_alt_x_block_cumulative_precise
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
wide_difficulty_type blockchain_storage::get_last_alt_x_block_cumulative_precise_difficulty(const alt_chain_type& alt_chain, uint64_t block_height, bool pos, wide_difficulty_type& cumulative_diff_precise_adj) const
|
wide_difficulty_type blockchain_storage::get_last_alt_x_block_cumulative_precise_difficulty(const alt_chain_type& alt_chain, uint64_t main_chain_start_block_height, bool pos, wide_difficulty_type& cumulative_diff_precise_adj) const
|
||||||
{
|
{
|
||||||
uint64_t main_chain_first_block = block_height;
|
|
||||||
for (auto it = alt_chain.rbegin(); it != alt_chain.rend(); it++)
|
for (auto it = alt_chain.rbegin(); it != alt_chain.rend(); it++)
|
||||||
{
|
{
|
||||||
if (is_pos_block((*it)->second.bl) == pos)
|
if (is_pos_block((*it)->second.bl) == pos)
|
||||||
|
|
@ -6862,14 +6861,14 @@ wide_difficulty_type blockchain_storage::get_last_alt_x_block_cumulative_precise
|
||||||
cumulative_diff_precise_adj = (*it)->second.cumulative_diff_precise_adjusted;
|
cumulative_diff_precise_adj = (*it)->second.cumulative_diff_precise_adjusted;
|
||||||
return (*it)->second.cumulative_diff_precise;
|
return (*it)->second.cumulative_diff_precise;
|
||||||
}
|
}
|
||||||
main_chain_first_block = (*it)->second.height - 1;
|
main_chain_start_block_height = (*it)->second.height - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CRITICAL_REGION_LOCAL(m_read_lock);
|
CRITICAL_REGION_LOCAL(m_read_lock);
|
||||||
CHECK_AND_ASSERT_MES(main_chain_first_block < m_db_blocks.size(), false, "Intrnal error: main_chain_first_block(" << main_chain_first_block << ") < m_blocks.size() (" << m_db_blocks.size() << ")");
|
CHECK_AND_ASSERT_MES(main_chain_start_block_height < m_db_blocks.size(), false, "Internal error: main_chain_start_block_height (" << main_chain_start_block_height << ") < m_blocks.size() (" << m_db_blocks.size() << ")");
|
||||||
|
|
||||||
for (uint64_t i = main_chain_first_block; i != 0; i--)
|
for (uint64_t i = main_chain_start_block_height; i != 0; i--)
|
||||||
{
|
{
|
||||||
if (is_pos_block(m_db_blocks[i]->bl) == pos)
|
if (is_pos_block(m_db_blocks[i]->bl) == pos)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit bcd4021364bbcd29a4208225de33a359ee35a447
|
Subproject commit 1b8e3da0d15c76f285f97c8fe29f6e7f6cab2fe6
|
||||||
|
|
@ -1840,7 +1840,14 @@ bool simple_wallet::transfer_so(const std::vector<std::string> &args)
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
for (auto i : outs_idxs)
|
for (auto i : outs_idxs)
|
||||||
|
{
|
||||||
ss << i << " ";
|
ss << i << " ";
|
||||||
|
tools::transfer_details td{};
|
||||||
|
if (!m_wallet->get_transfer_info_by_index(i, td) || !td.is_spendable())
|
||||||
|
{
|
||||||
|
fail_msg_writer() << "output #" << i << ": wrong index or not spendable";
|
||||||
|
}
|
||||||
|
}
|
||||||
success_msg_writer() << "outputs' indicies allowed to spent: " << (outs_idxs.empty() ? std::string("all") : ss.str());
|
success_msg_writer() << "outputs' indicies allowed to spent: " << (outs_idxs.empty() ? std::string("all") : ss.str());
|
||||||
|
|
||||||
// 2nd arg: fee
|
// 2nd arg: fee
|
||||||
|
|
@ -2109,7 +2116,7 @@ bool simple_wallet::list_outputs(const std::vector<std::string> &args)
|
||||||
arg_spent_flags = true, include_spent = false;
|
arg_spent_flags = true, include_spent = false;
|
||||||
else if (!arg_spent_flags && (arg == "s" || arg == "spent" || arg == "unavailable"))
|
else if (!arg_spent_flags && (arg == "s" || arg == "spent" || arg == "unavailable"))
|
||||||
arg_spent_flags = true, include_unspent = false;
|
arg_spent_flags = true, include_unspent = false;
|
||||||
else if (!arg_unknown_assets && (arg == "unknown"))
|
else if (!arg_unknown_assets && (arg == "unknown" || arg == "unk"))
|
||||||
arg_unknown_assets = true, show_only_unknown = true;
|
arg_unknown_assets = true, show_only_unknown = true;
|
||||||
else if (!arg_ticker_filer && (arg.find("ticker=") == 0 || arg.find("t=") == 0))
|
else if (!arg_ticker_filer && (arg.find("ticker=") == 0 || arg.find("t=") == 0))
|
||||||
arg_ticker_filer = true, filter_asset_ticker = boost::erase_all_copy(boost::erase_all_copy(arg, "ticker="), "t=");
|
arg_ticker_filer = true, filter_asset_ticker = boost::erase_all_copy(boost::erase_all_copy(arg, "ticker="), "t=");
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
|
|
||||||
#define PROJECT_MAJOR_VERSION "2"
|
#define PROJECT_MAJOR_VERSION "2"
|
||||||
#define PROJECT_MINOR_VERSION "1"
|
#define PROJECT_MINOR_VERSION "1"
|
||||||
#define PROJECT_REVISION "8"
|
#define PROJECT_REVISION "9"
|
||||||
#define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION
|
#define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION
|
||||||
|
|
||||||
#define PROJECT_VERSION_BUILD_NO 428
|
#define PROJECT_VERSION_BUILD_NO 431
|
||||||
#define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO)
|
#define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO)
|
||||||
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"
|
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"
|
||||||
|
|
|
||||||
|
|
@ -223,8 +223,10 @@ bool wallet2::get_transfer_info_by_key_image(const crypto::key_image& ki, transf
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
bool wallet2::get_transfer_info_by_index(size_t i, transfer_details& td)
|
bool wallet2::get_transfer_info_by_index(size_t i, transfer_details& td)
|
||||||
{
|
{
|
||||||
//WLT_CHECK_AND_ASSERT_MES(i < m_transfers.size(), false, "wrong out in transaction: internal index, m_transfers.size()=" << m_transfers.size());
|
auto it = m_transfers.find(i);
|
||||||
td = m_transfers.at(i);
|
if (it == m_transfers.end())
|
||||||
|
return false;
|
||||||
|
td = it->second;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
|
@ -3865,7 +3867,7 @@ bool wallet2::get_asset_info(const crypto::public_key& asset_id, currency::asset
|
||||||
asset_flags |= aif_custom;
|
asset_flags |= aif_custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ask_daemon_for_unknown)
|
if (asset_flags == aif_none && ask_daemon_for_unknown)
|
||||||
{
|
{
|
||||||
if (daemon_get_asset_info(asset_id, asset_info))
|
if (daemon_get_asset_info(asset_id, asset_info))
|
||||||
{
|
{
|
||||||
|
|
@ -4012,7 +4014,7 @@ bool wallet2::generate_utxo_defragmentation_transaction_if_needed(currency::tran
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
std::string wallet2::get_transfers_str(bool include_spent /*= true*/, bool include_unspent /*= true*/, bool show_only_unknown /*= false*/, const std::string& filter_asset_ticker /*= std::string{}*/) const
|
std::string wallet2::get_transfers_str(bool include_spent /*= true*/, bool include_unspent /*= true*/, bool show_only_unknown /*= false*/, const std::string& filter_asset_ticker /*= std::string{}*/) const
|
||||||
{
|
{
|
||||||
static const char* header = " index amount ticker g_index flags block tx out# asset id";
|
static const char* header = " index amount ticker g_index flags block tx out# asset id";
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << header << ENDL;
|
ss << header << ENDL;
|
||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
|
|
@ -4043,7 +4045,7 @@ std::string wallet2::get_transfers_str(bool include_spent /*= true*/, bool inclu
|
||||||
ss << std::right << (is_locked ? "*" : " ") <<
|
ss << std::right << (is_locked ? "*" : " ") <<
|
||||||
std::setw(5) << i << " " <<
|
std::setw(5) << i << " " <<
|
||||||
std::setw(21) << print_asset_money(td.m_amount, adb.decimal_point) << " " <<
|
std::setw(21) << print_asset_money(td.m_amount, adb.decimal_point) << " " <<
|
||||||
std::setw(6) << std::left << (native_coin ? std::string(" ") : adb.ticker) << " " << std::right <<
|
std::setw(14) << std::left << (native_coin ? std::string(" ") : adb.ticker) << " " << std::right <<
|
||||||
std::setw(7) << td.m_global_output_index << " " <<
|
std::setw(7) << td.m_global_output_index << " " <<
|
||||||
std::setw(2) << std::setfill('0') << td.m_flags << std::setfill(' ') << ":" <<
|
std::setw(2) << std::setfill('0') << td.m_flags << std::setfill(' ') << ":" <<
|
||||||
std::setw(8) << transfer_flags_to_str(td.m_flags) << " " <<
|
std::setw(8) << transfer_flags_to_str(td.m_flags) << " " <<
|
||||||
|
|
@ -4062,21 +4064,21 @@ std::string wallet2::get_transfers_str(bool include_spent /*= true*/, bool inclu
|
||||||
|
|
||||||
ss << "printed " << count << " outputs of " << m_transfers.size() << " total" << ENDL;
|
ss << "printed " << count << " outputs of " << m_transfers.size() << " total" << ENDL;
|
||||||
if (unknown_assets_outs_count == 1)
|
if (unknown_assets_outs_count == 1)
|
||||||
ss << "(" << unknown_assets_outs_count << " output with unrecognized asset id is not shown, use 'list_outputs unknown' to see it)" << ENDL;
|
ss << "(" << unknown_assets_outs_count << " output with unrecognized asset id is not shown, use 'list_outputs unknown' or 'lo unk' to see it)" << ENDL;
|
||||||
else if (unknown_assets_outs_count > 1)
|
else if (unknown_assets_outs_count > 1)
|
||||||
ss << "(" << unknown_assets_outs_count << " outputs with unrecognized asset ids are not shown, use 'list_outputs unknown' to see them)" << ENDL;
|
ss << "(" << unknown_assets_outs_count << " outputs with unrecognized asset ids are not shown, use 'list_outputs unknown' or 'lo unk' to see them)" << ENDL;
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
std::string wallet2::get_balance_str() const
|
std::string wallet2::get_balance_str() const
|
||||||
{
|
{
|
||||||
// balance unlocked / [balance total] ticker asset id
|
// balance unlocked / [balance total] ticker asset id
|
||||||
// 0.21 / 98.51 DP2 a6974d5874e97e5f4ed5ad0a62f0975edbccb1bb55502fc75c7fe808f12f44d3
|
// 0.21 / 98.51 DP2 a6974d5874e97e5f4ed5ad0a62f0975edbccb1bb55502fc75c7fe808f12f44d3
|
||||||
// 190.123456789012 / 199.123456789012 ZANO d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a NATIVE
|
// 190.123456789012 / 199.123456789012 ZANO d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a NATIVE
|
||||||
// 98.0 BGTVUW af2b12f3033337f9aea1845a6bc3fc966ed4d13227a3ace7706fca7dbcdaa7e2
|
// 98.0 BGTVUW af2b12f3033337f9aea1845a6bc3fc966ed4d13227a3ace7706fca7dbcdaa7e2
|
||||||
// 1000.034 DP3 d4aba1020f26927571771e04b585b4ffb211f52708d5e4c465bbdfa4a12e6271
|
// 1000.034 DP3 d4aba1020f26927571771e04b585b4ffb211f52708d5e4c465bbdfa4a12e6271
|
||||||
|
|
||||||
static const char* header = " balance unlocked / [balance total] ticker asset id";
|
static const char* header = " balance unlocked / [balance total] ticker asset id";
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << header << ENDL;
|
ss << header << ENDL;
|
||||||
|
|
||||||
|
|
@ -4098,7 +4100,7 @@ std::string wallet2::get_balance_str() const
|
||||||
ss << std::string(21 + 3, ' ');
|
ss << std::string(21 + 3, ' ');
|
||||||
else
|
else
|
||||||
ss << " / " << std::setw(21) << print_fixed_decimal_point_with_trailing_spaces(b.total, b.asset_info.decimal_point);
|
ss << " / " << std::setw(21) << print_fixed_decimal_point_with_trailing_spaces(b.total, b.asset_info.decimal_point);
|
||||||
ss << " " << std::setw(8) << std::left << b.asset_info.ticker << " " << b.asset_info.asset_id;
|
ss << " " << std::setw(14) << std::left << b.asset_info.ticker << " " << b.asset_info.asset_id;
|
||||||
if (b.asset_info.asset_id == native_coin_asset_id)
|
if (b.asset_info.asset_id == native_coin_asset_id)
|
||||||
ss << " NATIVE";
|
ss << " NATIVE";
|
||||||
ss << ENDL;
|
ss << ENDL;
|
||||||
|
|
@ -4109,15 +4111,15 @@ std::string wallet2::get_balance_str() const
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
std::string wallet2::get_balance_str_raw() const
|
std::string wallet2::get_balance_str_raw() const
|
||||||
{
|
{
|
||||||
// balance unlocked / [balance total] ticker asset id DP flags
|
// balance unlocked / [balance total] ticker asset id DP flags
|
||||||
// 0.21 / 98.51 ZANO d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a 12 NATIVE
|
// 0.21 / 98.51 ZANO d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a 12 NATIVE
|
||||||
// 2.0 MYFB 13615ffdfbdc09275a1dfc0fbdaf6a9b07849b835ffdfed0b9e1478ea8924774 1 custom
|
// 2.0 MYFB 13615ffdfbdc09275a1dfc0fbdaf6a9b07849b835ffdfed0b9e1478ea8924774 1 custom
|
||||||
// 1000.0 BurnCT 14608811180d4bbad96a6b91405e329e4f2a10519e6dcea644f83b9f8ccb5863 12 unknown asset
|
// 1000.0 BurnCT 14608811180d4bbad96a6b91405e329e4f2a10519e6dcea644f83b9f8ccb5863 12 unknown asset
|
||||||
//WHITELIST:
|
//WHITELIST:
|
||||||
// a7e8e5b31c24f2d6a07e141701237b136d704c9a89f9a5d1ca4a8290df0b9edc WETH
|
// a7e8e5b31c24f2d6a07e141701237b136d704c9a89f9a5d1ca4a8290df0b9edc WETH
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
static const char* header = " balance unlocked / [balance total] ticker asset id DP flags";
|
static const char* header = " balance unlocked / [balance total] ticker asset id DP flags";
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << header << ENDL;
|
ss << header << ENDL;
|
||||||
|
|
||||||
|
|
@ -4138,7 +4140,7 @@ std::string wallet2::get_balance_str_raw() const
|
||||||
else
|
else
|
||||||
ss << " / " << std::setw(21) << print_fixed_decimal_point_with_trailing_spaces(entry.second.total, asset_info.decimal_point);
|
ss << " / " << std::setw(21) << print_fixed_decimal_point_with_trailing_spaces(entry.second.total, asset_info.decimal_point);
|
||||||
|
|
||||||
ss << " " << std::setw(8) << std::left << asset_info.ticker;
|
ss << " " << std::setw(14) << std::left << asset_info.ticker;
|
||||||
ss << " " << entry.first << " ";
|
ss << " " << entry.first << " ";
|
||||||
|
|
||||||
if (has_info)
|
if (has_info)
|
||||||
|
|
|
||||||
|
|
@ -588,7 +588,6 @@ namespace tools
|
||||||
|
|
||||||
void set_tids_to_be_only_used_in_the_next_transfer(const std::vector<uint64_t>& tids)
|
void set_tids_to_be_only_used_in_the_next_transfer(const std::vector<uint64_t>& tids)
|
||||||
{
|
{
|
||||||
WLT_THROW_IF_FALSE_WALLET_CMN_ERR_EX(std::all_of(tids.cbegin(), tids.cend(), [&](size_t i){ return i < m_transfers.size(); }), "some transfers IDs are out of range");
|
|
||||||
m_found_free_amounts.clear();
|
m_found_free_amounts.clear();
|
||||||
add_transfers_to_transfers_cache(tids);
|
add_transfers_to_transfers_cache(tids);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -529,10 +529,9 @@ namespace tools
|
||||||
|
|
||||||
if (!req.comment.empty() && payment_id.empty())
|
if (!req.comment.empty() && payment_id.empty())
|
||||||
{
|
{
|
||||||
// tx_comment is temporary disabled -- sowle
|
currency::tx_comment comment{};
|
||||||
//currency::tx_comment comment = AUTO_VAL_INIT(comment);
|
comment.comment = req.comment;
|
||||||
//comment.comment = req.comment;
|
extra.push_back(comment);
|
||||||
//extra.push_back(comment);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req.push_payer && !wrap)
|
if (req.push_payer && !wrap)
|
||||||
|
|
|
||||||
|
|
@ -67,4 +67,5 @@ if(MSVC AND USE_PCH)
|
||||||
set_property(SOURCE "core_tests/chaingen_pch.cpp" APPEND_STRING PROPERTY COMPILE_FLAGS " /Ycchaingen.h /Zm1000")
|
set_property(SOURCE "core_tests/chaingen_pch.cpp" APPEND_STRING PROPERTY COMPILE_FLAGS " /Ycchaingen.h /Zm1000")
|
||||||
set_property(TARGET coretests functional_tests hash-target-tests performance_tests unit_tests APPEND_STRING PROPERTY LINK_FLAGS "$(MSBuildProjectDirectory)/../src/$(ConfigurationName)/stdafx.obj")
|
set_property(TARGET coretests functional_tests hash-target-tests performance_tests unit_tests APPEND_STRING PROPERTY LINK_FLAGS "$(MSBuildProjectDirectory)/../src/$(ConfigurationName)/stdafx.obj")
|
||||||
set_property(TARGET db_tests APPEND_STRING PROPERTY LINK_FLAGS "$(MSBuildProjectDirectory)/../../src/$(ConfigurationName)/stdafx.obj")
|
set_property(TARGET db_tests APPEND_STRING PROPERTY LINK_FLAGS "$(MSBuildProjectDirectory)/../../src/$(ConfigurationName)/stdafx.obj")
|
||||||
|
set_property(TARGET db_size_test APPEND_STRING PROPERTY LINK_FLAGS "$(MSBuildProjectDirectory)/../../src/$(ConfigurationName)/stdafx.obj")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
add_executable(db_tests db_tests.cpp)
|
add_executable(db_tests db_tests.cpp)
|
||||||
|
add_executable(db_size_test db_size_test.cpp)
|
||||||
target_link_libraries(db_tests crypto common lmdb zlibstatic ${Boost_LIBRARIES})
|
target_link_libraries(db_tests crypto common lmdb zlibstatic ${Boost_LIBRARIES})
|
||||||
|
target_link_libraries(db_size_test crypto common lmdb zlibstatic ${Boost_LIBRARIES})
|
||||||
|
|
|
||||||
324
tests/db_tests/db_size_test.cpp
Normal file
324
tests/db_tests/db_size_test.cpp
Normal file
|
|
@ -0,0 +1,324 @@
|
||||||
|
#include <random>
|
||||||
|
#include <array>
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
#include <cstring>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
|
#include "epee/include/include_base_utils.h"
|
||||||
|
#include "include_base_utils.h"
|
||||||
|
#include "common/db_backend_lmdb.h"
|
||||||
|
#include "common/db_abstract_accessor.h"
|
||||||
|
#include "readwrite_lock.h"
|
||||||
|
|
||||||
|
// #undef LOG_DEFAULT_CHANNEL
|
||||||
|
// #define LOG_DEFAULT_CHANNEL "db-bulk-writer"
|
||||||
|
|
||||||
|
using namespace tools::db;
|
||||||
|
|
||||||
|
enum class Mode { kv, array };
|
||||||
|
|
||||||
|
struct first_item_cb : public i_db_callback
|
||||||
|
{
|
||||||
|
std::string k, v;
|
||||||
|
bool got = false;
|
||||||
|
bool on_enum_item(uint64_t /*i*/, const void* pkey, uint64_t ks, const void* pval, uint64_t vs) override
|
||||||
|
{
|
||||||
|
k.assign(static_cast<const char*>(pkey), static_cast<size_t>(ks));
|
||||||
|
v.assign(static_cast<const char*>(pval), static_cast<size_t>(vs));
|
||||||
|
got = true;
|
||||||
|
return false; // stop
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static void gen_key_bytes(std::mt19937_64& gen, uint64_t counter, std::string& out, size_t size)
|
||||||
|
{
|
||||||
|
out.resize(size);
|
||||||
|
for (size_t i = 0; i < size; i += 8)
|
||||||
|
{
|
||||||
|
uint64_t r = gen() ^ (0x9E3779B97F4A7C15ull * (counter + i));
|
||||||
|
std::memcpy(&out[i], &r, std::min<size_t>(8, size - i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class bulk_writer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
bulk_writer(basic_db_accessor& db, i_db_backend& _be, const std::string& table, container_handle h, Mode mode)
|
||||||
|
: _db(db), _be_(_be), _table(table), _h(h), _mode(mode) {}
|
||||||
|
|
||||||
|
bool init_sample()
|
||||||
|
{
|
||||||
|
if (_mode == Mode::kv)
|
||||||
|
{
|
||||||
|
if (_be_.size(_h) == 0)
|
||||||
|
{
|
||||||
|
LOG_ERROR("[" << _table << "] empty");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
first_item_cb cb;
|
||||||
|
if (!_be_.enumerate(_h, &cb) || !cb.got)
|
||||||
|
{
|
||||||
|
LOG_ERROR("[" << _table << "] enumerate failed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
_sample_key = cb.k;
|
||||||
|
_sample_val = cb.v;
|
||||||
|
_key_size = _sample_key.size();
|
||||||
|
_bytes_per_put = _key_size + _sample_val.size();
|
||||||
|
_entries = _be_.size(_h);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // array
|
||||||
|
_entries = _be_.size(_h);
|
||||||
|
if (_entries == 0)
|
||||||
|
{
|
||||||
|
LOG_ERROR("[" << _table << "] empty");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
uint64_t last_key = _entries - 1;
|
||||||
|
if (!_be_.get(_h, reinterpret_cast<const char*>(&last_key), sizeof(last_key), _sample_val))
|
||||||
|
{
|
||||||
|
LOG_ERROR("[" << _table << "] get(last) failed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
_key_size = sizeof(uint64_t);
|
||||||
|
_bytes_per_put = _key_size + _sample_val.size();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void print_initial_estimate() const
|
||||||
|
{
|
||||||
|
const long double MB_DEC = 1'000'000.0L;
|
||||||
|
long double approx_initial_bytes = static_cast<long double>(_entries) * _bytes_per_put;
|
||||||
|
LOG_PRINT_L0("[" << _table << "] entries=" << _entries
|
||||||
|
<< ", sample_value=" << _sample_val.size() << " B"
|
||||||
|
<< ", approx bytes/put=" << _bytes_per_put << " B");
|
||||||
|
LOG_PRINT_L0("[" << _table << "] Approx initial size: "
|
||||||
|
<< (approx_initial_bytes / MB_DEC) << " MB");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool write(uint64_t target_mb, uint64_t step_mb)
|
||||||
|
{
|
||||||
|
using clock = std::chrono::steady_clock;
|
||||||
|
|
||||||
|
const uint64_t MB_DEC = 1'000'000;
|
||||||
|
const uint64_t target_bytes = target_mb * MB_DEC;
|
||||||
|
const uint64_t step_bytes = step_mb * MB_DEC;
|
||||||
|
|
||||||
|
if (!_db.begin_transaction(false))
|
||||||
|
{
|
||||||
|
LOG_ERROR("begin_transaction failed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool tx_open = true;
|
||||||
|
bool ok = true;
|
||||||
|
|
||||||
|
std::random_device rd;
|
||||||
|
std::mt19937_64 gen(rd());
|
||||||
|
|
||||||
|
uint64_t written_total = 0;
|
||||||
|
uint64_t next_report = step_bytes;
|
||||||
|
uint64_t chunks_done = 0;
|
||||||
|
uint64_t counter = 0;
|
||||||
|
uint64_t array_key = _entries;
|
||||||
|
|
||||||
|
const auto all_start = clock::now();
|
||||||
|
auto chunk_start = all_start;
|
||||||
|
|
||||||
|
while (written_total < target_bytes)
|
||||||
|
{
|
||||||
|
if (_mode == Mode::kv)
|
||||||
|
{
|
||||||
|
std::string new_key;
|
||||||
|
gen_key_bytes(gen, counter++, new_key, _key_size);
|
||||||
|
if (!_be_.set(_h, new_key.data(), new_key.size(), _sample_val.data(), _sample_val.size()))
|
||||||
|
{
|
||||||
|
LOG_ERROR("[" << _table << "] set(new kv) failed");
|
||||||
|
ok = false; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // array
|
||||||
|
if (!_be_.set(_h, reinterpret_cast<const char*>(&array_key), sizeof(array_key),
|
||||||
|
_sample_val.data(), _sample_val.size()))
|
||||||
|
{
|
||||||
|
LOG_ERROR("[" << _table << "] set(new array) failed");
|
||||||
|
ok = false; break;
|
||||||
|
}
|
||||||
|
++array_key;
|
||||||
|
}
|
||||||
|
|
||||||
|
written_total += _bytes_per_put;
|
||||||
|
|
||||||
|
if (written_total >= next_report)
|
||||||
|
{
|
||||||
|
const auto t_fill_done = clock::now();
|
||||||
|
|
||||||
|
if (tx_open)
|
||||||
|
{
|
||||||
|
_db.commit_transaction();
|
||||||
|
tx_open = false;
|
||||||
|
}
|
||||||
|
const auto t_after_commit = clock::now();
|
||||||
|
|
||||||
|
const double fill_sec = std::chrono::duration<double>(t_fill_done - chunk_start).count();
|
||||||
|
const double commit_sec = std::chrono::duration<double>(t_after_commit - t_fill_done).count();
|
||||||
|
const double chunk_sec = fill_sec + commit_sec;
|
||||||
|
const double total_sec = std::chrono::duration<double>(t_after_commit - all_start).count();
|
||||||
|
|
||||||
|
++chunks_done;
|
||||||
|
|
||||||
|
const long double approx_now_mb =
|
||||||
|
(static_cast<long double>(_entries) * _bytes_per_put
|
||||||
|
+ static_cast<long double>(chunks_done) * step_mb * MB_DEC) / 1'000'000.0L;
|
||||||
|
|
||||||
|
const double chunk_mb = static_cast<double>(step_mb);
|
||||||
|
const double fill_mb_s = chunk_mb / (fill_sec > 0 ? fill_sec : 1e-9);
|
||||||
|
const double commit_mb_s = chunk_mb / (commit_sec > 0 ? commit_sec : 1e-9);
|
||||||
|
const double chunk_mb_s = chunk_mb / (chunk_sec > 0 ? chunk_sec : 1e-9);
|
||||||
|
const double total_written = static_cast<double>(chunks_done * step_mb);
|
||||||
|
const double total_mb_s = total_written / (total_sec > 0 ? total_sec : 1e-9);
|
||||||
|
|
||||||
|
LOG_PRINT_L0(
|
||||||
|
"Writed " << step_mb << "MB in " << _table
|
||||||
|
<< " | fill: " << fill_sec << " s (" << fill_mb_s << " MB/s)"
|
||||||
|
<< ", commit: " << commit_sec << " s (" << commit_mb_s << " MB/s)"
|
||||||
|
<< ", total: " << chunk_sec << " s (" << chunk_mb_s << " MB/s). "
|
||||||
|
<< "Total written: " << total_written << " MB, total time: "
|
||||||
|
<< total_sec << " s (" << total_mb_s << " MB/s avg). "
|
||||||
|
<< "Est. table size now: " << approx_now_mb << " MB."
|
||||||
|
);
|
||||||
|
|
||||||
|
if (written_total < target_bytes)
|
||||||
|
{
|
||||||
|
if (!_db.begin_transaction(false))
|
||||||
|
{
|
||||||
|
LOG_ERROR("begin_transaction failed (after commit)");
|
||||||
|
ok = false; break;
|
||||||
|
}
|
||||||
|
tx_open = true;
|
||||||
|
chunk_start = clock::now();
|
||||||
|
}
|
||||||
|
|
||||||
|
next_report += step_bytes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tx_open)
|
||||||
|
{
|
||||||
|
if (ok) _db.commit_transaction();
|
||||||
|
else _db.abort_transaction();
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
basic_db_accessor& _db;
|
||||||
|
i_db_backend& _be_;
|
||||||
|
std::string _table;
|
||||||
|
container_handle _h;
|
||||||
|
Mode _mode;
|
||||||
|
uint64_t _entries = 0;
|
||||||
|
size_t _key_size = 0;
|
||||||
|
uint64_t _bytes_per_put = 0;
|
||||||
|
std::string _sample_key;
|
||||||
|
std::string _sample_val;
|
||||||
|
};
|
||||||
|
|
||||||
|
static Mode parse_mode(const char* s)
|
||||||
|
{
|
||||||
|
if (!s)
|
||||||
|
return Mode::kv;
|
||||||
|
std::string v(s);
|
||||||
|
std::transform(v.begin(), v.end(), v.begin(), ::tolower);
|
||||||
|
if (v == "array")
|
||||||
|
return Mode::array;
|
||||||
|
return Mode::kv;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
epee::string_tools::set_module_name_and_folder(argv[0]);
|
||||||
|
epee::log_space::get_set_log_detalisation_level(true, LOG_LEVEL_0);
|
||||||
|
epee::log_space::log_singletone::add_logger(LOGGER_CONSOLE, nullptr, nullptr, LOG_LEVEL_0);
|
||||||
|
epee::log_space::log_singletone::set_thread_log_prefix("[db-bulk-writer] ");
|
||||||
|
|
||||||
|
if (argc < 3)
|
||||||
|
{
|
||||||
|
LOG_PRINT_L0(
|
||||||
|
std::string("Usage:\n ") + argv[0] +
|
||||||
|
" <env_path> <table_name> [--mode=kv|array] [--target-mb=N] [--step-mb=M]\n\n"
|
||||||
|
"Examples:\n " + argv[0] +
|
||||||
|
" ~/.Zano/blockchain_lmdb_v3 transactions --mode=kv --target-mb=1000 --step-mb=100\n " +
|
||||||
|
argv[0] +
|
||||||
|
" ~/.Zano/blockchain_lmdb_v3 blocks --mode=array --target-mb=200 --step-mb=50");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string env_path = argv[1];
|
||||||
|
std::string table_name = argv[2];
|
||||||
|
Mode mode = Mode::kv;
|
||||||
|
uint64_t target_mb = 1000;
|
||||||
|
uint64_t step_mb = 100;
|
||||||
|
|
||||||
|
for (int i = 3; i < argc; ++i)
|
||||||
|
{
|
||||||
|
std::string a = argv[i];
|
||||||
|
auto eat = [&](const char* pfx)->const char*
|
||||||
|
{
|
||||||
|
size_t L = std::strlen(pfx);
|
||||||
|
if (a.size() > L && a.compare(0,L,pfx) == 0)
|
||||||
|
return a.c_str()+L;
|
||||||
|
return nullptr;
|
||||||
|
};
|
||||||
|
if (const char* v = eat("--mode="))
|
||||||
|
mode = parse_mode(v);
|
||||||
|
else if (const char* v = eat("--target-mb="))
|
||||||
|
target_mb = std::strtoull(v, nullptr, 10);
|
||||||
|
else if (const char* v = eat("--step-mb="))
|
||||||
|
step_mb = std::strtoull(v, nullptr, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
epee::shared_recursive_mutex rwlock;
|
||||||
|
std::shared_ptr<i_db_backend> be(new lmdb_db_backend());
|
||||||
|
basic_db_accessor db(be, rwlock);
|
||||||
|
|
||||||
|
uint64_t max_db_size = uint64_t(1UL * 512UL) * 1024UL * 1024UL * 1024UL;
|
||||||
|
if (!db.open(env_path, max_db_size))
|
||||||
|
{
|
||||||
|
LOG_ERROR("Failed to open LMDB env at " << env_path);
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
container_handle h = 0;
|
||||||
|
if (!be->open_container(table_name, h))
|
||||||
|
{
|
||||||
|
LOG_ERROR("open_container(" << table_name << ") failed");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bulk_writer writer(db, *be, table_name, h, mode);
|
||||||
|
if (!writer.init_sample())
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
writer.print_initial_estimate();
|
||||||
|
|
||||||
|
bool ok = writer.write(target_mb, step_mb);
|
||||||
|
db.close();
|
||||||
|
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
LOG_PRINT_L0("DONE");
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_ERROR("FAILED");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
204
utils/JS/package-lock.json
generated
204
utils/JS/package-lock.json
generated
|
|
@ -5,7 +5,7 @@
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.8.2",
|
"axios": "^1.12.0",
|
||||||
"ethers": "^6.13.2"
|
"ethers": "^6.13.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -49,23 +49,38 @@
|
||||||
"node_modules/asynckit": {
|
"node_modules/asynckit": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||||
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
"node_modules/axios": {
|
||||||
"version": "1.8.2",
|
"version": "1.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.0.tgz",
|
||||||
"integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==",
|
"integrity": "sha512-oXTDccv8PcfjZmPGlWsPSwtOJCZ/b6W5jAMCNcfwJbCzDckwG0jrYJFaWH1yvivfCXjVzV/SPDEhMB3Q+DSurg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.6",
|
"follow-redirects": "^1.15.6",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.4",
|
||||||
"proxy-from-env": "^1.1.0"
|
"proxy-from-env": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/call-bind-apply-helpers": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"function-bind": "^1.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/combined-stream": {
|
"node_modules/combined-stream": {
|
||||||
"version": "1.0.8",
|
"version": "1.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"delayed-stream": "~1.0.0"
|
"delayed-stream": "~1.0.0"
|
||||||
},
|
},
|
||||||
|
|
@ -77,10 +92,70 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.4.0"
|
"node": ">=0.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/dunder-proto": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind-apply-helpers": "^1.0.1",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"gopd": "^1.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/es-define-property": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/es-errors": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/es-object-atoms": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"es-errors": "^1.3.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/es-set-tostringtag": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"get-intrinsic": "^1.2.6",
|
||||||
|
"has-tostringtag": "^1.0.2",
|
||||||
|
"hasown": "^2.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ethers": {
|
"node_modules/ethers": {
|
||||||
"version": "6.13.2",
|
"version": "6.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.2.tgz",
|
||||||
|
|
@ -128,22 +203,132 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/form-data": {
|
"node_modules/form-data": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
|
||||||
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
|
"integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"asynckit": "^0.4.0",
|
"asynckit": "^0.4.0",
|
||||||
"combined-stream": "^1.0.8",
|
"combined-stream": "^1.0.8",
|
||||||
|
"es-set-tostringtag": "^2.1.0",
|
||||||
|
"hasown": "^2.0.2",
|
||||||
"mime-types": "^2.1.12"
|
"mime-types": "^2.1.12"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/function-bind": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/get-intrinsic": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind-apply-helpers": "^1.0.2",
|
||||||
|
"es-define-property": "^1.0.1",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"es-object-atoms": "^1.1.1",
|
||||||
|
"function-bind": "^1.1.2",
|
||||||
|
"get-proto": "^1.0.1",
|
||||||
|
"gopd": "^1.2.0",
|
||||||
|
"has-symbols": "^1.1.0",
|
||||||
|
"hasown": "^2.0.2",
|
||||||
|
"math-intrinsics": "^1.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/get-proto": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"dunder-proto": "^1.0.1",
|
||||||
|
"es-object-atoms": "^1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/gopd": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/has-symbols": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/has-tostringtag": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"has-symbols": "^1.0.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/hasown": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"function-bind": "^1.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/math-intrinsics": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/mime-db": {
|
"node_modules/mime-db": {
|
||||||
"version": "1.52.0",
|
"version": "1.52.0",
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
|
|
@ -152,6 +337,7 @@
|
||||||
"version": "2.1.35",
|
"version": "2.1.35",
|
||||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mime-db": "1.52.0"
|
"mime-db": "1.52.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.8.2",
|
"axios": "^1.12.0",
|
||||||
"ethers": "^6.13.2"
|
"ethers": "^6.13.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue