Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aeon upstream 6 #175

Merged
merged 56 commits into from
Apr 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
997ddd9
remove unused code related to dynamic fee
stoffu Apr 8, 2020
a09ad1b
performance_tests: don't override log level to 0 /monero#4219
moneromooo-monero Jan 9, 2018
d52834d
bulletproofs: multi-output bulletproofs /monero#4219
moneromooo-monero Jan 3, 2018
bddd277
performance_tests: add (Borromean) range proofs /monero#4219
moneromooo-monero Jan 5, 2018
fda8fce
performance_tests: add RingCT MLSAG gen/ver tests /monero#4219
moneromooo-monero Dec 31, 2017
7fffcb2
performance_tests: add bulletproofs /monero#4219
moneromooo-monero Jan 5, 2018
fb97d4c
performance_tests: add crypto ops /monero#4219
moneromooo-monero Jan 5, 2018
70e4dd4
bulletproofs: misc optimizations /monero#4219
moneromooo-monero Jan 5, 2018
03a7982
ringct: add bos coster multiexp /monero#4219
moneromooo-monero Jan 9, 2018
5a34623
add Straus multiexp /monero#4219
moneromooo-monero Jan 14, 2018
4ec0222
performance_tests: add a --verbose flag, and default to terse /monero…
moneromooo-monero Jan 14, 2018
1f2218d
performance_tests: add tx checking tests with more than 2 outputs /mo…
moneromooo-monero Jan 14, 2018
9853b0d
bulletproofs: add multi output bulletproofs to rct /monero#4219
moneromooo-monero Jan 17, 2018
bfd59b9
multiexp: bos coster now works for just one point /monero#4219
moneromooo-monero Jan 18, 2018
bd0ba4b
make straus cached mode thread safe, and add tests for it /monero#4219
moneromooo-monero Jan 18, 2018
e0eed7b
bulletproofs: add aggregated verification /monero#4219
moneromooo-monero Feb 3, 2018
b6ad648
performance_tests: add signature generation/verification /monero#4219
moneromooo-monero Mar 16, 2018
a72580c
aligned: aligned memory alloc/realloc/free /monero#4219
moneromooo-monero Mar 27, 2018
035bd3e
multiexp: some speedups /monero#4219
moneromooo-monero Mar 25, 2018
d59db98
Bulletproof aggregated verification and tests /monero#4219
moneromooo-monero Mar 30, 2018
5ef34c7
Add a define for the max number of bulletproof multi-outputs /monero#…
moneromooo-monero Mar 30, 2018
85c17e4
require canonical multi output bulletproof layout /monero#4219
moneromooo-monero Mar 31, 2018
8a573b0
unit_tests: a couple more bulletproof unit tests for gamma /monero#4219
moneromooo-monero Apr 2, 2018
c561253
performance_tests: document the tested bulletproof layouts /monero#4219
moneromooo-monero May 21, 2018
bc0e578
precalc the ge_p3 representation of H /monero#4219
moneromooo-monero May 24, 2018
2217140
multiexp: cut down on memory allocations /monero#4219
moneromooo-monero May 26, 2018
b9c3516
Pippenger multiexp /monero#4219
moneromooo-monero May 27, 2018
67319b0
performance_tests: add aggregated bulletproof tx verification /monero…
moneromooo-monero May 28, 2018
89b224e
perf_timer: split timer class into a base one and a logging one /mone…
moneromooo-monero May 28, 2018
91bbd6d
performance_tests: add stats and loop count multiplier options /moner…
moneromooo-monero May 28, 2018
5ae0467
add pippenger unit tests /monero#4219
moneromooo-monero May 29, 2018
16aabe6
Add Pippenger cache and limit Straus cache size /monero#4219
moneromooo-monero May 29, 2018
5d59a3e
bulletproofs: speed up a few multiplies using existing Hi cache /mone…
moneromooo-monero Jun 20, 2018
d7f52ce
bulletproofs: reject points not in the main subgroup /monero#4219
moneromooo-monero Jun 29, 2018
ae282b6
bulletproofs: a few fixes from the Kudelski review /monero#4219
moneromooo-monero Jul 16, 2018
5579034
v8: per byte fee, pad bulletproofs, fixed 11 ring size /monero#4219
moneromooo-monero Jul 18, 2018
654d79f
bulletproofs: reject x, y, z, or w[i] being zero /monero#4219
moneromooo-monero Jul 24, 2018
81baba2
Check inputs to addKeys are in range /monero#4219
moneromooo-monero Jul 24, 2018
7871cfd
multiexp: fix wrong Bos-Coster result for 1 non trivial input /monero…
moneromooo-monero Jul 24, 2018
97c3479
crypto: never return zero in random32_unbiased /monero#4219
moneromooo-monero Jul 24, 2018
cd85379
crypto: some paranoid checks in generate_signature/check_signature /m…
moneromooo-monero Jul 24, 2018
6d1a253
ringct: prevent a potential very large allocation /monero#4219
moneromooo-monero Jul 24, 2018
d1a6e1f
cryptonote_basic: check output type before using it /monero#4219
moneromooo-monero Jul 24, 2018
820a1a6
ringct: error out when hashToPoint* returns the point at infinity /mo…
moneromooo-monero Jul 25, 2018
122086c
multiexp: fix maxscalar off by one /monero#4219
moneromooo-monero Jul 25, 2018
476e732
core_tests: add a test for a tx with empty bulletproof /monero#4219
moneromooo-monero Jul 26, 2018
d91bc25
unit_tests: add a few more multiexp unit tests /monero#4219
moneromooo-monero Jul 26, 2018
22a093a
more comprehensive test for ge_p3 comparison to identity/point at inf…
moneromooo-monero Jul 26, 2018
b8d6085
fuzz_tests: add a bulletproof fuzz test /monero#4219
moneromooo-monero Jul 27, 2018
fbdc0c3
core_tests: add a test for 4-aggregated BP verification /monero#4219
moneromooo-monero Jul 29, 2018
0d56c31
performance_tests: add padded bulletproof construction /monero#4219
moneromooo-monero Aug 3, 2018
ea4e921
bulletproofs: match aggregated verification to sarang's latest protot…
moneromooo-monero Aug 6, 2018
4311c74
bulletproofs: scale points by 8 to ensure subgroup validity /monero#4219
moneromooo-monero Aug 6, 2018
9826b5f
bulletproofs: speed up the latest changes a bit /monero#4219
moneromooo-monero Aug 6, 2018
8fa5251
bulletproofs: #include <openssl/bn.h> /monero#4219
moneromooo-monero Aug 21, 2018
33370ec
comment out unused features from core tests
stoffu Apr 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contrib/fuzz_testing/fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ fi
type="$1"
if test -z "$type"
then
echo "usage: $0 block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json|base58|parse-url|http-client|levin"
echo "usage: $0 block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json|base58|parse-url|http-client|levin|bulletproof"
exit 1
fi
case "$type" in
block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json|base58|parse-url|http-client|levin) ;;
*) echo "usage: $0 block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json|base58|parse-url|http-client|levin"; exit 1 ;;
block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json|base58|parse-url|http-client|levin|bulletproof) ;;
*) echo "usage: $0 block|transaction|signature|cold-outputs|cold-transaction|load-from-binary|load-from-json|base58|parse-url|http-client|levin|bulletproof"; exit 1 ;;
esac

if test -d "fuzz-out/$type"
Expand Down
10 changes: 5 additions & 5 deletions src/blockchain_db/berkeleydb/db_bdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ struct Dbt_safe : public Dbt
namespace cryptonote
{

void BlockchainBDB::add_block(const block& blk, const size_t& block_size, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const crypto::hash& blk_hash)
void BlockchainBDB::add_block(const block& blk, size_t block_weight, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const crypto::hash& blk_hash)
{
LOG_PRINT_L3("BlockchainBDB::" << __func__);
check_open();
Expand Down Expand Up @@ -255,7 +255,7 @@ void BlockchainBDB::add_block(const block& blk, const size_t& block_size, const
if (res)
throw0(DB_ERROR("Failed to add block blob to db transaction."));

Dbt_copy<size_t> sz(block_size);
Dbt_copy<size_t> sz(block_weight);
if (m_block_sizes->put(DB_DEFAULT_TX, &key, &sz, 0))
throw0(DB_ERROR("Failed to add block size to db transaction."));

Expand Down Expand Up @@ -1353,7 +1353,7 @@ uint64_t BlockchainBDB::get_top_block_timestamp() const
return get_block_timestamp(m_height - 1);
}

size_t BlockchainBDB::get_block_size(const uint64_t& height) const
size_t BlockchainBDB::get_block_weight(const uint64_t& height) const
{
LOG_PRINT_L3("BlockchainBDB::" << __func__);
check_open();
Expand Down Expand Up @@ -1861,7 +1861,7 @@ void BlockchainBDB::block_txn_abort()
// TODO
}

uint64_t BlockchainBDB::add_block(const block& blk, const size_t& block_size, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const std::vector<transaction>& txs)
uint64_t BlockchainBDB::add_block(const block& blk, size_t block_weight, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const std::vector<transaction>& txs)
{
LOG_PRINT_L3("BlockchainBDB::" << __func__);
check_open();
Expand All @@ -1874,7 +1874,7 @@ uint64_t BlockchainBDB::add_block(const block& blk, const size_t& block_size, co
uint64_t num_outputs = m_num_outputs;
try
{
BlockchainDB::add_block(blk, block_size, cumulative_difficulty, coins_generated, txs);
BlockchainDB::add_block(blk, block_weight, cumulative_difficulty, coins_generated, txs);
m_write_txn = NULL;

TIME_MEASURE_START(time1);
Expand Down
6 changes: 3 additions & 3 deletions src/blockchain_db/berkeleydb/db_bdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class BlockchainBDB : public BlockchainDB

virtual uint64_t get_top_block_timestamp() const;

virtual size_t get_block_size(const uint64_t& height) const;
virtual size_t get_block_weight(const uint64_t& height) const;

virtual difficulty_type get_block_cumulative_difficulty(const uint64_t& height) const;

Expand Down Expand Up @@ -318,7 +318,7 @@ class BlockchainBDB : public BlockchainDB
virtual bool has_key_image(const crypto::key_image& img) const;

virtual uint64_t add_block( const block& blk
, const size_t& block_size
, size_t block_weight
, const difficulty_type& cumulative_difficulty
, const uint64_t& coins_generated
, const std::vector<transaction>& txs
Expand Down Expand Up @@ -353,7 +353,7 @@ class BlockchainBDB : public BlockchainDB

private:
virtual void add_block( const block& blk
, const size_t& block_size
, size_t block_weight
, const difficulty_type& cumulative_difficulty
, const uint64_t& coins_generated
, const crypto::hash& block_hash
Expand Down
6 changes: 3 additions & 3 deletions src/blockchain_db/blockchain_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const transacti
}

uint64_t BlockchainDB::add_block( const block& blk
, const size_t& block_size
, uint64_t long_term_block_size
, size_t block_weight
, uint64_t long_term_block_weight
, const difficulty_type& cumulative_difficulty
, const uint64_t& coins_generated
, const std::vector<transaction>& txs
Expand Down Expand Up @@ -242,7 +242,7 @@ uint64_t BlockchainDB::add_block( const block& blk

// call out to subclass implementation to add the block & metadata
time1 = epee::misc_utils::get_tick_count();
add_block(blk, block_size, long_term_block_size, cumulative_difficulty, coins_generated, num_rct_outs, blk_hash);
add_block(blk, block_weight, long_term_block_weight, cumulative_difficulty, coins_generated, num_rct_outs, blk_hash);
TIME_MEASURE_FINISH(time1);
time_add_block1 += time1;

Expand Down
46 changes: 23 additions & 23 deletions src/blockchain_db/blockchain_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct txpool_tx_meta_t
{
crypto::hash max_used_block_id;
crypto::hash last_failed_id;
uint64_t blob_size;
uint64_t weight;
uint64_t fee;
uint64_t max_used_block_height;
uint64_t last_failed_height;
Expand Down Expand Up @@ -358,15 +358,15 @@ class BlockchainDB
* subclass of DB_EXCEPTION
*
* @param blk the block to be added
* @param block_size the size of the block (transactions and all)
* @param long_term_block_size the long term block size of the block (transactions and all)
* @param block_weight the weight of the block (transactions and all)
* @param long_term_block_weight the long term block weight of the block (transactions and all)
* @param cumulative_difficulty the accumulated difficulty after this block
* @param coins_generated the number of coins generated total after this block
* @param blk_hash the hash of the block
*/
virtual void add_block( const block& blk
, const size_t& block_size
, uint64_t long_term_block_size
, size_t block_weight
, uint64_t long_term_block_weight
, const difficulty_type& cumulative_difficulty
, const uint64_t& coins_generated
, uint64_t num_rct_outs
Expand All @@ -378,7 +378,7 @@ class BlockchainDB
*
* The subclass implementing this will remove the block data from the top
* block in the chain. The data to be removed is that which was added in
* BlockchainDB::add_block(const block& blk, const size_t& block_size, uint64_t long_term_block_size, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const crypto::hash& blk_hash)
* BlockchainDB::add_block(const block& blk, size_t block_weight, uint64_t long_term_block_weight, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const crypto::hash& blk_hash)
*
* If any of this cannot be done, the subclass should throw the corresponding
* subclass of DB_EXCEPTION
Expand Down Expand Up @@ -791,17 +791,17 @@ class BlockchainDB
* subclass of DB_EXCEPTION
*
* @param blk the block to be added
* @param block_size the size of the block (transactions and all)
* @param long_term_block_size the long term size of the block (transactions and all)
* @param block_weight the weight of the block (transactions and all)
* @param long_term_block_weight the long term weight of the block (transactions and all)
* @param cumulative_difficulty the accumulated difficulty after this block
* @param coins_generated the number of coins generated total after this block
* @param txs the transactions in the block
*
* @return the height of the chain post-addition
*/
virtual uint64_t add_block( const block& blk
, const size_t& block_size
, uint64_t long_term_block_size
, size_t block_weight
, uint64_t long_term_block_weight
, const difficulty_type& cumulative_difficulty
, const uint64_t& coins_generated
, const std::vector<transaction>& txs
Expand Down Expand Up @@ -934,29 +934,29 @@ class BlockchainDB
virtual uint64_t get_top_block_timestamp() const = 0;

/**
* @brief fetch a block's size
* @brief fetch a block's weight
*
* The subclass should return the size of the block with the
* The subclass should return the weight of the block with the
* given height.
*
* If the block does not exist, the subclass should throw BLOCK_DNE
*
* @param height the height requested
*
* @return the size
* @return the weight
*/
virtual size_t get_block_size(const uint64_t& height) const = 0;
virtual size_t get_block_weight(const uint64_t& height) const = 0;

/**
* @brief fetch the last N blocks' sizes
* @brief fetch the last N blocks' weights
*
* If there are fewer than N blocks, the returned array will be smaller than N
*
* @param count the number of blocks requested
*
* @return the sizes
* @return the weights
*/
virtual std::vector<uint64_t> get_block_sizes(uint64_t start_height, size_t count) const = 0;
virtual std::vector<uint64_t> get_block_weights(uint64_t start_height, size_t count) const = 0;

/**
* @brief fetch a block's cumulative difficulty
Expand Down Expand Up @@ -1001,26 +1001,26 @@ class BlockchainDB
virtual uint64_t get_block_already_generated_coins(const uint64_t& height) const = 0;

/**
* @brief fetch a block's long term size
* @brief fetch a block's long term weight
*
* If the block does not exist, the subclass should throw BLOCK_DNE
*
* @param height the height requested
*
* @return the long term size
* @return the long term weight
*/
virtual uint64_t get_block_long_term_size(const uint64_t& height) const = 0;
virtual uint64_t get_block_long_term_weight(const uint64_t& height) const = 0;

/**
* @brief fetch the last N blocks' long term sizes
* @brief fetch the last N blocks' long term weights
*
* If there are fewer than N blocks, the returned array will be smaller than N
*
* @param count the number of blocks requested
*
* @return the sizes
* @return the weights
*/
virtual std::vector<uint64_t> get_long_term_block_sizes(uint64_t start_height, size_t count) const = 0;
virtual std::vector<uint64_t> get_long_term_block_weights(uint64_t start_height, size_t count) const = 0;

/**
* @brief fetch a block's hash
Expand Down
Loading