Monero
Loading...
Searching...
No Matches
cryptonote Namespace Reference

Holds cryptonote related classes and helpers. More...

Namespaces

namespace  bootstrap
namespace  levin
namespace  bootstrap_node
namespace  rpc
namespace  listener
namespace  json

Classes

struct  output_data_t
 a struct containing output metadata More...
struct  tx_data_t
struct  alt_block_data_t
struct  txpool_tx_meta_t
 a struct containing txpool per transaction metadata More...
class  DB_EXCEPTION
 A base class for BlockchainDB exceptions. More...
class  DB_ERROR
 A generic BlockchainDB exception. More...
class  DB_ERROR_TXN_START
 thrown when there is an error starting a DB transaction More...
class  DB_OPEN_FAILURE
 thrown when opening the BlockchainDB fails More...
class  DB_CREATE_FAILURE
 thrown when creating the BlockchainDB fails More...
class  DB_SYNC_FAILURE
 thrown when synchronizing the BlockchainDB to disk fails More...
class  BLOCK_DNE
 thrown when a requested block does not exist More...
class  BLOCK_PARENT_DNE
 thrown when a block's parent does not exist (and it needed to) More...
class  BLOCK_EXISTS
 thrown when a block exists, but shouldn't, namely when adding a block More...
class  BLOCK_INVALID
 thrown when something is wrong with the block to be added More...
class  TX_DNE
 thrown when a requested transaction does not exist More...
class  TX_EXISTS
 thrown when a transaction exists, but shouldn't, namely when adding a block More...
class  OUTPUT_DNE
 thrown when a requested output does not exist More...
class  OUTPUT_EXISTS
 thrown when an output exists, but shouldn't, namely when adding a block More...
class  KEY_IMAGE_EXISTS
 thrown when a spent key image exists, but shouldn't, namely when adding a block More...
class  BlockchainDB
 The BlockchainDB backing store interface declaration/contract. More...
class  db_txn_guard
class  db_rtxn_guard
class  db_wtxn_guard
struct  mdb_block_info_1
struct  mdb_block_info_2
struct  mdb_block_info_3
struct  mdb_block_info_4
struct  blk_height
struct  pre_rct_outkey
struct  outkey
struct  outtx
struct  txindex
struct  mdb_txn_cursors
struct  mdb_rflags
struct  mdb_threadinfo
struct  mdb_txn_safe
class  BlockchainLMDB
class  LockedTXN
class  BaseTestDB
struct  t_hashline
 struct for loading a checkpoint from json More...
struct  t_hash_json
 struct for loading many checkpoints from json More...
class  checkpoints
 A container for blockchain checkpoints. More...
struct  account_keys
class  account_base
struct  cryptonote_connection_context
struct  txout_to_script
struct  txout_to_scripthash
struct  txout_to_key
struct  txout_to_tagged_key
struct  txin_gen
struct  txin_to_script
struct  txin_to_scripthash
struct  txin_to_key
struct  tx_out
class  transaction_prefix
class  transaction
struct  block_header
struct  block
struct  account_public_address
struct  keypair
struct  integrated_address
struct  public_address_outer_blob
struct  public_integrated_address_outer_blob
struct  address_parse_info
struct  subaddress_receive_info
struct  txpool_event
class  HardFork
struct  i_miner_handler
class  miner
struct  subaddress_index
struct  tx_extra_padding
struct  tx_extra_pub_key
struct  tx_extra_nonce
struct  tx_extra_merge_mining_tag
struct  tx_extra_additional_pub_keys
struct  tx_extra_mysterious_minergate
struct  tx_verification_context
struct  block_verification_context
struct  config_t
class  Blockchain
struct  test_options
class  core
 handles core cryptonote functionality More...
struct  tx_source_entry
struct  tx_destination_entry
struct  tx_block_template_backlog_entry
struct  i_core_events
class  txCompare
class  tx_memory_pool
 Transaction pool, handles transactions which are not part of a block. More...
struct  pool_supplement
 Used to provide transaction info that skips the mempool to block handling code. More...
class  block_queue
struct  connection_info
struct  tx_blob_entry
struct  block_complete_entry
struct  NOTIFY_NEW_BLOCK
struct  NOTIFY_NEW_TRANSACTIONS
struct  NOTIFY_REQUEST_GET_OBJECTS
struct  NOTIFY_RESPONSE_GET_OBJECTS
struct  CORE_SYNC_DATA
struct  NOTIFY_REQUEST_CHAIN
struct  NOTIFY_RESPONSE_CHAIN_ENTRY
struct  NOTIFY_NEW_FLUFFY_BLOCK
struct  NOTIFY_REQUEST_FLUFFY_MISSING_TX
struct  NOTIFY_GET_TXPOOL_COMPLEMENT
class  cryptonote_protocol_handler_base_pimpl
class  cryptonote_protocol_handler_base
class  t_cryptonote_protocol_handler
struct  i_cryptonote_protocol
struct  cryptonote_protocol_stub
class  bootstrap_daemon
class  pruned_transaction
class  core_rpc_server
struct  rpc_request_base
struct  rpc_response_base
struct  rpc_access_request_base
struct  rpc_access_response_base
struct  COMMAND_RPC_GET_HEIGHT
struct  COMMAND_RPC_GET_BLOCKS_FAST
struct  COMMAND_RPC_GET_BLOCKS_BY_HEIGHT
struct  COMMAND_RPC_GET_ALT_BLOCKS_HASHES
struct  COMMAND_RPC_GET_HASHES_FAST
struct  COMMAND_RPC_SUBMIT_RAW_TX
struct  COMMAND_RPC_GET_TRANSACTIONS
struct  COMMAND_RPC_IS_KEY_IMAGE_SPENT
struct  COMMAND_RPC_GET_TX_GLOBAL_OUTPUTS_INDEXES
struct  get_outputs_out
struct  COMMAND_RPC_GET_OUTPUTS_BIN
struct  COMMAND_RPC_GET_OUTPUTS
struct  COMMAND_RPC_SEND_RAW_TX
struct  COMMAND_RPC_START_MINING
struct  COMMAND_RPC_GET_INFO
struct  COMMAND_RPC_GET_NET_STATS
struct  COMMAND_RPC_STOP_MINING
struct  COMMAND_RPC_MINING_STATUS
struct  COMMAND_RPC_SAVE_BC
struct  COMMAND_RPC_GETBLOCKCOUNT
struct  COMMAND_RPC_GETBLOCKHASH
struct  COMMAND_RPC_GETBLOCKTEMPLATE
struct  COMMAND_RPC_GETMINERDATA
struct  COMMAND_RPC_CALCPOW
struct  COMMAND_RPC_ADD_AUX_POW
struct  COMMAND_RPC_SUBMITBLOCK
struct  COMMAND_RPC_GENERATEBLOCKS
struct  block_header_response
struct  COMMAND_RPC_GET_LAST_BLOCK_HEADER
struct  COMMAND_RPC_GET_BLOCK_HEADER_BY_HASH
struct  COMMAND_RPC_GET_BLOCK_HEADER_BY_HEIGHT
struct  COMMAND_RPC_GET_BLOCK
struct  peer
struct  COMMAND_RPC_GET_PEER_LIST
struct  public_node
struct  COMMAND_RPC_GET_PUBLIC_NODES
struct  COMMAND_RPC_SET_LOG_HASH_RATE
struct  COMMAND_RPC_SET_LOG_LEVEL
struct  COMMAND_RPC_SET_LOG_CATEGORIES
struct  tx_info
struct  spent_key_image_info
struct  COMMAND_RPC_GET_TRANSACTION_POOL
struct  COMMAND_RPC_GET_TRANSACTION_POOL_HASHES_BIN
struct  COMMAND_RPC_GET_TRANSACTION_POOL_HASHES
struct  tx_backlog_entry
struct  COMMAND_RPC_GET_TRANSACTION_POOL_BACKLOG
struct  txpool_histo
struct  txpool_stats
struct  COMMAND_RPC_GET_TRANSACTION_POOL_STATS
struct  COMMAND_RPC_GET_CONNECTIONS
struct  COMMAND_RPC_GET_BLOCK_HEADERS_RANGE
struct  COMMAND_RPC_SET_BOOTSTRAP_DAEMON
struct  COMMAND_RPC_STOP_DAEMON
struct  COMMAND_RPC_FAST_EXIT
struct  COMMAND_RPC_GET_LIMIT
struct  COMMAND_RPC_SET_LIMIT
struct  COMMAND_RPC_OUT_PEERS
struct  COMMAND_RPC_IN_PEERS
struct  COMMAND_RPC_HARD_FORK_INFO
struct  COMMAND_RPC_GETBANS
struct  COMMAND_RPC_SETBANS
struct  COMMAND_RPC_BANNED
struct  COMMAND_RPC_FLUSH_TRANSACTION_POOL
struct  COMMAND_RPC_GET_OUTPUT_HISTOGRAM
struct  COMMAND_RPC_GET_VERSION
struct  COMMAND_RPC_GET_COINBASE_TX_SUM
struct  COMMAND_RPC_GET_BASE_FEE_ESTIMATE
struct  COMMAND_RPC_GET_ALTERNATE_CHAINS
struct  COMMAND_RPC_UPDATE
struct  COMMAND_RPC_RELAY_TX
struct  COMMAND_RPC_SYNC_INFO
struct  COMMAND_RPC_GET_OUTPUT_DISTRIBUTION
struct  COMMAND_RPC_ACCESS_INFO
struct  COMMAND_RPC_ACCESS_SUBMIT_NONCE
struct  COMMAND_RPC_ACCESS_PAY
struct  COMMAND_RPC_ACCESS_TRACKING
struct  COMMAND_RPC_ACCESS_DATA
struct  COMMAND_RPC_ACCESS_ACCOUNT
struct  COMMAND_RPC_POP_BLOCKS
struct  COMMAND_RPC_PRUNE_BLOCKCHAIN
struct  COMMAND_RPC_FLUSH_CACHE
struct  rpc_args
 Processes command line arguments related to server-side RPC. More...
class  rpc_payment
class  simple_wallet
 Manages wallet operations. This is the most abstracted wallet class. More...
class  vector

Typedefs

typedef std::pair< crypto::hash, uint64_ttx_out_index
typedef struct cryptonote::mdb_block_info_1 mdb_block_info_1
typedef struct cryptonote::mdb_block_info_2 mdb_block_info_2
typedef struct cryptonote::mdb_block_info_3 mdb_block_info_3
typedef struct cryptonote::mdb_block_info_4 mdb_block_info_4
typedef mdb_block_info_4 mdb_block_info
typedef struct cryptonote::blk_height blk_height
typedef struct cryptonote::pre_rct_outkey pre_rct_outkey
typedef struct cryptonote::outkey outkey
typedef struct cryptonote::outtx outtx
typedef struct cryptonote::txindex txindex
typedef struct cryptonote::mdb_txn_cursors mdb_txn_cursors
typedef struct cryptonote::mdb_rflags mdb_rflags
typedef struct cryptonote::mdb_threadinfo mdb_threadinfo
typedef std::string blobdata
typedef boost::string_ref blobdata_ref
typedef std::vector< crypto::signaturering_signature
typedef boost::variant< txin_gen, txin_to_script, txin_to_scripthash, txin_to_keytxin_v
typedef boost::variant< txout_to_script, txout_to_scripthash, txout_to_key, txout_to_tagged_keytxout_target_v
typedef boost::multiprecision::uint128_t difficulty_type
typedef std::function< bool(const cryptonote::block &, uint64_t, const crypto::hash *, unsigned int, crypto::hash &)> get_block_hash_t
typedef boost::variant< tx_extra_padding, tx_extra_pub_key, tx_extra_nonce, tx_extra_merge_mining_tag, tx_extra_additional_pub_keys, tx_extra_mysterious_minergatetx_extra_field
typedef std::function< const epee::span< const unsigned char >(cryptonote::network_type network)> GetCheckpointsCallback
 Callback routine that returns checkpoints data for specific network type.
typedef boost::function< void(std::vector< txpool_event >)> TxpoolNotifyCallback
typedef boost::function< void(uint64_t, epee::span< const block >)> BlockNotifyCallback
typedef boost::function< void(uint8_t, uint64_t, const crypto::hash &, const crypto::hash &, difficulty_type, uint64_t, uint64_t, const std::vector< tx_block_template_backlog_entry > &)> MinerNotifyCallback
typedef std::pair< std::pair< double, std::time_t >, crypto::hashtx_by_fee_and_receive_time_entry
 pair of <transaction fee, transaction hash> for organization
typedef std::set< tx_by_fee_and_receive_time_entry, txComparesorted_tx_container
 container for sorting transactions by fee per unit size
using rct_ver_cache_t = ::tools::data_cache<::crypto::hash, RCT_VER_CACHE_SIZE>

Enumerations

enum class  relay_category : uint8_t { broadcasted = 0 , relayable , legacy , all }
enum  { prune_mode_prune , prune_mode_update , prune_mode_check }
enum  network_type : uint8_t {
  MAINNET = 0 , TESTNET , STAGENET , FAKECHAIN ,
  UNDEFINED = 255
}
enum  blockchain_db_sync_mode { db_defaultsync , db_sync , db_async , db_nosync }
enum class  relay_method : std::uint8_t {
  none = 0 , local , forward , stem ,
  fluff , block
}
 Methods tracking how a tx was received and relayed. More...

Functions

bool matches_category (relay_method method, relay_category category) noexcept
BlockchainDBnew_db ()
void lmdb_resized (MDB_env *env, int isactive)
int lmdb_txn_begin (MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **txn)
int lmdb_txn_renew (MDB_txn *txn)
static bool is_v1_tx (MDB_cursor *c_txs_pruned, MDB_val *tx_id)
static void derive_key (const crypto::chacha_key &base_key, crypto::chacha_key &key)
static epee::wipeable_string get_key_stream (const crypto::chacha_key &base_key, const crypto::chacha_iv &iv, size_t bytes)
std::string get_protocol_state_string (cryptonote_connection_context::state s)
char get_protocol_state_char (cryptonote_connection_context::state s)
size_t get_min_block_weight (uint8_t version)
size_t get_max_tx_size ()
bool get_block_reward (size_t median_weight, size_t current_block_weight, uint64_t already_generated_coins, uint64_t &reward, uint8_t version)
uint8_t get_account_address_checksum (const public_address_outer_blob &bl)
uint8_t get_account_integrated_address_checksum (const public_integrated_address_outer_blob &bl)
std::string get_account_address_as_str (network_type nettype, bool subaddress, account_public_address const &adr)
std::string get_account_integrated_address_as_str (network_type nettype, account_public_address const &adr, crypto::hash8 const &payment_id)
bool is_coinbase (const transaction &tx)
bool get_account_address_from_str (address_parse_info &info, network_type nettype, std::string const &str)
bool get_account_address_from_str_or_url (address_parse_info &info, network_type nettype, const std::string &str_or_url, std::function< std::string(const std::string &, const std::vector< std::string > &, bool)> dns_confirm)
bool operator== (const cryptonote::transaction &a, const cryptonote::transaction &b)
bool operator== (const cryptonote::block &a, const cryptonote::block &b)
static unsigned char * operator& (ec_point &point)
static const unsigned char * operator& (const ec_point &point)
static void add_public_key (crypto::public_key &AB, const crypto::public_key &A, const crypto::public_key &B)
uint64_t get_transaction_weight_clawback (const transaction &tx, size_t n_padded_outputs)
void get_transaction_prefix_hash (const transaction_prefix &tx, crypto::hash &h, hw::device &hwdev)
crypto::hash get_transaction_prefix_hash (const transaction_prefix &tx, hw::device &hwdev)
bool expand_transaction_1 (transaction &tx, bool base_only)
bool parse_and_validate_tx_from_blob (const blobdata_ref &tx_blob, transaction &tx)
bool parse_and_validate_tx_base_from_blob (const blobdata_ref &tx_blob, transaction &tx)
bool parse_and_validate_tx_prefix_from_blob (const blobdata_ref &tx_blob, transaction_prefix &tx)
bool parse_and_validate_tx_from_blob (const blobdata_ref &tx_blob, transaction &tx, crypto::hash &tx_hash)
bool parse_and_validate_tx_from_blob (const blobdata_ref &tx_blob, transaction &tx, crypto::hash &tx_hash, crypto::hash &tx_prefix_hash)
bool is_v1_tx (const blobdata_ref &tx_blob)
bool is_v1_tx (const blobdata &tx_blob)
bool generate_key_image_helper (const account_keys &ack, const std::unordered_map< crypto::public_key, subaddress_index > &subaddresses, const crypto::public_key &out_key, const crypto::public_key &tx_public_key, const std::vector< crypto::public_key > &additional_tx_public_keys, size_t real_output_index, keypair &in_ephemeral, crypto::key_image &ki, hw::device &hwdev)
bool generate_key_image_helper_precomp (const account_keys &ack, const crypto::public_key &out_key, const crypto::key_derivation &recv_derivation, size_t real_output_index, const subaddress_index &received_index, keypair &in_ephemeral, crypto::key_image &ki, hw::device &hwdev)
uint64_t power_integral (uint64_t a, uint64_t b)
bool parse_amount (uint64_t &amount, const std::string &str_amount_)
uint64_t get_transaction_weight (const transaction &tx, size_t blob_size)
uint64_t get_pruned_transaction_weight (const transaction &tx)
uint64_t get_transaction_weight (const transaction &tx)
uint64_t get_transaction_blob_size (const transaction &tx)
bool get_tx_fee (const transaction &tx, uint64_t &fee)
uint64_t get_tx_fee (const transaction &tx)
bool parse_tx_extra (const std::vector< uint8_t > &tx_extra, std::vector< tx_extra_field > &tx_extra_fields)
template<typename T>
static bool pick (binary_archive< true > &ar, std::vector< tx_extra_field > &fields, uint8_t tag)
bool sort_tx_extra (const std::vector< uint8_t > &tx_extra, std::vector< uint8_t > &sorted_tx_extra, bool allow_partial)
crypto::public_key get_tx_pub_key_from_extra (const std::vector< uint8_t > &tx_extra, size_t pk_index)
crypto::public_key get_tx_pub_key_from_extra (const transaction_prefix &tx_prefix, size_t pk_index)
crypto::public_key get_tx_pub_key_from_extra (const transaction &tx, size_t pk_index)
bool add_tx_pub_key_to_extra (transaction &tx, const crypto::public_key &tx_pub_key)
bool add_tx_pub_key_to_extra (transaction_prefix &tx, const crypto::public_key &tx_pub_key)
bool add_tx_pub_key_to_extra (std::vector< uint8_t > &tx_extra, const crypto::public_key &tx_pub_key)
std::vector< crypto::public_keyget_additional_tx_pub_keys_from_extra (const std::vector< uint8_t > &tx_extra)
std::vector< crypto::public_keyget_additional_tx_pub_keys_from_extra (const transaction_prefix &tx)
bool add_additional_tx_pub_keys_to_extra (std::vector< uint8_t > &tx_extra, const std::vector< crypto::public_key > &additional_pub_keys)
bool add_extra_nonce_to_tx_extra (std::vector< uint8_t > &tx_extra, const blobdata &extra_nonce)
bool add_mm_merkle_root_to_tx_extra (std::vector< uint8_t > &tx_extra, const crypto::hash &mm_merkle_root, size_t mm_merkle_tree_depth)
bool remove_field_from_tx_extra (std::vector< uint8_t > &tx_extra, const std::type_info &type)
void set_payment_id_to_tx_extra_nonce (blobdata &extra_nonce, const crypto::hash &payment_id)
void set_encrypted_payment_id_to_tx_extra_nonce (blobdata &extra_nonce, const crypto::hash8 &payment_id)
bool get_payment_id_from_tx_extra_nonce (const blobdata &extra_nonce, crypto::hash &payment_id)
bool get_encrypted_payment_id_from_tx_extra_nonce (const blobdata &extra_nonce, crypto::hash8 &payment_id)
bool get_inputs_money_amount (const transaction &tx, uint64_t &money)
uint64_t get_block_height (const block &b)
bool check_inputs_types_supported (const transaction &tx)
bool check_outs_valid (const transaction &tx)
bool check_money_overflow (const transaction &tx)
bool check_inputs_overflow (const transaction &tx)
bool check_outs_overflow (const transaction &tx)
uint64_t get_outs_money_amount (const transaction &tx)
bool get_output_public_key (const cryptonote::tx_out &out, crypto::public_key &output_public_key)
boost::optional< crypto::view_tagget_output_view_tag (const cryptonote::tx_out &out)
std::string short_hash_str (const crypto::hash &h)
void set_tx_out (const uint64_t amount, const crypto::public_key &output_public_key, const bool use_view_tags, const crypto::view_tag &view_tag, tx_out &out)
bool check_output_types (const transaction &tx, const uint8_t hf_version)
bool out_can_be_to_acc (const boost::optional< crypto::view_tag > &view_tag_opt, const crypto::key_derivation &derivation, const size_t output_index, hw::device *hwdev)
bool is_out_to_acc (const account_keys &acc, const crypto::public_key &output_public_key, const crypto::public_key &tx_pub_key, const std::vector< crypto::public_key > &additional_tx_pub_keys, size_t output_index, const boost::optional< crypto::view_tag > &view_tag_opt)
boost::optional< subaddress_receive_infois_out_to_acc_precomp (const std::unordered_map< crypto::public_key, subaddress_index > &subaddresses, const crypto::public_key &out_key, const crypto::key_derivation &derivation, const std::vector< crypto::key_derivation > &additional_derivations, size_t output_index, hw::device &hwdev, const boost::optional< crypto::view_tag > &view_tag_opt)
bool lookup_acc_outs (const account_keys &acc, const transaction &tx, std::vector< size_t > &outs, uint64_t &money_transfered)
bool lookup_acc_outs (const account_keys &acc, const transaction &tx, const crypto::public_key &tx_pub_key, const std::vector< crypto::public_key > &additional_tx_pub_keys, std::vector< size_t > &outs, uint64_t &money_transfered)
void get_blob_hash (const blobdata_ref &blob, crypto::hash &res)
void get_blob_hash (const blobdata &blob, crypto::hash &res)
void set_default_decimal_point (unsigned int decimal_point)
unsigned int get_default_decimal_point ()
std::string get_unit (unsigned int decimal_point)
static void insert_money_decimal_point (std::string &s, unsigned int decimal_point)
std::string print_money (uint64_t amount, unsigned int decimal_point)
std::string print_money (const boost::multiprecision::uint128_t &amount, unsigned int decimal_point)
uint64_t round_money_up (uint64_t amount, unsigned significant_digits)
std::string round_money_up (const std::string &s, unsigned significant_digits)
crypto::hash get_blob_hash (const blobdata &blob)
crypto::hash get_blob_hash (const blobdata_ref &blob)
crypto::hash get_transaction_hash (const transaction &t)
bool get_transaction_hash (const transaction &t, crypto::hash &res)
bool calculate_transaction_prunable_hash (const transaction &t, const cryptonote::blobdata_ref *blob, crypto::hash &res)
crypto::hash get_transaction_prunable_hash (const transaction &t, const cryptonote::blobdata_ref *blobdata)
crypto::hash get_pruned_transaction_hash (const transaction &t, const crypto::hash &pruned_data_hash)
bool calculate_transaction_hash (const transaction &t, crypto::hash &res, size_t *blob_size)
bool get_transaction_hash (const transaction &t, crypto::hash &res, size_t *blob_size)
bool get_transaction_hash (const transaction &t, crypto::hash &res, size_t &blob_size)
blobdata get_block_hashing_blob (const block &b)
bool calculate_block_hash (const block &b, crypto::hash &res, const blobdata_ref *blob)
bool get_block_hash (const block &b, crypto::hash &res)
crypto::hash get_block_hash (const block &b)
std::vector< uint64_trelative_output_offsets_to_absolute (const std::vector< uint64_t > &off)
std::vector< uint64_tabsolute_output_offsets_to_relative (const std::vector< uint64_t > &off)
bool parse_and_validate_block_from_blob (const blobdata_ref &b_blob, block &b, crypto::hash *block_hash)
bool parse_and_validate_block_from_blob (const blobdata_ref &b_blob, block &b)
bool parse_and_validate_block_from_blob (const blobdata_ref &b_blob, block &b, crypto::hash &block_hash)
blobdata block_to_blob (const block &b)
bool block_to_blob (const block &b, blobdata &b_blob)
blobdata tx_to_blob (const transaction &tx)
bool tx_to_blob (const transaction &tx, blobdata &b_blob)
void get_tx_tree_hash (const std::vector< crypto::hash > &tx_hashes, crypto::hash &h)
crypto::hash get_tx_tree_hash (const std::vector< crypto::hash > &tx_hashes)
crypto::hash get_tx_tree_hash (const block &b)
bool is_valid_decomposed_amount (uint64_t amount)
void get_hash_stats (uint64_t &tx_hashes_calculated, uint64_t &tx_hashes_cached, uint64_t &block_hashes_calculated, uint64_t &block_hashes_cached)
crypto::secret_key encrypt_key (crypto::secret_key key, const epee::wipeable_string &passphrase)
crypto::secret_key decrypt_key (crypto::secret_key key, const epee::wipeable_string &passphrase)
void get_transaction_prefix_hash (const transaction_prefix &tx, crypto::hash &h)
crypto::hash get_transaction_prefix_hash (const transaction_prefix &tx)
template<typename T>
bool find_tx_extra_field_by_type (const std::vector< tx_extra_field > &tx_extra_fields, T &field, size_t index=0)
bool sort_tx_extra (const std::vector< uint8_t > &tx_extra, std::vector< uint8_t > &sorted_tx_extra, bool allow_partial=false)
void set_tx_out (const uint64_t amount, const crypto::public_key &output_public_key, const bool use_view_tags, const crypto::view_tag &view_tag, tx_out &out)
template<class t_object>
bool t_serializable_object_from_blob (t_object &to, const blobdata &b_blob)
template<class t_object>
bool t_serializable_object_to_blob (const t_object &to, blobdata &b_blob)
template<class t_object>
blobdata t_serializable_object_to_blob (const t_object &to)
template<class t_object>
bool get_object_hash (const t_object &o, crypto::hash &res)
template<class t_object>
size_t get_object_blobsize (const t_object &o)
template<class t_object>
bool get_object_hash (const t_object &o, crypto::hash &res, size_t &blob_size)
template<typename T>
std::string obj_to_json_str (T &obj)
template<typename chunk_handler_t, typename dust_handler_t>
void decompose_amount_into_digits (uint64_t amount, uint64_t dust_threshold, const chunk_handler_t &chunk_handler, const dust_handler_t &dust_handler)
static void mul (uint64_t a, uint64_t b, uint64_t &low, uint64_t &high)
static bool cadd (uint64_t a, uint64_t b)
static bool cadc (uint64_t a, uint64_t b, bool c)
bool check_hash_64 (const crypto::hash &hash, uint64_t difficulty)
 checks if a hash fits the given difficulty
uint64_t next_difficulty_64 (std::vector< std::uint64_t > timestamps, std::vector< uint64_t > cumulative_difficulties, size_t target_seconds)
const difficulty_type max64bit (std::numeric_limits< std::uint64_t >::max())
const boost::multiprecision::uint256_t max128bit (std::numeric_limits< boost::multiprecision::uint128_t >::max())
const boost::multiprecision::uint512_t max256bit (std::numeric_limits< boost::multiprecision::uint256_t >::max())
bool check_hash_128 (const crypto::hash &hash, difficulty_type difficulty)
bool check_hash (const crypto::hash &hash, difficulty_type difficulty)
difficulty_type next_difficulty (std::vector< uint64_t > timestamps, std::vector< difficulty_type > cumulative_difficulties, size_t target_seconds)
std::string hex (difficulty_type v)
difficulty_type next_difficulty (std::vector< std::uint64_t > timestamps, std::vector< difficulty_type > cumulative_difficulties, size_t target_seconds)
uint32_t get_aux_slot (const crypto::hash &id, uint32_t nonce, uint32_t n_aux_chains)
uint32_t get_path_from_aux_slot (uint32_t slot, uint32_t n_aux_chains)
uint32_t encode_mm_depth (uint32_t n_aux_chains, uint32_t nonce)
bool decode_mm_depth (uint32_t depth, uint32_t &n_aux_chains, uint32_t &nonce)
std::ostream & operator<< (std::ostream &out, const cryptonote::subaddress_index &subaddr_index)
const config_t & get_config (network_type nettype)
block_complete_entry get_block_complete_entry (block &b, tx_memory_pool &pool)
double factorial (unsigned int n)
static double probability1 (unsigned int blocks, unsigned int expected)
static double probability (unsigned int blocks, unsigned int expected)
void classify_addresses (const std::vector< tx_destination_entry > &destinations, const boost::optional< cryptonote::account_public_address > &change_addr, size_t &num_stdaddresses, size_t &num_subaddresses, account_public_address &single_dest_subaddress)
bool construct_miner_tx (size_t height, size_t median_weight, uint64_t already_generated_coins, size_t current_block_weight, uint64_t fee, const account_public_address &miner_address, transaction &tx, const blobdata &extra_nonce, size_t max_outs, uint8_t hard_fork_version)
crypto::public_key get_destination_view_key_pub (const std::vector< tx_destination_entry > &destinations, const boost::optional< cryptonote::account_public_address > &change_addr)
bool construct_tx_with_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, const crypto::secret_key &tx_key, const std::vector< crypto::secret_key > &additional_tx_keys, bool rct, const rct::RCTConfig &rct_config, bool shuffle_outs, bool use_view_tags)
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, crypto::secret_key &tx_key, std::vector< crypto::secret_key > &additional_tx_keys, bool rct, const rct::RCTConfig &rct_config, bool use_view_tags)
bool construct_tx (const account_keys &sender_account_keys, std::vector< tx_source_entry > &sources, const std::vector< tx_destination_entry > &destinations, const boost::optional< cryptonote::account_public_address > &change_addr, const std::vector< uint8_t > &extra, transaction &tx)
bool generate_genesis_block (block &bl, std::string const &genesis_tx, uint32_t nonce)
void get_altblock_longhash (const block &b, crypto::hash &res, const crypto::hash &seed_hash)
bool get_block_longhash (const Blockchain *pbc, const blobdata &bd, crypto::hash &res, const uint64_t height, const int major_version, const crypto::hash *seed_hash, const int miners)
bool get_block_longhash (const Blockchain *pbc, const block &b, crypto::hash &res, const uint64_t height, const crypto::hash *seed_hash, const int miners)
crypto::hash get_block_longhash (const Blockchain *pbc, const block &b, const uint64_t height, const crypto::hash *seed_hash, const int miners)
bool construct_tx_with_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, const crypto::secret_key &tx_key, const std::vector< crypto::secret_key > &additional_tx_keys, bool rct=false, const rct::RCTConfig &rct_config={ rct::RangeProofBorromean, 0 }, bool shuffle_outs=true, bool use_view_tags=false)
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, crypto::secret_key &tx_key, std::vector< crypto::secret_key > &additional_tx_keys, bool rct=false, const rct::RCTConfig &rct_config={ rct::RangeProofBorromean, 0 }, bool use_view_tags=false)
bool generate_output_ephemeral_keys (const size_t tx_version, const cryptonote::account_keys &sender_account_keys, const crypto::public_key &txkey_pub, const crypto::secret_key &tx_key, const cryptonote::tx_destination_entry &dst_entr, const boost::optional< cryptonote::account_public_address > &change_addr, const size_t output_index, const bool &need_additional_txkeys, const std::vector< crypto::secret_key > &additional_tx_keys, std::vector< crypto::public_key > &additional_tx_public_keys, std::vector< rct::key > &amount_keys, crypto::public_key &out_eph_public_key, const bool use_view_tags, crypto::view_tag &view_tag)
bool tx_sanity_check (const cryptonote::blobdata &tx_blob, uint64_t rct_outs_available)
bool tx_sanity_check (const std::set< uint64_t > &rct_indices, size_t n_indices, uint64_t rct_outs_available)
uint64_t get_transaction_weight_limit (uint8_t hf_version)
 Get the maximum transaction weight for a given hardfork.
bool ver_rct_non_semantics_simple_cached (transaction &tx, const rct::ctkeyM &mix_ring, rct_ver_cache_t &cache, std::uint8_t rct_type_to_cache)
 Cached version of rct::verRctNonSemanticsSimple.
bool ver_mixed_rct_semantics (std::vector< const rct::rctSig * > rvv)
 Verify the semantics of a group of RingCT signatures as a batch (if applicable).
bool ver_non_input_consensus (const transaction &tx, tx_verification_context &tvc, std::uint8_t hf_version)
 Verify every non-input consensus rule for a group of non-coinbase transactions.
bool ver_non_input_consensus (const pool_supplement &ps, tx_verification_context &tvc, const std::uint8_t hf_version)
template<class CryptoHashContainer>
bool make_pool_supplement_from_block_entry (const std::vector< cryptonote::tx_blob_entry > &tx_entries, const CryptoHashContainer &blk_tx_hashes, const bool allow_pruned, cryptonote::pool_supplement &pool_supplement)
bool make_full_pool_supplement_from_block_entry (const cryptonote::block_complete_entry &blk_entry, cryptonote::pool_supplement &pool_supplement)
static bool operator== (const crypto::public_key &k0, const rct::key &k1)
static bool operator!= (const crypto::public_key &k0, const rct::key &k1)
static bool operator== (const crypto::secret_key &k0, const rct::key &k1)
static bool operator!= (const crypto::secret_key &k0, const rct::key &k1)
size_t slow_memmem (const void *start_buff, size_t buflen, const void *pat, size_t patlen)
std::string make_rpc_payment_signature (const crypto::secret_key &skey)
bool verify_rpc_payment_signature (const std::string &message, crypto::public_key &pkey, uint64_t &ts)
bool expand_transaction_1 (transaction &tx, bool base_only)

Variables

const command_line::arg_descriptor< std::string > arg_db_sync_mode
const command_line::arg_descriptor< bool > arg_db_salvage
const command_line::arg_descriptor< bool, falsearg_testnet_on
const command_line::arg_descriptor< bool, falsearg_stagenet_on
const command_line::arg_descriptor< bool > arg_regtest_on
const command_line::arg_descriptor< bool > arg_keep_fakechain
const command_line::arg_descriptor< difficulty_typearg_fixed_difficulty
const command_line::arg_descriptor< std::string, false, true, 2 > arg_data_dir
const command_line::arg_descriptor< bool > arg_offline
const command_line::arg_descriptor< bool > arg_disable_dns_checkpoints
const command_line::arg_descriptor< size_t > arg_block_download_max_size
const command_line::arg_descriptor< bool > arg_sync_pruned_blocks
static const command_line::arg_descriptor< bool > arg_test_drop_download
static const command_line::arg_descriptor< uint64_targ_test_drop_download_height
static const command_line::arg_descriptor< int > arg_test_dbg_lock_sleep
static const command_line::arg_descriptor< bool > arg_dns_checkpoints
static const command_line::arg_descriptor< uint64_targ_fast_block_sync
static const command_line::arg_descriptor< uint64_targ_prep_blocks_threads
static const command_line::arg_descriptor< uint64_targ_show_time_stats
static const command_line::arg_descriptor< size_t > arg_block_sync_size
static const command_line::arg_descriptor< std::string > arg_check_updates
static const command_line::arg_descriptor< bool > arg_fluffy_blocks
static const command_line::arg_descriptor< size_t > arg_max_txpool_weight
static const command_line::arg_descriptor< std::string > arg_block_notify
static const command_line::arg_descriptor< bool > arg_prune_blockchain
static const command_line::arg_descriptor< std::string > arg_reorg_notify
static const command_line::arg_descriptor< std::string > arg_block_rate_notify
static const command_line::arg_descriptor< bool > arg_keep_alt_blocks
static constexpr const size_t RCT_VER_CACHE_SIZE = 8192

Detailed Description

Holds cryptonote related classes and helpers.

Typedef Documentation

◆ blk_height

typedef struct cryptonote::blk_height cryptonote::blk_height

◆ blobdata

typedef std::string cryptonote::blobdata

◆ blobdata_ref

typedef boost::string_ref cryptonote::blobdata_ref

◆ BlockNotifyCallback

typedef boost::function<void(uint64_t , epee::span<const block> )> cryptonote::BlockNotifyCallback

◆ difficulty_type

typedef boost::multiprecision::uint128_t cryptonote::difficulty_type

◆ get_block_hash_t

◆ GetCheckpointsCallback

typedef std::function<const epee::span<const unsigned char>(cryptonote::network_type network)> cryptonote::GetCheckpointsCallback

Callback routine that returns checkpoints data for specific network type.

Parameters
networknetwork type
Returns
checkpoints data, empty span if there ain't any checkpoints for specific network type

◆ mdb_block_info

◆ mdb_block_info_1

typedef struct cryptonote::mdb_block_info_1 cryptonote::mdb_block_info_1

◆ mdb_block_info_2

typedef struct cryptonote::mdb_block_info_2 cryptonote::mdb_block_info_2

◆ mdb_block_info_3

typedef struct cryptonote::mdb_block_info_3 cryptonote::mdb_block_info_3

◆ mdb_block_info_4

typedef struct cryptonote::mdb_block_info_4 cryptonote::mdb_block_info_4

◆ mdb_rflags

typedef struct cryptonote::mdb_rflags cryptonote::mdb_rflags

◆ mdb_threadinfo

typedef struct cryptonote::mdb_threadinfo cryptonote::mdb_threadinfo

◆ mdb_txn_cursors

typedef struct cryptonote::mdb_txn_cursors cryptonote::mdb_txn_cursors

◆ MinerNotifyCallback

◆ outkey

typedef struct cryptonote::outkey cryptonote::outkey

◆ outtx

typedef struct cryptonote::outtx cryptonote::outtx

◆ pre_rct_outkey

typedef struct cryptonote::pre_rct_outkey cryptonote::pre_rct_outkey

◆ rct_ver_cache_t

◆ ring_signature

◆ sorted_tx_container

container for sorting transactions by fee per unit size

◆ tx_by_fee_and_receive_time_entry

typedef std::pair<std::pair<double, std::time_t>, crypto::hash> cryptonote::tx_by_fee_and_receive_time_entry

pair of <transaction fee, transaction hash> for organization

◆ tx_extra_field

◆ tx_out_index

a pair of <transaction hash, output index>, typedef for convenience

◆ txin_v

◆ txindex

typedef struct cryptonote::txindex cryptonote::txindex

◆ txout_target_v

◆ TxpoolNotifyCallback

typedef boost::function<void(std::vector<txpool_event>)> cryptonote::TxpoolNotifyCallback

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
prune_mode_prune 
prune_mode_update 
prune_mode_check 

◆ blockchain_db_sync_mode

Declares ways in which the BlockchainDB backend should be told to sync

Enumerator
db_defaultsync 

user didn't specify, use db_async

db_sync 

handle syncing calls instead of the backing db, synchronously

db_async 

handle syncing calls instead of the backing db, asynchronously

db_nosync 

Leave syncing up to the backing db (safest, but slowest because of disk I/O).

◆ network_type

Enumerator
MAINNET 
TESTNET 
STAGENET 
FAKECHAIN 
UNDEFINED 

◆ relay_category

enum class cryptonote::relay_category : uint8_t
strong
Enumerator
broadcasted 

Public txes received via block/fluff.

relayable 

Every tx not marked relay_method::none.

legacy 

relay_category::broadcasted + relay_method::none for rpc relay requests or historical reasons

all 

Everything in the db.

◆ relay_method

enum class cryptonote::relay_method : std::uint8_t
strong

Methods tracking how a tx was received and relayed.

Enumerator
none 

Received via RPC with do_not_relay set.

local 

Received via RPC; trying to send over i2p/tor, etc.

forward 

Received over i2p/tor; timer delayed before ipv4/6 public broadcast.

stem 

Received/send over network using Dandelion++ stem.

fluff 

Received/sent over network using Dandelion++ fluff.

block 

Received in block, takes precedence over others.

Function Documentation

◆ absolute_output_offsets_to_relative()

std::vector< uint64_t > cryptonote::absolute_output_offsets_to_relative ( const std::vector< uint64_t > & off)

◆ add_additional_tx_pub_keys_to_extra()

bool cryptonote::add_additional_tx_pub_keys_to_extra ( std::vector< uint8_t > & tx_extra,
const std::vector< crypto::public_key > & additional_pub_keys )

◆ add_extra_nonce_to_tx_extra()

bool cryptonote::add_extra_nonce_to_tx_extra ( std::vector< uint8_t > & tx_extra,
const blobdata & extra_nonce )

◆ add_mm_merkle_root_to_tx_extra()

bool cryptonote::add_mm_merkle_root_to_tx_extra ( std::vector< uint8_t > & tx_extra,
const crypto::hash & mm_merkle_root,
size_t mm_merkle_tree_depth )

◆ add_public_key()

void cryptonote::add_public_key ( crypto::public_key & AB,
const crypto::public_key & A,
const crypto::public_key & B )
static

◆ add_tx_pub_key_to_extra() [1/3]

bool cryptonote::add_tx_pub_key_to_extra ( std::vector< uint8_t > & tx_extra,
const crypto::public_key & tx_pub_key )

◆ add_tx_pub_key_to_extra() [2/3]

bool cryptonote::add_tx_pub_key_to_extra ( transaction & tx,
const crypto::public_key & tx_pub_key )

◆ add_tx_pub_key_to_extra() [3/3]

bool cryptonote::add_tx_pub_key_to_extra ( transaction_prefix & tx,
const crypto::public_key & tx_pub_key )

◆ block_to_blob() [1/2]

blobdata cryptonote::block_to_blob ( const block & b)

◆ block_to_blob() [2/2]

bool cryptonote::block_to_blob ( const block & b,
blobdata & b_blob )

◆ cadc()

bool cryptonote::cadc ( uint64_t a,
uint64_t b,
bool c )
inlinestatic

◆ cadd()

bool cryptonote::cadd ( uint64_t a,
uint64_t b )
inlinestatic

◆ calculate_block_hash()

bool cryptonote::calculate_block_hash ( const block & b,
crypto::hash & res,
const blobdata_ref * blob )

◆ calculate_transaction_hash()

bool cryptonote::calculate_transaction_hash ( const transaction & t,
crypto::hash & res,
size_t * blob_size )

◆ calculate_transaction_prunable_hash()

bool cryptonote::calculate_transaction_prunable_hash ( const transaction & t,
const cryptonote::blobdata_ref * blob,
crypto::hash & res )

◆ check_hash()

bool cryptonote::check_hash ( const crypto::hash & hash,
difficulty_type difficulty )

◆ check_hash_128()

bool cryptonote::check_hash_128 ( const crypto::hash & hash,
difficulty_type difficulty )

◆ check_hash_64()

bool cryptonote::check_hash_64 ( const crypto::hash & hash,
uint64_t difficulty )

checks if a hash fits the given difficulty

The hash passes if (hash * difficulty) < 2^256. Phrased differently, if (hash * difficulty) fits without overflow into the least significant 256 bits of the 320 bit multiplication result.

Parameters
hashthe hash to check
difficultythe difficulty to check against
Returns
true if valid, else false

◆ check_inputs_overflow()

bool cryptonote::check_inputs_overflow ( const transaction & tx)

◆ check_inputs_types_supported()

bool cryptonote::check_inputs_types_supported ( const transaction & tx)

◆ check_money_overflow()

bool cryptonote::check_money_overflow ( const transaction & tx)

◆ check_output_types()

bool cryptonote::check_output_types ( const transaction & tx,
const uint8_t hf_version )

◆ check_outs_overflow()

bool cryptonote::check_outs_overflow ( const transaction & tx)

◆ check_outs_valid()

bool cryptonote::check_outs_valid ( const transaction & tx)

◆ classify_addresses()

void cryptonote::classify_addresses ( const std::vector< tx_destination_entry > & destinations,
const boost::optional< cryptonote::account_public_address > & change_addr,
size_t & num_stdaddresses,
size_t & num_subaddresses,
account_public_address & single_dest_subaddress )

◆ construct_miner_tx()

bool cryptonote::construct_miner_tx ( size_t height,
size_t median_weight,
uint64_t already_generated_coins,
size_t current_block_weight,
uint64_t fee,
const account_public_address & miner_address,
transaction & tx,
const blobdata & extra_nonce,
size_t max_outs,
uint8_t hard_fork_version )

◆ construct_tx()

bool cryptonote::construct_tx ( const account_keys & sender_account_keys,
std::vector< tx_source_entry > & sources,
const std::vector< tx_destination_entry > & destinations,
const boost::optional< cryptonote::account_public_address > & change_addr,
const std::vector< uint8_t > & extra,
transaction & tx )

◆ construct_tx_and_get_tx_key() [1/2]

bool cryptonote::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,
crypto::secret_key & tx_key,
std::vector< crypto::secret_key > & additional_tx_keys,
bool rct,
const rct::RCTConfig & rct_config,
bool use_view_tags )

◆ construct_tx_and_get_tx_key() [2/2]

bool cryptonote::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,
crypto::secret_key & tx_key,
std::vector< crypto::secret_key > & additional_tx_keys,
bool rct = false,
const rct::RCTConfig & rct_config = rct::RangeProofBorromean, 0 },
bool use_view_tags = false )

◆ construct_tx_with_tx_key() [1/2]

bool cryptonote::construct_tx_with_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,
const crypto::secret_key & tx_key,
const std::vector< crypto::secret_key > & additional_tx_keys,
bool rct,
const rct::RCTConfig & rct_config,
bool shuffle_outs,
bool use_view_tags )

◆ construct_tx_with_tx_key() [2/2]

bool cryptonote::construct_tx_with_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,
const crypto::secret_key & tx_key,
const std::vector< crypto::secret_key > & additional_tx_keys,
bool rct = false,
const rct::RCTConfig & rct_config = rct::RangeProofBorromean, 0 },
bool shuffle_outs = true,
bool use_view_tags = false )

◆ decode_mm_depth()

bool cryptonote::decode_mm_depth ( uint32_t depth,
uint32_t & n_aux_chains,
uint32_t & nonce )

◆ decompose_amount_into_digits()

template<typename chunk_handler_t, typename dust_handler_t>
void cryptonote::decompose_amount_into_digits ( uint64_t amount,
uint64_t dust_threshold,
const chunk_handler_t & chunk_handler,
const dust_handler_t & dust_handler )

◆ decrypt_key()

crypto::secret_key cryptonote::decrypt_key ( crypto::secret_key key,
const epee::wipeable_string & passphrase )

◆ derive_key()

void cryptonote::derive_key ( const crypto::chacha_key & base_key,
crypto::chacha_key & key )
static

◆ encode_mm_depth()

uint32_t cryptonote::encode_mm_depth ( uint32_t n_aux_chains,
uint32_t nonce )

◆ encrypt_key()

crypto::secret_key cryptonote::encrypt_key ( crypto::secret_key key,
const epee::wipeable_string & passphrase )

◆ expand_transaction_1() [1/2]

bool cryptonote::expand_transaction_1 ( transaction & tx,
bool base_only )

◆ expand_transaction_1() [2/2]

bool cryptonote::expand_transaction_1 ( transaction & tx,
bool base_only )

◆ factorial()

double cryptonote::factorial ( unsigned int n)

◆ find_tx_extra_field_by_type()

template<typename T>
bool cryptonote::find_tx_extra_field_by_type ( const std::vector< tx_extra_field > & tx_extra_fields,
T & field,
size_t index = 0 )

◆ generate_genesis_block()

bool cryptonote::generate_genesis_block ( block & bl,
std::string const & genesis_tx,
uint32_t nonce )

◆ generate_key_image_helper()

bool cryptonote::generate_key_image_helper ( const account_keys & ack,
const std::unordered_map< crypto::public_key, subaddress_index > & subaddresses,
const crypto::public_key & out_key,
const crypto::public_key & tx_public_key,
const std::vector< crypto::public_key > & additional_tx_public_keys,
size_t real_output_index,
keypair & in_ephemeral,
crypto::key_image & ki,
hw::device & hwdev )

◆ generate_key_image_helper_precomp()

bool cryptonote::generate_key_image_helper_precomp ( const account_keys & ack,
const crypto::public_key & out_key,
const crypto::key_derivation & recv_derivation,
size_t real_output_index,
const subaddress_index & received_index,
keypair & in_ephemeral,
crypto::key_image & ki,
hw::device & hwdev )

◆ generate_output_ephemeral_keys()

bool cryptonote::generate_output_ephemeral_keys ( const size_t tx_version,
const cryptonote::account_keys & sender_account_keys,
const crypto::public_key & txkey_pub,
const crypto::secret_key & tx_key,
const cryptonote::tx_destination_entry & dst_entr,
const boost::optional< cryptonote::account_public_address > & change_addr,
const size_t output_index,
const bool & need_additional_txkeys,
const std::vector< crypto::secret_key > & additional_tx_keys,
std::vector< crypto::public_key > & additional_tx_public_keys,
std::vector< rct::key > & amount_keys,
crypto::public_key & out_eph_public_key,
const bool use_view_tags,
crypto::view_tag & view_tag )

◆ get_account_address_as_str()

std::string cryptonote::get_account_address_as_str ( network_type nettype,
bool subaddress,
account_public_address const & adr )

◆ get_account_address_checksum()

uint8_t cryptonote::get_account_address_checksum ( const public_address_outer_blob & bl)

◆ get_account_address_from_str()

bool cryptonote::get_account_address_from_str ( address_parse_info & info,
network_type nettype,
std::string const & str )

◆ get_account_address_from_str_or_url()

bool cryptonote::get_account_address_from_str_or_url ( address_parse_info & info,
network_type nettype,
const std::string & str_or_url,
std::function< std::string(const std::string &, const std::vector< std::string > &, bool)> dns_confirm )

◆ get_account_integrated_address_as_str()

std::string cryptonote::get_account_integrated_address_as_str ( network_type nettype,
account_public_address const & adr,
crypto::hash8 const & payment_id )

◆ get_account_integrated_address_checksum()

uint8_t cryptonote::get_account_integrated_address_checksum ( const public_integrated_address_outer_blob & bl)

◆ get_additional_tx_pub_keys_from_extra() [1/2]

std::vector< crypto::public_key > cryptonote::get_additional_tx_pub_keys_from_extra ( const std::vector< uint8_t > & tx_extra)

◆ get_additional_tx_pub_keys_from_extra() [2/2]

std::vector< crypto::public_key > cryptonote::get_additional_tx_pub_keys_from_extra ( const transaction_prefix & tx)

◆ get_altblock_longhash()

void cryptonote::get_altblock_longhash ( const block & b,
crypto::hash & res,
const crypto::hash & seed_hash )

◆ get_aux_slot()

uint32_t cryptonote::get_aux_slot ( const crypto::hash & id,
uint32_t nonce,
uint32_t n_aux_chains )

◆ get_blob_hash() [1/4]

crypto::hash cryptonote::get_blob_hash ( const blobdata & blob)

◆ get_blob_hash() [2/4]

void cryptonote::get_blob_hash ( const blobdata & blob,
crypto::hash & res )

◆ get_blob_hash() [3/4]

crypto::hash cryptonote::get_blob_hash ( const blobdata_ref & blob)

◆ get_blob_hash() [4/4]

void cryptonote::get_blob_hash ( const blobdata_ref & blob,
crypto::hash & res )

◆ get_block_complete_entry()

block_complete_entry cryptonote::get_block_complete_entry ( block & b,
tx_memory_pool & pool )

◆ get_block_hash() [1/2]

crypto::hash cryptonote::get_block_hash ( const block & b)

◆ get_block_hash() [2/2]

bool cryptonote::get_block_hash ( const block & b,
crypto::hash & res )

◆ get_block_hashing_blob()

blobdata cryptonote::get_block_hashing_blob ( const block & b)

◆ get_block_height()

uint64_t cryptonote::get_block_height ( const block & b)

◆ get_block_longhash() [1/3]

bool cryptonote::get_block_longhash ( const Blockchain * pbc,
const blobdata & bd,
crypto::hash & res,
const uint64_t height,
const int major_version,
const crypto::hash * seed_hash,
const int miners )

◆ get_block_longhash() [2/3]

crypto::hash cryptonote::get_block_longhash ( const Blockchain * pbc,
const block & b,
const uint64_t height,
const crypto::hash * seed_hash,
const int miners )

◆ get_block_longhash() [3/3]

bool cryptonote::get_block_longhash ( const Blockchain * pbc,
const block & b,
crypto::hash & res,
const uint64_t height,
const crypto::hash * seed_hash,
const int miners )

◆ get_block_reward()

bool cryptonote::get_block_reward ( size_t median_weight,
size_t current_block_weight,
uint64_t already_generated_coins,
uint64_t & reward,
uint8_t version )

◆ get_config()

const config_t & cryptonote::get_config ( network_type nettype)
inline

◆ get_default_decimal_point()

unsigned int cryptonote::get_default_decimal_point ( )

◆ get_destination_view_key_pub()

crypto::public_key cryptonote::get_destination_view_key_pub ( const std::vector< tx_destination_entry > & destinations,
const boost::optional< cryptonote::account_public_address > & change_addr )

◆ get_encrypted_payment_id_from_tx_extra_nonce()

bool cryptonote::get_encrypted_payment_id_from_tx_extra_nonce ( const blobdata & extra_nonce,
crypto::hash8 & payment_id )

◆ get_hash_stats()

void cryptonote::get_hash_stats ( uint64_t & tx_hashes_calculated,
uint64_t & tx_hashes_cached,
uint64_t & block_hashes_calculated,
uint64_t & block_hashes_cached )

◆ get_inputs_money_amount()

bool cryptonote::get_inputs_money_amount ( const transaction & tx,
uint64_t & money )

◆ get_key_stream()

epee::wipeable_string cryptonote::get_key_stream ( const crypto::chacha_key & base_key,
const crypto::chacha_iv & iv,
size_t bytes )
static

◆ get_max_tx_size()

size_t cryptonote::get_max_tx_size ( )

◆ get_min_block_weight()

size_t cryptonote::get_min_block_weight ( uint8_t version)

◆ get_object_blobsize()

template<class t_object>
size_t cryptonote::get_object_blobsize ( const t_object & o)

◆ get_object_hash() [1/2]

template<class t_object>
bool cryptonote::get_object_hash ( const t_object & o,
crypto::hash & res )

◆ get_object_hash() [2/2]

template<class t_object>
bool cryptonote::get_object_hash ( const t_object & o,
crypto::hash & res,
size_t & blob_size )

◆ get_output_public_key()

bool cryptonote::get_output_public_key ( const cryptonote::tx_out & out,
crypto::public_key & output_public_key )

◆ get_output_view_tag()

boost::optional< crypto::view_tag > cryptonote::get_output_view_tag ( const cryptonote::tx_out & out)

◆ get_outs_money_amount()

uint64_t cryptonote::get_outs_money_amount ( const transaction & tx)

◆ get_path_from_aux_slot()

uint32_t cryptonote::get_path_from_aux_slot ( uint32_t slot,
uint32_t n_aux_chains )

◆ get_payment_id_from_tx_extra_nonce()

bool cryptonote::get_payment_id_from_tx_extra_nonce ( const blobdata & extra_nonce,
crypto::hash & payment_id )

◆ get_protocol_state_char()

char cryptonote::get_protocol_state_char ( cryptonote_connection_context::state s)
inline

◆ get_protocol_state_string()

std::string cryptonote::get_protocol_state_string ( cryptonote_connection_context::state s)
inline

◆ get_pruned_transaction_hash()

crypto::hash cryptonote::get_pruned_transaction_hash ( const transaction & t,
const crypto::hash & pruned_data_hash )

◆ get_pruned_transaction_weight()

uint64_t cryptonote::get_pruned_transaction_weight ( const transaction & tx)

◆ get_transaction_blob_size()

uint64_t cryptonote::get_transaction_blob_size ( const transaction & tx)

◆ get_transaction_hash() [1/4]

crypto::hash cryptonote::get_transaction_hash ( const transaction & t)

◆ get_transaction_hash() [2/4]

bool cryptonote::get_transaction_hash ( const transaction & t,
crypto::hash & res )

◆ get_transaction_hash() [3/4]

bool cryptonote::get_transaction_hash ( const transaction & t,
crypto::hash & res,
size_t & blob_size )

◆ get_transaction_hash() [4/4]

bool cryptonote::get_transaction_hash ( const transaction & t,
crypto::hash & res,
size_t * blob_size )

◆ get_transaction_prefix_hash() [1/4]

crypto::hash cryptonote::get_transaction_prefix_hash ( const transaction_prefix & tx)

◆ get_transaction_prefix_hash() [2/4]

void cryptonote::get_transaction_prefix_hash ( const transaction_prefix & tx,
crypto::hash & h )

◆ get_transaction_prefix_hash() [3/4]

void cryptonote::get_transaction_prefix_hash ( const transaction_prefix & tx,
crypto::hash & h,
hw::device & hwdev )

◆ get_transaction_prefix_hash() [4/4]

crypto::hash cryptonote::get_transaction_prefix_hash ( const transaction_prefix & tx,
hw::device & hwdev )

◆ get_transaction_prunable_hash()

crypto::hash cryptonote::get_transaction_prunable_hash ( const transaction & t,
const cryptonote::blobdata_ref * blobdata )

◆ get_transaction_weight() [1/2]

uint64_t cryptonote::get_transaction_weight ( const transaction & tx)

◆ get_transaction_weight() [2/2]

uint64_t cryptonote::get_transaction_weight ( const transaction & tx,
size_t blob_size )

◆ get_transaction_weight_clawback()

uint64_t cryptonote::get_transaction_weight_clawback ( const transaction & tx,
size_t n_padded_outputs )

◆ get_transaction_weight_limit()

uint64_t cryptonote::get_transaction_weight_limit ( uint8_t hf_version)

Get the maximum transaction weight for a given hardfork.

Parameters
hf_versionhard fork version
Returns
the maximum unconditional transaction weight

◆ get_tx_fee() [1/2]

uint64_t cryptonote::get_tx_fee ( const transaction & tx)

◆ get_tx_fee() [2/2]

bool cryptonote::get_tx_fee ( const transaction & tx,
uint64_t & fee )

◆ get_tx_pub_key_from_extra() [1/3]

crypto::public_key cryptonote::get_tx_pub_key_from_extra ( const std::vector< uint8_t > & tx_extra,
size_t pk_index )

◆ get_tx_pub_key_from_extra() [2/3]

crypto::public_key cryptonote::get_tx_pub_key_from_extra ( const transaction & tx,
size_t pk_index )

◆ get_tx_pub_key_from_extra() [3/3]

crypto::public_key cryptonote::get_tx_pub_key_from_extra ( const transaction_prefix & tx_prefix,
size_t pk_index )

◆ get_tx_tree_hash() [1/3]

crypto::hash cryptonote::get_tx_tree_hash ( const block & b)

◆ get_tx_tree_hash() [2/3]

crypto::hash cryptonote::get_tx_tree_hash ( const std::vector< crypto::hash > & tx_hashes)

◆ get_tx_tree_hash() [3/3]

void cryptonote::get_tx_tree_hash ( const std::vector< crypto::hash > & tx_hashes,
crypto::hash & h )

◆ get_unit()

std::string cryptonote::get_unit ( unsigned int decimal_point)

◆ hex()

std::string cryptonote::hex ( difficulty_type v)

◆ insert_money_decimal_point()

void cryptonote::insert_money_decimal_point ( std::string & s,
unsigned int decimal_point )
static

◆ is_coinbase()

bool cryptonote::is_coinbase ( const transaction & tx)

◆ is_out_to_acc()

bool cryptonote::is_out_to_acc ( const account_keys & acc,
const crypto::public_key & output_public_key,
const crypto::public_key & tx_pub_key,
const std::vector< crypto::public_key > & additional_tx_pub_keys,
size_t output_index,
const boost::optional< crypto::view_tag > & view_tag_opt )

◆ is_out_to_acc_precomp()

boost::optional< subaddress_receive_info > cryptonote::is_out_to_acc_precomp ( const std::unordered_map< crypto::public_key, subaddress_index > & subaddresses,
const crypto::public_key & out_key,
const crypto::key_derivation & derivation,
const std::vector< crypto::key_derivation > & additional_derivations,
size_t output_index,
hw::device & hwdev,
const boost::optional< crypto::view_tag > & view_tag_opt )

◆ is_v1_tx() [1/3]

bool cryptonote::is_v1_tx ( const blobdata & tx_blob)

◆ is_v1_tx() [2/3]

bool cryptonote::is_v1_tx ( const blobdata_ref & tx_blob)

◆ is_v1_tx() [3/3]

bool cryptonote::is_v1_tx ( MDB_cursor * c_txs_pruned,
MDB_val * tx_id )
static

◆ is_valid_decomposed_amount()

bool cryptonote::is_valid_decomposed_amount ( uint64_t amount)

◆ lmdb_resized()

void cryptonote::lmdb_resized ( MDB_env * env,
int isactive )

◆ lmdb_txn_begin()

int cryptonote::lmdb_txn_begin ( MDB_env * env,
MDB_txn * parent,
unsigned int flags,
MDB_txn ** txn )
inline

◆ lmdb_txn_renew()

int cryptonote::lmdb_txn_renew ( MDB_txn * txn)
inline

◆ lookup_acc_outs() [1/2]

bool cryptonote::lookup_acc_outs ( const account_keys & acc,
const transaction & tx,
const crypto::public_key & tx_pub_key,
const std::vector< crypto::public_key > & additional_tx_pub_keys,
std::vector< size_t > & outs,
uint64_t & money_transfered )

◆ lookup_acc_outs() [2/2]

bool cryptonote::lookup_acc_outs ( const account_keys & acc,
const transaction & tx,
std::vector< size_t > & outs,
uint64_t & money_transfered )

◆ make_full_pool_supplement_from_block_entry()

bool cryptonote::make_full_pool_supplement_from_block_entry ( const cryptonote::block_complete_entry & blk_entry,
cryptonote::pool_supplement & pool_supplement )
inline

◆ make_pool_supplement_from_block_entry()

template<class CryptoHashContainer>
bool cryptonote::make_pool_supplement_from_block_entry ( const std::vector< cryptonote::tx_blob_entry > & tx_entries,
const CryptoHashContainer & blk_tx_hashes,
const bool allow_pruned,
cryptonote::pool_supplement & pool_supplement )
inline

◆ make_rpc_payment_signature()

std::string cryptonote::make_rpc_payment_signature ( const crypto::secret_key & skey)

◆ matches_category()

bool cryptonote::matches_category ( relay_method method,
relay_category category )
noexcept

◆ max128bit()

const boost::multiprecision::uint256_t cryptonote::max128bit ( std::numeric_limits< boost::multiprecision::uint128_t > ::max())

◆ max256bit()

const boost::multiprecision::uint512_t cryptonote::max256bit ( std::numeric_limits< boost::multiprecision::uint256_t > ::max())

◆ max64bit()

const difficulty_type cryptonote::max64bit ( std::numeric_limits< std::uint64_t > ::max())

◆ mul()

void cryptonote::mul ( uint64_t a,
uint64_t b,
uint64_t & low,
uint64_t & high )
inlinestatic

◆ new_db()

BlockchainDB * cryptonote::new_db ( )

◆ next_difficulty() [1/2]

difficulty_type cryptonote::next_difficulty ( std::vector< std::uint64_t > timestamps,
std::vector< difficulty_type > cumulative_difficulties,
size_t target_seconds )

◆ next_difficulty() [2/2]

difficulty_type cryptonote::next_difficulty ( std::vector< uint64_t > timestamps,
std::vector< difficulty_type > cumulative_difficulties,
size_t target_seconds )

◆ next_difficulty_64()

uint64_t cryptonote::next_difficulty_64 ( std::vector< std::uint64_t > timestamps,
std::vector< uint64_t > cumulative_difficulties,
size_t target_seconds )

◆ obj_to_json_str()

template<typename T>
std::string cryptonote::obj_to_json_str ( T & obj)

◆ operator!=() [1/2]

bool cryptonote::operator!= ( const crypto::public_key & k0,
const rct::key & k1 )
inlinestatic

◆ operator!=() [2/2]

bool cryptonote::operator!= ( const crypto::secret_key & k0,
const rct::key & k1 )
inlinestatic

◆ operator&() [1/2]

const unsigned char * cryptonote::operator& ( const ec_point & point)
inlinestatic

◆ operator&() [2/2]

unsigned char * cryptonote::operator& ( ec_point & point)
inlinestatic

◆ operator<<()

std::ostream & cryptonote::operator<< ( std::ostream & out,
const cryptonote::subaddress_index & subaddr_index )
inline

◆ operator==() [1/4]

bool cryptonote::operator== ( const crypto::public_key & k0,
const rct::key & k1 )
inlinestatic

◆ operator==() [2/4]

bool cryptonote::operator== ( const crypto::secret_key & k0,
const rct::key & k1 )
inlinestatic

◆ operator==() [3/4]

bool cryptonote::operator== ( const cryptonote::block & a,
const cryptonote::block & b )

◆ operator==() [4/4]

bool cryptonote::operator== ( const cryptonote::transaction & a,
const cryptonote::transaction & b )

◆ out_can_be_to_acc()

bool cryptonote::out_can_be_to_acc ( const boost::optional< crypto::view_tag > & view_tag_opt,
const crypto::key_derivation & derivation,
const size_t output_index,
hw::device * hwdev )

◆ parse_amount()

bool cryptonote::parse_amount ( uint64_t & amount,
const std::string & str_amount_ )

◆ parse_and_validate_block_from_blob() [1/3]

bool cryptonote::parse_and_validate_block_from_blob ( const blobdata_ref & b_blob,
block & b )

◆ parse_and_validate_block_from_blob() [2/3]

bool cryptonote::parse_and_validate_block_from_blob ( const blobdata_ref & b_blob,
block & b,
crypto::hash & block_hash )

◆ parse_and_validate_block_from_blob() [3/3]

bool cryptonote::parse_and_validate_block_from_blob ( const blobdata_ref & b_blob,
block & b,
crypto::hash * block_hash )

◆ parse_and_validate_tx_base_from_blob()

bool cryptonote::parse_and_validate_tx_base_from_blob ( const blobdata_ref & tx_blob,
transaction & tx )

◆ parse_and_validate_tx_from_blob() [1/3]

bool cryptonote::parse_and_validate_tx_from_blob ( const blobdata_ref & tx_blob,
transaction & tx )

◆ parse_and_validate_tx_from_blob() [2/3]

bool cryptonote::parse_and_validate_tx_from_blob ( const blobdata_ref & tx_blob,
transaction & tx,
crypto::hash & tx_hash )

◆ parse_and_validate_tx_from_blob() [3/3]

bool cryptonote::parse_and_validate_tx_from_blob ( const blobdata_ref & tx_blob,
transaction & tx,
crypto::hash & tx_hash,
crypto::hash & tx_prefix_hash )

◆ parse_and_validate_tx_prefix_from_blob()

bool cryptonote::parse_and_validate_tx_prefix_from_blob ( const blobdata_ref & tx_blob,
transaction_prefix & tx )

◆ parse_tx_extra()

bool cryptonote::parse_tx_extra ( const std::vector< uint8_t > & tx_extra,
std::vector< tx_extra_field > & tx_extra_fields )

◆ pick()

template<typename T>
bool cryptonote::pick ( binary_archive< true > & ar,
std::vector< tx_extra_field > & fields,
uint8_t tag )
static

◆ power_integral()

uint64_t cryptonote::power_integral ( uint64_t a,
uint64_t b )

◆ print_money() [1/2]

std::string cryptonote::print_money ( const boost::multiprecision::uint128_t & amount,
unsigned int decimal_point )

◆ print_money() [2/2]

std::string cryptonote::print_money ( uint64_t amount,
unsigned int decimal_point )

◆ probability()

double cryptonote::probability ( unsigned int blocks,
unsigned int expected )
static

◆ probability1()

double cryptonote::probability1 ( unsigned int blocks,
unsigned int expected )
static

◆ relative_output_offsets_to_absolute()

std::vector< uint64_t > cryptonote::relative_output_offsets_to_absolute ( const std::vector< uint64_t > & off)

◆ remove_field_from_tx_extra()

bool cryptonote::remove_field_from_tx_extra ( std::vector< uint8_t > & tx_extra,
const std::type_info & type )

◆ round_money_up() [1/2]

std::string cryptonote::round_money_up ( const std::string & s,
unsigned significant_digits )

◆ round_money_up() [2/2]

uint64_t cryptonote::round_money_up ( uint64_t amount,
unsigned significant_digits )

◆ set_default_decimal_point()

void cryptonote::set_default_decimal_point ( unsigned int decimal_point)

◆ set_encrypted_payment_id_to_tx_extra_nonce()

void cryptonote::set_encrypted_payment_id_to_tx_extra_nonce ( blobdata & extra_nonce,
const crypto::hash8 & payment_id )

◆ set_payment_id_to_tx_extra_nonce()

void cryptonote::set_payment_id_to_tx_extra_nonce ( blobdata & extra_nonce,
const crypto::hash & payment_id )

◆ set_tx_out() [1/2]

void cryptonote::set_tx_out ( const uint64_t amount,
const crypto::public_key & output_public_key,
const bool use_view_tags,
const crypto::view_tag & view_tag,
tx_out & out )

◆ set_tx_out() [2/2]

void cryptonote::set_tx_out ( const uint64_t amount,
const crypto::public_key & output_public_key,
const bool use_view_tags,
const crypto::view_tag & view_tag,
tx_out & out )

◆ short_hash_str()

std::string cryptonote::short_hash_str ( const crypto::hash & h)

◆ slow_memmem()

size_t cryptonote::slow_memmem ( const void * start_buff,
size_t buflen,
const void * pat,
size_t patlen )

◆ sort_tx_extra() [1/2]

bool cryptonote::sort_tx_extra ( const std::vector< uint8_t > & tx_extra,
std::vector< uint8_t > & sorted_tx_extra,
bool allow_partial )

◆ sort_tx_extra() [2/2]

bool cryptonote::sort_tx_extra ( const std::vector< uint8_t > & tx_extra,
std::vector< uint8_t > & sorted_tx_extra,
bool allow_partial = false )

◆ t_serializable_object_from_blob()

template<class t_object>
bool cryptonote::t_serializable_object_from_blob ( t_object & to,
const blobdata & b_blob )

◆ t_serializable_object_to_blob() [1/2]

template<class t_object>
blobdata cryptonote::t_serializable_object_to_blob ( const t_object & to)

◆ t_serializable_object_to_blob() [2/2]

template<class t_object>
bool cryptonote::t_serializable_object_to_blob ( const t_object & to,
blobdata & b_blob )

◆ tx_sanity_check() [1/2]

bool cryptonote::tx_sanity_check ( const cryptonote::blobdata & tx_blob,
uint64_t rct_outs_available )

◆ tx_sanity_check() [2/2]

bool cryptonote::tx_sanity_check ( const std::set< uint64_t > & rct_indices,
size_t n_indices,
uint64_t rct_outs_available )

◆ tx_to_blob() [1/2]

blobdata cryptonote::tx_to_blob ( const transaction & tx)

◆ tx_to_blob() [2/2]

bool cryptonote::tx_to_blob ( const transaction & tx,
blobdata & b_blob )

◆ ver_mixed_rct_semantics()

bool cryptonote::ver_mixed_rct_semantics ( std::vector< const rct::rctSig * > rvv)

Verify the semantics of a group of RingCT signatures as a batch (if applicable).

Coinbase txs or other transaction with a RingCT type of RCTTypeNull will fail to verify.

Parameters
rvvlist of signatures to verify
Returns
true if all signatures verified semantics successfully, false otherwise

◆ ver_non_input_consensus() [1/2]

bool cryptonote::ver_non_input_consensus ( const pool_supplement & ps,
tx_verification_context & tvc,
const std::uint8_t hf_version )

◆ ver_non_input_consensus() [2/2]

bool cryptonote::ver_non_input_consensus ( const transaction & tx,
tx_verification_context & tvc,
std::uint8_t hf_version )

Verify every non-input consensus rule for a group of non-coinbase transactions.

List of checks that we do for each transaction:

  1. Check tx blob size < get_max_tx_size()
  2. Check tx version != 0
  3. Check tx version is less than maximum for given hard fork version
  4. Check tx weight < get_transaction_weight_limit()
  5. Passes core::check_tx_semantic()
  6. Passes Blockchain::check_tx_outputs()
  7. Passes ver_mixed_rct_semantics() [Uses batch RingCT verification when applicable]

For pool_supplement input: We assume the structure of the pool supplement is already correct: for each value entry, the cryptonote::transaction matches its corresponding blobdata and the TXID map key is correctly calculated for that transaction. We use the .nic_verified_hf_version field to skip verification for the pool supplement if hf_version matches, and we cache that version on success.

Parameters
txsingle transaction to verify
pool_supplementpool supplement to verify
tvcrelevant flags will be set for if/why verification failed
hf_versionHard fork version to run rules against
Returns
true if all relevant transactions verify, false otherwise

◆ ver_rct_non_semantics_simple_cached()

bool cryptonote::ver_rct_non_semantics_simple_cached ( transaction & tx,
const rct::ctkeyM & mix_ring,
rct_ver_cache_t & cache,
std::uint8_t rct_type_to_cache )

Cached version of rct::verRctNonSemanticsSimple.

This function will not affect how the transaction is serialized and it will never modify the transaction prefix.

The reference to tx is mutable since the transaction's ring signatures may be expanded by Blockchain::expand_transaction_2. However, on cache hits, the transaction will not be expanded. This means that the caller does not need to call expand_transaction_2 on this transaction before passing it; the transaction will not successfully verify with "old" RCT data if the transaction has been otherwise modified since the last verification.

But, if cryptonote::get_transaction_hash(tx) returns a "stale" hash, this function is not guaranteed to work. So make sure that the cryptonote::transaction passed has not had modifications to it since the last time its hash was fetched without properly invalidating the hashes.

rct_type_to_cache can be any RCT version value as long as rct::verRctNonSemanticsSimple works for this RCT version, but for most applications, it doesn't make sense to not make this version the "current" RCT version (i.e. the version that transactions in the mempool are).

Parameters
txtransaction which contains RCT signature to verify
mix_ringmixring referenced by this tx. THIS DATA MUST BE PREVIOUSLY VALIDATED
cachesaves tx+mixring hashes used to cache calls
rct_type_to_cacheOnly RCT sigs with version (e.g. RCTTypeBulletproofPlus) will be cached
Returns
true when verRctNonSemanticsSimple() w/ expanded tx.rct_signatures would return true
false when verRctNonSemanticsSimple() w/ expanded tx.rct_signatures would return false

◆ verify_rpc_payment_signature()

bool cryptonote::verify_rpc_payment_signature ( const std::string & message,
crypto::public_key & pkey,
uint64_t & ts )

Variable Documentation

◆ arg_block_download_max_size

const command_line::arg_descriptor< size_t > cryptonote::arg_block_download_max_size
Initial value:
= {
"block-download-max-size"
, "Set maximum size of block download queue in bytes (0 for default)"
, 0
}

◆ arg_block_notify

const command_line::arg_descriptor<std::string> cryptonote::arg_block_notify
static
Initial value:
= {
"block-notify"
, "Run a program for each new block, '%s' will be replaced by the block hash"
, ""
}

◆ arg_block_rate_notify

const command_line::arg_descriptor<std::string> cryptonote::arg_block_rate_notify
static
Initial value:
= {
"block-rate-notify"
, "Run a program when the block rate undergoes large fluctuations. This might "
"be a sign of large amounts of hash rate going on and off the Monero network, "
"and thus be of potential interest in predicting attacks. %t will be replaced "
"by the number of minutes for the observation window, %b by the number of "
"blocks observed within that window, and %e by the number of blocks that was "
"expected in that window. It is suggested that this notification is used to "
"automatically increase the number of confirmations required before a payment "
"is acted upon."
, ""
}

◆ arg_block_sync_size

const command_line::arg_descriptor<size_t> cryptonote::arg_block_sync_size
static
Initial value:
= {
"block-sync-size"
, "How many blocks to sync at once during chain synchronization (0 = adaptive)."
, 0
}

◆ arg_check_updates

const command_line::arg_descriptor<std::string> cryptonote::arg_check_updates
static
Initial value:
= {
"check-updates"
, "Check for new versions of monero: [disabled|notify|download|update]"
, "notify"
}

◆ arg_data_dir

const command_line::arg_descriptor< std::string, false, true, 2 > cryptonote::arg_data_dir
Initial value:
= {
"data-dir"
, "Specify data directory"
, [](std::array<bool, 2> testnet_stagenet, bool defaulted, std::string val)->std::string {
if (testnet_stagenet[0])
return (boost::filesystem::path(val) / "testnet").string();
else if (testnet_stagenet[1])
return (boost::filesystem::path(val) / "stagenet").string();
return val;
}
}
const command_line::arg_descriptor< bool, false > arg_testnet_on
Definition cryptonote_core.cpp:75
const command_line::arg_descriptor< bool, false > arg_stagenet_on
Definition cryptonote_core.cpp:80
std::string get_default_data_dir()
Returns the default data directory.
Definition util.cpp:635

◆ arg_db_salvage

const command_line::arg_descriptor< bool, false > cryptonote::arg_db_salvage
Initial value:
= {
"db-salvage"
, "Try to salvage a blockchain database if it seems corrupted"
, false
}

◆ arg_db_sync_mode

const command_line::arg_descriptor< std::string > cryptonote::arg_db_sync_mode
Initial value:
= {
"db-sync-mode"
, "Specify sync option, using format [safe|fast|fastest]:[sync|async]:[<nblocks_per_sync>[blocks]|<nbytes_per_sync>[bytes]]."
, "fast:async:250000000bytes"
}

◆ arg_disable_dns_checkpoints

const command_line::arg_descriptor<bool> cryptonote::arg_disable_dns_checkpoints
Initial value:
= {
"disable-dns-checkpoints"
, "Do not retrieve checkpoints from DNS"
}

◆ arg_dns_checkpoints

const command_line::arg_descriptor<bool> cryptonote::arg_dns_checkpoints
static
Initial value:
= {
"enforce-dns-checkpointing"
, "checkpoints from DNS server will be enforced"
, false
}

◆ arg_fast_block_sync

const command_line::arg_descriptor<uint64_t> cryptonote::arg_fast_block_sync
static
Initial value:
= {
"fast-block-sync"
, "Sync up most of the way by using embedded, known block hashes."
, 1
}

◆ arg_fixed_difficulty

const command_line::arg_descriptor< difficulty_type > cryptonote::arg_fixed_difficulty
Initial value:
= {
"fixed-difficulty"
, "Fixed difficulty used for testing."
, 0
}

◆ arg_fluffy_blocks

const command_line::arg_descriptor<bool> cryptonote::arg_fluffy_blocks
static
Initial value:
= {
"fluffy-blocks"
, "Relay blocks as fluffy blocks (obsolete, now default)"
, true
}

◆ arg_keep_alt_blocks

const command_line::arg_descriptor<bool> cryptonote::arg_keep_alt_blocks
static
Initial value:
= {
"keep-alt-blocks"
, "Keep alternative blocks on restart"
, false
}

◆ arg_keep_fakechain

const command_line::arg_descriptor<bool> cryptonote::arg_keep_fakechain
Initial value:
= {
"keep-fakechain"
, "Don't delete any existing database when in fakechain mode."
, false
}

◆ arg_max_txpool_weight

const command_line::arg_descriptor<size_t> cryptonote::arg_max_txpool_weight
static
Initial value:
= {
"max-txpool-weight"
, "Set maximum txpool weight in bytes."
}
#define DEFAULT_TXPOOL_MAX_WEIGHT
Definition cryptonote_config.h:201

◆ arg_offline

const command_line::arg_descriptor< bool > cryptonote::arg_offline
Initial value:
= {
"offline"
, "Do not listen for peers, nor connect to any"
}

◆ arg_prep_blocks_threads

const command_line::arg_descriptor<uint64_t> cryptonote::arg_prep_blocks_threads
static
Initial value:
= {
"prep-blocks-threads"
, "Max number of threads to use when preparing block hashes in groups."
, 4
}

◆ arg_prune_blockchain

const command_line::arg_descriptor<bool> cryptonote::arg_prune_blockchain
static
Initial value:
= {
"prune-blockchain"
, "Prune blockchain"
, false
}

◆ arg_regtest_on

const command_line::arg_descriptor< bool, false > cryptonote::arg_regtest_on
Initial value:
= {
"regtest"
, "Run in a regression testing mode."
, false
}

◆ arg_reorg_notify

const command_line::arg_descriptor<std::string> cryptonote::arg_reorg_notify
static
Initial value:
= {
"reorg-notify"
, "Run a program for each reorg, '%s' will be replaced by the split height, "
"'%h' will be replaced by the new blockchain height, '%n' will be "
"replaced by the number of new blocks in the new chain, and '%d' will be "
"replaced by the number of blocks discarded from the old chain"
, ""
}

◆ arg_show_time_stats

const command_line::arg_descriptor<uint64_t> cryptonote::arg_show_time_stats
static
Initial value:
= {
"show-time-stats"
, "Show time-stats when processing blocks/txs and disk synchronization."
, 0
}

◆ arg_stagenet_on

const command_line::arg_descriptor< bool, false > cryptonote::arg_stagenet_on
Initial value:
= {
"stagenet"
, "Run on stagenet. The wallet must be launched with --stagenet flag."
, false
}

◆ arg_sync_pruned_blocks

const command_line::arg_descriptor< bool > cryptonote::arg_sync_pruned_blocks
Initial value:
= {
"sync-pruned-blocks"
, "Allow syncing from nodes with only pruned blocks"
}

◆ arg_test_dbg_lock_sleep

const command_line::arg_descriptor<int> cryptonote::arg_test_dbg_lock_sleep
static
Initial value:
= {
"test-dbg-lock-sleep"
, "Sleep time in ms, defaults to 0 (off), used to debug before/after locking mutex. Values 100 to 1000 are good for tests."
, 0
}

◆ arg_test_drop_download

const command_line::arg_descriptor<bool> cryptonote::arg_test_drop_download
static
Initial value:
= {
"test-drop-download"
, "For net tests: in download, discard ALL blocks instead checking/saving them (very fast)"
}

◆ arg_test_drop_download_height

const command_line::arg_descriptor<uint64_t> cryptonote::arg_test_drop_download_height
static
Initial value:
= {
"test-drop-download-height"
, "Like test-drop-download but discards only after around certain height"
, 0
}

◆ arg_testnet_on

const command_line::arg_descriptor< bool, false > cryptonote::arg_testnet_on
Initial value:
= {
"testnet"
, "Run on testnet. The wallet must be launched with --testnet flag."
, false
}

◆ RCT_VER_CACHE_SIZE

const size_t cryptonote::RCT_VER_CACHE_SIZE = 8192
staticconstexpr