aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--Makefile4
-rw-r--r--README.md6
-rw-r--r--contrib/epee/include/storages/levin_abstract_invoke2.h2
-rw-r--r--src/daemon/rpc_command_executor.cpp8
-rw-r--r--src/ringct/rctOps.cpp59
-rw-r--r--src/ringct/rctOps.h24
-rw-r--r--src/simplewallet/simplewallet.cpp24
-rw-r--r--src/wallet/wallet2.cpp30
-rw-r--r--src/wallet/wallet2.h9
-rw-r--r--tests/performance_tests/CMakeLists.txt1
-rw-r--r--tests/performance_tests/generate_keypair.h51
-rw-r--r--tests/performance_tests/main.cpp4
-rw-r--r--utils/gpg_keys/guzzi.asc30
14 files changed, 161 insertions, 93 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d82324a3..2d4f4f24b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -572,6 +572,8 @@ find_package(Boost 1.58 QUIET REQUIRED COMPONENTS system filesystem thread date_
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
if(NOT Boost_FOUND)
die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (1.58) or the equivalent")
+elseif(Boost_FOUND)
+ message(STATUS "Found Boost Version: ${Boost_VERSION}")
endif()
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
diff --git a/Makefile b/Makefile
index fc79958f6..777769f13 100644
--- a/Makefile
+++ b/Makefile
@@ -62,11 +62,11 @@ coverage:
mkdir -p build/debug
cd build/debug && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Debug -D COVERAGE=ON ../.. && $(MAKE) && $(MAKE) test
-release-static-arm6:
+release-static-armv6:
mkdir -p build/release
cd build/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv6zk" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE)
-release-static-arm7:
+release-static-armv7:
mkdir -p build/release
cd build/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release ../.. && $(MAKE)
diff --git a/README.md b/README.md
index 36f78711c..61f7da79d 100644
--- a/README.md
+++ b/README.md
@@ -290,9 +290,9 @@ By default, in either dynamically or statically linked builds, binaries target t
* ```make release-static-64``` builds binaries on Linux on x86_64 portable across POSIX systems on x86_64 processors
* ```make release-static-32``` builds binaries on Linux on x86_64 or i686 portable across POSIX systems on i686 processors
-* ```make release-static-arm8``` builds binaries on Linux on armv8 portable across POSIX systems on armv8 processors
-* ```make release-static-arm7``` builds binaries on Linux on armv7 portable across POSIX systems on armv7 processors
-* ```make release-static-arm6``` builds binaries on Linux on armv7 or armv6 portable across POSIX systems on armv6 processors, such as the Raspberry Pi
+* ```make release-static-armv8``` builds binaries on Linux portable across POSIX systems on armv8 processors
+* ```make release-static-armv7``` builds binaries on Linux portable across POSIX systems on armv7 processors
+* ```make release-static-armv6``` builds binaries on Linux portable across POSIX systems on armv6 processors
* ```make release-static-win64``` builds binaries on 64-bit Windows portable across 64-bit Windows systems
* ```make release-static-win32``` builds binaries on 64-bit or 32-bit Windows portable across 32-bit Windows systems
diff --git a/contrib/epee/include/storages/levin_abstract_invoke2.h b/contrib/epee/include/storages/levin_abstract_invoke2.h
index 73ede1b12..8c4fb9ccd 100644
--- a/contrib/epee/include/storages/levin_abstract_invoke2.h
+++ b/contrib/epee/include/storages/levin_abstract_invoke2.h
@@ -281,7 +281,7 @@ namespace epee
#define END_INVOKE_MAP2() \
- LOG_ERROR("Unkonown command:" << command); \
+ LOG_ERROR("Unknown command:" << command); \
return LEVIN_ERROR_CONNECTION_HANDLER_NOT_DEFINED; \
}
}
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index d8d8aac99..7d50ae76b 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -859,10 +859,10 @@ bool t_rpc_command_executor::print_transaction_pool_stats() {
for (const auto &tx_info: res.transactions)
{
bytes += tx_info.blob_size;
- if (min_bytes == 0 || bytes < min_bytes)
- min_bytes = bytes;
- if (bytes > max_bytes)
- max_bytes = bytes;
+ if (min_bytes == 0 || tx_info.blob_size < min_bytes)
+ min_bytes = tx_info.blob_size;
+ if (tx_info.blob_size > max_bytes)
+ max_bytes = tx_info.blob_size;
if (!tx_info.relayed)
n_not_relayed++;
fee += tx_info.fee;
diff --git a/src/ringct/rctOps.cpp b/src/ringct/rctOps.cpp
index 239168388..cf55897a7 100644
--- a/src/ringct/rctOps.cpp
+++ b/src/ringct/rctOps.cpp
@@ -37,50 +37,12 @@ namespace rct {
//Various key initialization functions
- //Creates a zero scalar
- void zero(key &zero) {
- memset(&zero, 0, 32);
- }
-
- //Creates a zero scalar
- key zero() {
- static const key z = { {0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 } };
- return z;
- }
-
- //Creates a zero elliptic curve point
- void identity(key &Id) {
- Id[0] = (unsigned char)(0x01);
- memset(Id.bytes+1, 0, 31);
- }
-
- //Creates a zero elliptic curve point
- key identity() {
- key Id;
- Id[0] = (unsigned char)(0x01);
- memset(Id.bytes+1, 0, 31);
- return Id;
- }
-
- //copies a scalar or point
- void copy(key &AA, const key &A) {
- memcpy(&AA, &A, 32);
- }
-
- //copies a scalar or point
- key copy(const key &A) {
- key AA;
- memcpy(&AA, &A, 32);
- return AA;
- }
-
-
//initializes a key matrix;
//first parameter is rows,
//second is columns
- keyM keyMInit(int rows, int cols) {
+ keyM keyMInit(size_t rows, size_t cols) {
keyM rv(cols);
- int i = 0;
+ size_t i = 0;
for (i = 0 ; i < cols ; i++) {
rv[i] = keyV(rows);
}
@@ -107,11 +69,12 @@ namespace rct {
//Generates a vector of secret key
//Mainly used in testing
- keyV skvGen(int rows ) {
+ keyV skvGen(size_t rows ) {
keyV rv(rows);
- int i = 0;
+ size_t i = 0;
+ crypto::rand(rows * sizeof(key), (uint8_t*)&rv[0]);
for (i = 0 ; i < rows ; i++) {
- skGen(rv[i]);
+ sc_reduce32(rv[i].bytes);
}
return rv;
}
@@ -155,7 +118,7 @@ namespace rct {
//generates a <secret , public> / Pedersen commitment but takes bH as input
- tuple<ctkey, ctkey> ctskpkGen(key bH) {
+ tuple<ctkey, ctkey> ctskpkGen(const key &bH) {
ctkey sk, pk;
skpkGen(sk.dest, pk.dest);
skpkGen(sk.mask, pk.mask);
@@ -172,12 +135,12 @@ namespace rct {
return mask;
}
- key commit(xmr_amount amount, key mask) {
- mask = scalarmultBase(mask);
+ key commit(xmr_amount amount, const key &mask) {
+ key c = scalarmultBase(mask);
key am = d2h(amount);
key bH = scalarmultH(am);
- addKeys(mask, mask, bH);
- return mask;
+ addKeys(c, c, bH);
+ return c;
}
//generates a random uint long long (for testing)
diff --git a/src/ringct/rctOps.h b/src/ringct/rctOps.h
index a7e13eefa..cd3a6dc0d 100644
--- a/src/ringct/rctOps.h
+++ b/src/ringct/rctOps.h
@@ -64,19 +64,23 @@ namespace rct {
//Various key initialization functions
+ static const key Z = { {0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 } };
+ static const key I = { {0x01, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 } };
+
//Creates a zero scalar
- key zero();
- void zero(key &z);
+ inline key zero() { return Z; }
+ inline void zero(key &z) { memset(&z, 0, 32); }
//Creates a zero elliptic curve point
- key identity();
- void identity(key &Id);
+ inline key identity() { return I; }
+ inline void identity(key &Id) { memcpy(&Id, &I, 32); }
//copies a scalar or point
- void copy(key &AA, const key &A);
- key copy(const key & AA);
+ inline void copy(key &AA, const key &A) { memcpy(&AA, &A, 32); }
+ inline key copy(const key & A) { key AA; memcpy(&AA, &A, 32); return AA; }
+
//initializes a key matrix;
//first parameter is rows,
//second is columns
- keyM keyMInit(int, int);
+ keyM keyMInit(size_t rows, size_t cols);
//Various key generation functions
@@ -85,7 +89,7 @@ namespace rct {
void skGen(key &);
//generates a vector of secret keys of size "int"
- keyV skvGen(int );
+ keyV skvGen(size_t rows );
//generates a random curve point (for testing)
key pkGen();
@@ -97,9 +101,9 @@ namespace rct {
//generates C =aG + bH from b, a is random
void genC(key & C, const key & a, xmr_amount amount);
//this one is mainly for testing, can take arbitrary amounts..
- tuple<ctkey, ctkey> ctskpkGen(key bH);
+ tuple<ctkey, ctkey> ctskpkGen(const key &bH);
// make a pedersen commitment with given key
- key commit(xmr_amount amount, key mask);
+ key commit(xmr_amount amount, const key &mask);
// make a pedersen commitment with zero key
key zeroCommit(xmr_amount amount);
//generates a random uint long long
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 3f494f512..09c574528 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -3128,9 +3128,9 @@ bool simple_wallet::accept_loaded_tx(const tools::wallet2::unsigned_tx_set &txs)
if (mixin < min_mixin)
min_mixin = mixin;
}
- for (size_t d = 0; d < cd.destinations.size(); ++d)
+ for (size_t d = 0; d < cd.splitted_dsts.size(); ++d)
{
- const tx_destination_entry &entry = cd.destinations[d];
+ const tx_destination_entry &entry = cd.splitted_dsts[d];
std::string address = get_account_address_as_str(m_wallet->testnet(), entry.addr);
std::unordered_map<std::string,uint64_t>::iterator i = dests.find(address);
if (i == dests.end())
@@ -3141,9 +3141,19 @@ bool simple_wallet::accept_loaded_tx(const tools::wallet2::unsigned_tx_set &txs)
}
if (cd.change_dts.amount > 0)
{
- dests.insert(std::make_pair(get_account_address_as_str(m_wallet->testnet(), cd.change_dts.addr), cd.change_dts.amount));
- amount_to_dests += cd.change_dts.amount;
- change += cd.change_dts.amount;
+ std::unordered_map<std::string, uint64_t>::iterator it = dests.find(get_account_address_as_str(m_wallet->testnet(), cd.change_dts.addr));
+ if (it == dests.end())
+ {
+ fail_msg_writer() << tr("Claimed change does not go to a paid address");
+ return false;
+ }
+ if (it->second < cd.change_dts.amount)
+ {
+ fail_msg_writer() << tr("Claimed change is larger than payment to the change address");
+ return false;
+ }
+ change = cd.change_dts.amount;
+ it->second -= cd.change_dts.amount;
}
}
std::string dest_string;
@@ -3158,7 +3168,7 @@ bool simple_wallet::accept_loaded_tx(const tools::wallet2::unsigned_tx_set &txs)
dest_string = tr("with no destinations");
uint64_t fee = amount - amount_to_dests;
- std::string prompt_str = (boost::format(tr("Loaded %lu transactions, for %s, fee %s, change %s, %s, with min mixin %lu (full details in log file). Is this okay? (Y/Yes/N/No)")) % (unsigned long)txs.txes.size() % print_money(amount) % print_money(fee) % print_money(change) % dest_string % (unsigned long)min_mixin).str();
+ std::string prompt_str = (boost::format(tr("Loaded %lu transactions, for %s, fee %s, change %s, %s, with min mixin %lu. Is this okay? (Y/Yes/N/No)")) % (unsigned long)txs.txes.size() % print_money(amount) % print_money(fee) % print_money(change) % dest_string % (unsigned long)min_mixin).str();
std::string accepted = command_line::input_line(prompt_str);
return is_it_true(accepted);
}
@@ -3236,7 +3246,7 @@ bool simple_wallet::submit_transfer(const std::vector<std::string> &args_)
if (dust_in_fee != 0) prompt << boost::format(tr(", of which %s is dust from change")) % print_money(dust_in_fee);
if (dust_not_in_fee != 0) prompt << tr(".") << ENDL << boost::format(tr("A total of %s from dust change will be sent to dust address"))
% print_money(dust_not_in_fee);
- prompt << tr(".") << ENDL << tr("Is this okay? (Y/Yes/N/No)");
+ prompt << tr(".") << ENDL << "Full transaction details are available in the log file" << ENDL << tr("Is this okay? (Y/Yes/N/No)");
std::string accepted = command_line::input_line(prompt.str());
if (std::cin.eof())
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 23e016f7b..a02c2e4e5 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -74,8 +74,8 @@ using namespace cryptonote;
// arbitrary, used to generate different hashes from the same input
#define CHACHA8_KEY_TAIL 0x8c
-#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\001"
-#define SIGNED_TX_PREFIX "Monero signed tx set\001"
+#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\002"
+#define SIGNED_TX_PREFIX "Monero signed tx set\002"
#define RECENT_OUTPUT_RATIO (0.25) // 25% of outputs are from the recent zone
#define RECENT_OUTPUT_ZONE (5 * 86400) // last 5 days are the recent zone
@@ -2630,11 +2630,8 @@ bool wallet2::sign_tx(const std::string &unsigned_filename, const std::string &s
signed_txes.ptx.push_back(pending_tx());
tools::wallet2::pending_tx &ptx = signed_txes.ptx.back();
crypto::secret_key tx_key;
- std::vector<cryptonote::tx_destination_entry> dests = sd.destinations;
- if (sd.change_dts.amount > 0)
- dests.push_back(sd.change_dts);
- bool r = cryptonote::construct_tx_and_get_tx_key(m_account.get_keys(), sd.sources, dests, sd.extra, ptx.tx, sd.unlock_time, tx_key, sd.use_rct);
- THROW_WALLET_EXCEPTION_IF(!r, error::tx_not_constructed, sd.sources, sd.destinations, sd.unlock_time, m_testnet);
+ bool r = cryptonote::construct_tx_and_get_tx_key(m_account.get_keys(), sd.sources, sd.splitted_dsts, sd.extra, ptx.tx, sd.unlock_time, tx_key, sd.use_rct);
+ THROW_WALLET_EXCEPTION_IF(!r, error::tx_not_constructed, sd.sources, sd.splitted_dsts, sd.unlock_time, m_testnet);
// we don't test tx size, because we don't know the current limit, due to not having a blockchain,
// and it's a bit pointless to fail there anyway, since it'd be a (good) guess only. We sign anyway,
// and if we really go over limit, the daemon will reject when it gets submitted. Chances are it's
@@ -2661,13 +2658,13 @@ bool wallet2::sign_tx(const std::string &unsigned_filename, const std::string &s
ptx.key_images = key_images;
ptx.fee = 0;
for (const auto &i: sd.sources) ptx.fee += i.amount;
- for (const auto &i: dests) ptx.fee -= i.amount;
+ for (const auto &i: sd.splitted_dsts) ptx.fee -= i.amount;
ptx.dust = 0;
ptx.dust_added_to_fee = false;
ptx.change_dts = sd.change_dts;
-// ptx.selected_transfers = selected_transfers;
+ ptx.selected_transfers = sd.selected_transfers;
ptx.tx_key = rct::rct2sk(rct::identity()); // don't send it back to the untrusted view wallet
- ptx.dests = sd.destinations;
+ ptx.dests = sd.splitted_dsts;
ptx.construction_data = sd;
}
@@ -2709,7 +2706,8 @@ bool wallet2::load_tx(const std::string &signed_filename, std::vector<tools::wal
LOG_PRINT_L0("Failed to parse data from " << signed_filename);
return false;
}
- LOG_PRINT_L1("Loaded signed tx data from binary: " << signed_txs.ptx.size() << " transactions");
+ LOG_PRINT_L0("Loaded signed tx data from binary: " << signed_txs.ptx.size() << " transactions");
+ for (auto &ptx: signed_txs.ptx) LOG_PRINT_L0(cryptonote::obj_to_json_str(ptx.tx));
ptx = signed_txs.ptx;
@@ -3188,8 +3186,9 @@ void wallet2::transfer_selected(const std::vector<cryptonote::tx_destination_ent
ptx.tx_key = tx_key;
ptx.dests = dsts;
ptx.construction_data.sources = sources;
- ptx.construction_data.destinations = dsts;
ptx.construction_data.change_dts = change_dts;
+ ptx.construction_data.splitted_dsts = splitted_dsts;
+ ptx.construction_data.selected_transfers = selected_transfers;
ptx.construction_data.extra = tx.extra;
ptx.construction_data.unlock_time = unlock_time;
ptx.construction_data.use_rct = false;
@@ -3307,8 +3306,9 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
ptx.tx_key = tx_key;
ptx.dests = dsts;
ptx.construction_data.sources = sources;
- ptx.construction_data.destinations = dsts;
ptx.construction_data.change_dts = change_dts;
+ ptx.construction_data.splitted_dsts = splitted_dsts;
+ ptx.construction_data.selected_transfers = selected_transfers;
ptx.construction_data.extra = tx.extra;
ptx.construction_data.unlock_time = unlock_time;
ptx.construction_data.use_rct = true;
@@ -3531,7 +3531,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
if (!prefered_inputs.empty())
{
string s;
- for (auto i: prefered_inputs) s += print_money(m_transfers[i].amount()) + " ";
+ for (auto i: prefered_inputs) s += boost::lexical_cast<std::string>(i) + "(" + print_money(m_transfers[i].amount()) + ") ";
LOG_PRINT_L1("Found prefered rct inputs for rct tx: " << s);
}
}
@@ -3551,7 +3551,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
size_t idx = !prefered_inputs.empty() ? pop_back(prefered_inputs) : !unused_transfers_indices.empty() ? pop_best_value(unused_transfers_indices, tx.selected_transfers) : pop_best_value(unused_dust_indices, tx.selected_transfers);
const transfer_details &td = m_transfers[idx];
- LOG_PRINT_L2("Picking output " << idx << ", amount " << print_money(td.amount()));
+ LOG_PRINT_L2("Picking output " << idx << ", amount " << print_money(td.amount()) << ", ki " << td.m_key_image);
// add this output to the list to spend
tx.selected_transfers.push_back(idx);
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index fa9797219..39a2a37f1 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -154,16 +154,18 @@ namespace tools
struct tx_construction_data
{
std::vector<cryptonote::tx_source_entry> sources;
- std::vector<cryptonote::tx_destination_entry> destinations;
cryptonote::tx_destination_entry change_dts;
+ std::vector<cryptonote::tx_destination_entry> splitted_dsts;
+ std::list<size_t> selected_transfers;
std::vector<uint8_t> extra;
uint64_t unlock_time;
bool use_rct;
BEGIN_SERIALIZE_OBJECT()
FIELD(sources)
- FIELD(destinations)
FIELD(change_dts)
+ FIELD(splitted_dsts)
+ FIELD(selected_transfers)
FIELD(extra)
VARINT_FIELD(unlock_time)
FIELD(use_rct)
@@ -930,8 +932,9 @@ namespace tools
ptx.tx_key = tx_key;
ptx.dests = dsts;
ptx.construction_data.sources = sources;
- ptx.construction_data.destinations = dsts;
ptx.construction_data.change_dts = change_dts;
+ ptx.construction_data.splitted_dsts = splitted_dsts;
+ ptx.construction_data.selected_transfers = selected_transfers;
ptx.construction_data.extra = tx.extra;
ptx.construction_data.unlock_time = unlock_time;
ptx.construction_data.use_rct = false;
diff --git a/tests/performance_tests/CMakeLists.txt b/tests/performance_tests/CMakeLists.txt
index 5ec53cd2b..2ecd917c0 100644
--- a/tests/performance_tests/CMakeLists.txt
+++ b/tests/performance_tests/CMakeLists.txt
@@ -39,6 +39,7 @@ set(performance_tests_headers
generate_key_derivation.h
generate_key_image.h
generate_key_image_helper.h
+ generate_keypair.h
is_out_to_acc.h
multi_tx_test_base.h
performance_tests.h
diff --git a/tests/performance_tests/generate_keypair.h b/tests/performance_tests/generate_keypair.h
new file mode 100644
index 000000000..4ba577e2a
--- /dev/null
+++ b/tests/performance_tests/generate_keypair.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2014-2016, The Monero Project
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this list of
+// conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list
+// of conditions and the following disclaimer in the documentation and/or other
+// materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its contributors may be
+// used to endorse or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// 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.
+//
+// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
+
+#pragma once
+
+#include "crypto/crypto.h"
+#include "cryptonote_core/cryptonote_basic.h"
+
+class test_generate_keypair
+{
+public:
+ static const size_t loop_count = 10000;
+
+ bool init()
+ {
+ return true;
+ }
+
+ bool test()
+ {
+ cryptonote::keypair::generate();
+ return true;
+ }
+};
diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp
index d09276230..3f4751ee8 100644
--- a/tests/performance_tests/main.cpp
+++ b/tests/performance_tests/main.cpp
@@ -41,6 +41,7 @@
#include "generate_key_derivation.h"
#include "generate_key_image.h"
#include "generate_key_image_helper.h"
+#include "generate_keypair.h"
#include "is_out_to_acc.h"
int main(int argc, char** argv)
@@ -51,6 +52,7 @@ int main(int argc, char** argv)
performance_timer timer;
timer.start();
+goto ree;
TEST_PERFORMANCE3(test_construct_tx, 1, 1, false);
TEST_PERFORMANCE3(test_construct_tx, 1, 2, false);
TEST_PERFORMANCE3(test_construct_tx, 1, 10, false);
@@ -100,6 +102,8 @@ int main(int argc, char** argv)
TEST_PERFORMANCE0(test_derive_public_key);
TEST_PERFORMANCE0(test_derive_secret_key);
TEST_PERFORMANCE0(test_ge_frombytes_vartime);
+ree:
+ TEST_PERFORMANCE0(test_generate_keypair);
TEST_PERFORMANCE0(test_cn_slow_hash);
diff --git a/utils/gpg_keys/guzzi.asc b/utils/gpg_keys/guzzi.asc
new file mode 100644
index 000000000..2c374523f
--- /dev/null
+++ b/utils/gpg_keys/guzzi.asc
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQENBFed+r8BCADScb2cSXAk7v0+tbEUDOf6VuhKc26C2Kfwk/Ei2iWC7Vaa/bru
+aNLpM1nVuWKdNnfX3MZo38yItvxS4HlkI29pXcrzyqd3sfPklPgLliaayKkqh1Xx
+jl6T5NM9VVJ5dMo0pMzns49xFknOsBXdSH/ziZVD0SuSNctNb5XraCrfuDPw0fn0
+lLZ4a6WwUXL9+4Y+xbvNmYHjlnAB7xjvOpprSuJ769zDGpQlV2UXeRqjjMPzVbH4
+PYgmNAItbhvog2UfKeQK8K0Fwj1uNsZ5fnqvoa9lsgsbyV4x4DbQu/W5NVP1ylDC
+MnHKABa8Rg8zzjp0G7YuBGPy/JPffwZBoEuhABEBAAG0I2d1enppam9uZXMgPGd1
+enppam9uZXMxMkBnbWFpbC5jb20+iQE5BBMBCAAjBQJXnfq/AhsDBwsJCAcDAgEG
+FQgCCQoLBBYCAwECHgECF4AACgkQXNw+OlijFbIhbggAt6pEz8g++3vHXFaEsOiK
+fSJYheSuY2NGOgmS2WBWdPp6z7nobSScYzCeF4pOnCFxM99O7i9/kfDzVp4W7lXL
+VIvLiLvKwWLkVhHhgOlerLRYNR+TjS+GtGhhL6Y2Yj1AkG2pJd59SBhbhdkqdNo0
+D614GjnyK8SGlz9xjV9ZE4csTPH2p9xOqJoRCoUuEGWHNoox0vJTuJuKhCHta1y8
+T84uFcGCagxHxqv5eqgype32iueSMfsbyyFJ2WaLaCyYKcPGbXG9iFFLqtvJU9xv
+46oPYd1HYjtXVaRnbtiDljlokEiXiQ7WPsYEgZy76KMJ30fEyXICPYvTDR1aFLYI
+1LkBDQRXnfq/AQgA2JHleHFNtQM1ECeEGAYoGzt+IyPKzuT43ZgwuxK4t0kfKNN4
+KvihBcmFqjJAwwmS+9oNPeU4BgZ4k8DX2JP3JoGzFF7MK+i8OFW0ckZ4kbNZhtq3
+e8a1fkWnkA6pQA1JppiZqqI+VNLTTPvsH8pG2UA4rL4XvxeJ7jrFnQMCfiOiuIsd
+C+MeUAHthNeLreq1LXx0s0GfPMwMM5ckKdtEKmMVCw1zZ/J2RyBzkyWdyMVPSRRV
+lCDtgSivCSG+Y+ub4tgV8ast2/wKxCV92oRaeMQVsWZ9PHdVq0tUn4I98UtCwOh7
+reMPi6a8eWJcQ/s07schqXt2iTssv/1V3PTjZQARAQABiQEfBBgBCAAJBQJXnfq/
+AhsMAAoJEFzcPjpYoxWydDsH/2sLAtzKVgbeZFF/0e+6r/P0R3Fgkv6N9o+w4A5N
+pMDXCNjFjWVkYRgyON8Y8ijkkbIkBcXmp+01HxZjrQI0WavQaLj2tavz9Np/8wPb
+UXZYc0zjxki9mdFdNDW1vgoT9nSctB4bp0xf/NnYmkPMQfDzruVkf8bW6YQzkZRP
+apjY9IxUPKFx9hQcDAsov1xXww2uQPwEGHfeSMkeCU9zfPBNmaFCvBfFTFu5UHsl
+g2hw95UUsDlpYcMs7YdqYw40EXcTQJk1aoWT7kjO1KCQWF5EDc0YRhw/REXN9fJe
+S77oEy23Q/RtJQBXzHw3chyhe4/XMQQbmuY9+OfmhHVAbF4=
+=lOXz
+-----END PGP PUBLIC KEY BLOCK-----