aboutsummaryrefslogtreecommitdiff
path: root/tests/performance_tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-18 22:24:53 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-11 13:38:07 +0000
commit5ffb2ff9b7c301eda5811a939c705f26627c4735 (patch)
treeac1ed0c55f69db9e65ebca9567bf3013e55c3bb6 /tests/performance_tests
parentbulletproofs: a few fixes from the Kudelski review (diff)
downloadmonero-5ffb2ff9b7c301eda5811a939c705f26627c4735.tar.xz
v8: per byte fee, pad bulletproofs, fixed 11 ring size
Diffstat (limited to 'tests/performance_tests')
-rw-r--r--tests/performance_tests/check_tx_signature.h7
-rw-r--r--tests/performance_tests/main.cpp34
2 files changed, 22 insertions, 19 deletions
diff --git a/tests/performance_tests/check_tx_signature.h b/tests/performance_tests/check_tx_signature.h
index bcd3b3dfe..ee382d9ad 100644
--- a/tests/performance_tests/check_tx_signature.h
+++ b/tests/performance_tests/check_tx_signature.h
@@ -40,7 +40,7 @@
#include "multi_tx_test_base.h"
-template<size_t a_ring_size, size_t a_outputs, bool a_rct, bool a_bulletproof>
+template<size_t a_ring_size, size_t a_outputs, bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean>
class test_check_tx_signature : private multi_tx_test_base<a_ring_size>
{
static_assert(0 < a_ring_size, "ring_size must be greater than 0");
@@ -50,7 +50,6 @@ public:
static const size_t ring_size = a_ring_size;
static const size_t outputs = a_outputs;
static const bool rct = a_rct;
- static const bool bulletproof = a_bulletproof;
typedef multi_tx_test_base<a_ring_size> base_class;
@@ -72,7 +71,7 @@ public:
std::vector<crypto::secret_key> additional_tx_keys;
std::unordered_map<crypto::public_key, cryptonote::subaddress_index> subaddresses;
subaddresses[this->m_miners[this->real_source_idx].get_keys().m_account_address.m_spend_public_key] = {0,0};
- if (!construct_tx_and_get_tx_key(this->m_miners[this->real_source_idx].get_keys(), subaddresses, this->m_sources, destinations, cryptonote::account_public_address{}, std::vector<uint8_t>(), m_tx, 0, tx_key, additional_tx_keys, rct, bulletproof ? rct::RangeProofMultiOutputBulletproof : rct::RangeProofBorromean))
+ if (!construct_tx_and_get_tx_key(this->m_miners[this->real_source_idx].get_keys(), subaddresses, this->m_sources, destinations, cryptonote::account_public_address{}, std::vector<uint8_t>(), m_tx, 0, tx_key, additional_tx_keys, rct, range_proof_type))
return false;
get_transaction_prefix_hash(m_tx, m_tx_prefix_hash);
@@ -136,7 +135,7 @@ public:
m_txes.resize(a_num_txes + (extra_outs > 0 ? 1 : 0));
for (size_t n = 0; n < a_num_txes; ++n)
{
- if (!construct_tx_and_get_tx_key(this->m_miners[this->real_source_idx].get_keys(), subaddresses, this->m_sources, destinations, cryptonote::account_public_address{}, std::vector<uint8_t>(), m_txes[n], 0, tx_key, additional_tx_keys, true, rct::RangeProofMultiOutputBulletproof))
+ if (!construct_tx_and_get_tx_key(this->m_miners[this->real_source_idx].get_keys(), subaddresses, this->m_sources, destinations, cryptonote::account_public_address{}, std::vector<uint8_t>(), m_txes[n], 0, tx_key, additional_tx_keys, true, rct::RangeProofPaddedBulletproof))
return false;
}
diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp
index 19c2cb5e5..6007242bf 100644
--- a/tests/performance_tests/main.cpp
+++ b/tests/performance_tests/main.cpp
@@ -132,21 +132,25 @@ int main(int argc, char** argv)
TEST_PERFORMANCE3(filter, p, test_construct_tx, 100, 2, true);
TEST_PERFORMANCE3(filter, p, test_construct_tx, 100, 10, true);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 1, 2, false, false);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 2, false, false);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 10, 2, false, false);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 100, 2, false, false);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 10, false, false);
-
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 2, true, false);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 10, 2, true, false);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 100, 2, true, false);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 10, true, false);
-
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 2, true, true);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 10, 2, true, true);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 100, 2, true, true);
- TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 10, true, true);
+ TEST_PERFORMANCE3(filter, p, test_check_tx_signature, 1, 2, false);
+ TEST_PERFORMANCE3(filter, p, test_check_tx_signature, 2, 2, false);
+ TEST_PERFORMANCE3(filter, p, test_check_tx_signature, 10, 2, false);
+ TEST_PERFORMANCE3(filter, p, test_check_tx_signature, 100, 2, false);
+ TEST_PERFORMANCE3(filter, p, test_check_tx_signature, 2, 10, false);
+
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 2, true, rct::RangeProofBorromean);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 10, 2, true, rct::RangeProofBorromean);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 100, 2, true, rct::RangeProofBorromean);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 10, true, rct::RangeProofBorromean);
+
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 2, true, rct::RangeProofPaddedBulletproof);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 2, true, rct::RangeProofMultiOutputBulletproof);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 10, 2, true, rct::RangeProofPaddedBulletproof);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 10, 2, true, rct::RangeProofMultiOutputBulletproof);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 100, 2, true, rct::RangeProofPaddedBulletproof);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 100, 2, true, rct::RangeProofMultiOutputBulletproof);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 10, true, rct::RangeProofPaddedBulletproof);
+ TEST_PERFORMANCE4(filter, p, test_check_tx_signature, 2, 10, true, rct::RangeProofMultiOutputBulletproof);
TEST_PERFORMANCE3(filter, p, test_check_tx_signature_aggregated_bulletproofs, 2, 2, 64);
TEST_PERFORMANCE3(filter, p, test_check_tx_signature_aggregated_bulletproofs, 10, 2, 64);