44 template<
size_t a_ring_size,
size_t a_outputs,
bool a_rct, rct::RangeProofType range_proof_type = rct::RangeProofBorromean,
int bp_version = 2>
47 static_assert(0 < a_ring_size,
"ring_size must be greater than 0");
50 static const size_t loop_count = a_rct ? (a_ring_size <= 2 ? 50 : 10) : a_ring_size < 100 ? 100 : 10;
53 static const bool rct = a_rct;
66 std::vector<tx_destination_entry> destinations;
68 for (
size_t n = 1; n <
outputs; ++n)
72 std::vector<crypto::secret_key> additional_tx_keys;
73 std::unordered_map<crypto::public_key, cryptonote::subaddress_index> subaddresses;
76 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, rct_config))
106 template<
size_t a_ring_size,
size_t a_outputs,
size_t a_num_txes,
size_t extra_outs = 0>
109 static_assert(0 < a_ring_size,
"ring_size must be greater than 0");
127 std::vector<tx_destination_entry> destinations;
129 for (
size_t n = 1; n <
outputs; ++n)
133 std::vector<crypto::secret_key> additional_tx_keys;
134 std::unordered_map<crypto::public_key, cryptonote::subaddress_index> subaddresses;
137 m_txes.resize(a_num_txes + (extra_outs > 0 ? 1 : 0));
138 for (
size_t n = 0; n < a_num_txes; ++n)
140 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, 2}))
146 destinations.clear();
148 for (
size_t n = 1; n < extra_outs; ++n)
151 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.back(), 0, tx_key, additional_tx_keys,
true, {
rct::RangeProofMultiOutputBulletproof, 2}))
160 std::vector<const rct::rctSig*> rvv;
161 rvv.reserve(m_txes.size());
162 for (
size_t n = 0; n < m_txes.size(); ++n)
174 std::vector<cryptonote::transaction> m_txes;
static const size_t loop_count
cryptonote::account_base m_miners[ring_size]
bool check_ring_signature(const hash &prefix_hash, const key_image &image, const public_key *const *pubs, std::size_t pubs_count, const signature *sig)
bool verRct(const rctSig &rv, bool semantics)
static const size_t real_source_idx
multi_tx_test_base< a_ring_size > base_class
const account_keys & get_keys() const
Holds cryptonote related classes and helpers.
std::vector< txin_v > vin
crypto::public_key m_spend_public_key
multi_tx_test_base< a_ring_size > base_class
rct::rctSig rct_signatures
static const size_t ring_size
std::vector< std::vector< crypto::signature > > signatures
account_public_address m_account_address
void get_transaction_prefix_hash(const transaction_prefix &tx, crypto::hash &h)
crypto::key_image k_image
bool verRctNonSemanticsSimple(const rctSig &rv)
static const size_t outputs
std::vector< cryptonote::tx_source_entry > m_sources
bool construct_tx_and_get_tx_key(const account_keys &sender_account_keys, const std::unordered_map< crypto::public_key, subaddress_index > &subaddresses, std::vector< tx_source_entry > &sources, std::vector< tx_destination_entry > &destinations, const boost::optional< cryptonote::account_public_address > &change_addr, const std::vector< uint8_t > &extra, transaction &tx, uint64_t unlock_time, crypto::secret_key &tx_key, std::vector< crypto::secret_key > &additional_tx_keys, bool rct, const rct::RCTConfig &rct_config, rct::multisig_out *msout, const uint32_t account_major_offset, const cryptonote::network_type nettype)
bool verRctSemanticsSimple(const std::vector< const rctSig *> &rvv)