Electroneum
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
cryptonote Namespace Reference

Holds cryptonote related classes and helpers. More...

Namespaces

 anonymous_namespace{cryptonote_basic_impl.h}
 
 anonymous_namespace{miner.cpp}
 
 bootstrap
 

Classes

class  account_base
 
struct  account_keys
 
struct  account_public_address
 
struct  array_hasher
 
class  bdb_safe_buffer
 
class  bdb_safe_buffer_autolock
 
struct  bdb_txn_safe
 
struct  blk_height
 
struct  block
 
struct  block_complete_entry
 
class  BLOCK_DNE
 thrown when a requested block does not exist More...
 
class  BLOCK_EXISTS
 thrown when a block exists, but shouldn't, namely when adding a block More...
 
struct  block_header
 
struct  block_header_response
 
class  BLOCK_INVALID
 thrown when something is wrong with the block to be added More...
 
class  BLOCK_PARENT_DNE
 thrown when a block's parent does not exist (and it needed to) More...
 
class  block_queue
 
struct  block_verification_context
 
class  Blockchain
 
class  BlockchainBDB
 
class  BlockchainDB
 The BlockchainDB backing store interface declaration/contract. More...
 
class  BlockchainLMDB
 
class  checkpoints
 A container for blockchain checkpoints. More...
 
struct  COMMAND_RPC_FAST_EXIT
 
struct  COMMAND_RPC_FLUSH_TRANSACTION_POOL
 
struct  COMMAND_RPC_GENERATE_ED25519_KEYPAIR
 
struct  COMMAND_RPC_GET_ALT_BLOCKS_HASHES
 
struct  COMMAND_RPC_GET_ALTERNATE_CHAINS
 
struct  COMMAND_RPC_GET_BLOCK
 
struct  COMMAND_RPC_GET_BLOCK_HEADER_BY_HASH
 
struct  COMMAND_RPC_GET_BLOCK_HEADER_BY_HEIGHT
 
struct  COMMAND_RPC_GET_BLOCK_HEADERS_RANGE
 
struct  COMMAND_RPC_GET_BLOCKS_BY_HEIGHT
 
struct  COMMAND_RPC_GET_BLOCKS_FAST
 
struct  COMMAND_RPC_GET_COINBASE_TX_SUM
 
struct  COMMAND_RPC_GET_CONNECTIONS
 
struct  COMMAND_RPC_GET_HASHES_FAST
 
struct  COMMAND_RPC_GET_HEIGHT
 
struct  COMMAND_RPC_GET_INFO
 
struct  COMMAND_RPC_GET_LAST_BLOCK_HEADER
 
struct  COMMAND_RPC_GET_OUTPUT_HISTOGRAM
 
struct  COMMAND_RPC_GET_OUTPUTS
 
struct  COMMAND_RPC_GET_OUTPUTS_BIN
 
struct  COMMAND_RPC_GET_PEER_LIST
 
struct  COMMAND_RPC_GET_PER_KB_FEE_ESTIMATE
 
struct  COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS
 
struct  COMMAND_RPC_GET_RANDOM_RCT_OUTPUTS
 
struct  COMMAND_RPC_GET_TRANSACTION_POOL
 
struct  COMMAND_RPC_GET_TRANSACTION_POOL_BACKLOG
 
struct  COMMAND_RPC_GET_TRANSACTION_POOL_HASHES
 
struct  COMMAND_RPC_GET_TRANSACTION_POOL_STATS
 
struct  COMMAND_RPC_GET_TRANSACTIONS
 
struct  COMMAND_RPC_GET_TX_GLOBAL_OUTPUTS_INDEXES
 
struct  COMMAND_RPC_GET_VERSION
 
struct  COMMAND_RPC_GETBANS
 
struct  COMMAND_RPC_GETBLOCKCOUNT
 
struct  COMMAND_RPC_GETBLOCKHASH
 
struct  COMMAND_RPC_GETBLOCKTEMPLATE
 
struct  COMMAND_RPC_HARD_FORK_INFO
 
struct  COMMAND_RPC_INJECT_EMERGENCY_VLIST
 
struct  COMMAND_RPC_IS_KEY_IMAGE_SPENT
 
struct  COMMAND_RPC_MINING_STATUS
 
struct  COMMAND_RPC_OUT_PEERS
 
struct  COMMAND_RPC_RELAY_TX
 
struct  COMMAND_RPC_SAVE_BC
 
struct  COMMAND_RPC_SEND_RAW_TX
 
struct  COMMAND_RPC_SET_LOG_CATEGORIES
 
struct  COMMAND_RPC_SET_LOG_HASH_RATE
 
struct  COMMAND_RPC_SET_LOG_LEVEL
 
struct  COMMAND_RPC_SET_VALIDATOR_KEY
 
struct  COMMAND_RPC_SETBANS
 
struct  COMMAND_RPC_SIGN_MESSAGE
 
struct  COMMAND_RPC_START_MINING
 
struct  COMMAND_RPC_START_SAVE_GRAPH
 
struct  COMMAND_RPC_STOP_DAEMON
 
struct  COMMAND_RPC_STOP_MINING
 
struct  COMMAND_RPC_STOP_SAVE_GRAPH
 
struct  COMMAND_RPC_SUBMITBLOCK
 
struct  COMMAND_RPC_SYNC_INFO
 
struct  COMMAND_RPC_UPDATE
 
struct  connection_info
 
class  core
 handles core cryptonote functionality More...
 
class  core_rpc_server
 
struct  core_stat_info
 
struct  CORE_SYNC_DATA
 
struct  cryptonote_connection_context
 
class  cryptonote_protocol_handler_base
 
class  cryptonote_protocol_handler_base_pimpl
 
struct  cryptonote_protocol_stub
 
class  DB_CREATE_FAILURE
 thrown when creating the BlockchainDB fails 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_EXCEPTION
 A base class for BlockchainDB exceptions. More...
 
class  DB_OPEN_FAILURE
 thrown when opening the BlockchainDB fails More...
 
class  DB_SYNC_FAILURE
 thrown when synchronizing the BlockchainDB to disk fails More...
 
struct  get_outputs_out
 
class  HardFork
 
struct  i_cryptonote_protocol
 
struct  i_miner_handler
 
struct  integrated_address
 
class  KEY_IMAGE_EXISTS
 thrown when a spent key image exists, but shouldn't, namely when adding a block More...
 
struct  keypair
 
struct  mdb_block_info
 
struct  mdb_rflags
 
struct  mdb_threadinfo
 
struct  mdb_txn_cursors
 
struct  mdb_txn_safe
 
class  miner
 
struct  NOTIFY_EMERGENCY_VALIDATORS_LIST
 
struct  NOTIFY_NEW_BLOCK
 
struct  NOTIFY_NEW_FLUFFY_BLOCK
 
struct  NOTIFY_NEW_TRANSACTIONS
 
struct  NOTIFY_REQUEST_CHAIN
 
struct  NOTIFY_REQUEST_FLUFFY_MISSING_TX
 
struct  NOTIFY_REQUEST_GET_OBJECTS
 
struct  NOTIFY_REQUEST_VALIDATORS_LIST
 
struct  NOTIFY_RESPONSE_CHAIN_ENTRY
 
struct  NOTIFY_RESPONSE_GET_OBJECTS
 
struct  outkey
 
struct  output_data_t
 a struct containing output metadata 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...
 
struct  outtx
 
struct  peer
 
struct  pre_rct_outkey
 
struct  public_address_outer_blob
 
struct  public_integrated_address_outer_blob
 
struct  rpc_args
 Processes command line arguments related to server-side RPC. More...
 
class  simple_wallet
 Manages wallet operations. This is the most abstracted wallet class. More...
 
struct  spent_key_image_info
 
class  t_cryptonote_protocol_handler
 
struct  test_options
 
class  transaction
 
class  transaction_prefix
 
struct  tx_backlog_entry
 
struct  tx_data_t
 
struct  tx_destination_entry
 
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...
 
struct  tx_extra_merge_mining_tag
 
struct  tx_extra_mysterious_minergate
 
struct  tx_extra_nonce
 
struct  tx_extra_padding
 
struct  tx_extra_pub_key
 
struct  tx_info
 
class  tx_memory_pool
 Transaction pool, handles transactions which are not part of a block. More...
 
struct  tx_out
 
struct  tx_source_entry
 
struct  tx_verification_context
 
class  txCompare
 
struct  txin_gen
 
struct  txin_to_key
 
struct  txin_to_script
 
struct  txin_to_scripthash
 
struct  txindex
 
struct  txout_to_key
 
struct  txout_to_script
 
struct  txout_to_scripthash
 
struct  txpool_histo
 
struct  txpool_stats
 
struct  txpool_tx_meta_t
 a struct containing txpool per transaction metadata More...
 
struct  validator_db
 

Typedefs

typedef std::pair< crypto::hash, uint64_t > tx_out_index
 
typedef struct cryptonote::mdb_block_info mdb_block_info
 
typedef struct cryptonote::blk_height blk_height
 
typedef struct cryptonote::txindex txindex
 
typedef struct cryptonote::pre_rct_outkey pre_rct_outkey
 
typedef struct cryptonote::outkey outkey
 
typedef struct cryptonote::outtx outtx
 
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::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_keytxout_target_v
 
typedef std::uint64_t difficulty_type
 
typedef boost::variant< tx_extra_padding, tx_extra_pub_key, tx_extra_nonce, tx_extra_merge_mining_tag, tx_extra_mysterious_minergatetx_extra_field
 
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 More...
 
typedef std::set< tx_by_fee_and_receive_time_entry, txComparesorted_tx_container
 container for sorting transactions by fee per unit size More...
 
typedef std::string blobdata
 

Enumerations

enum  blockchain_db_sync_mode { db_defaultsync, db_sync, db_async, db_nosync }
 

Functions

bool blockchain_valid_db_type (const std::string &db_type)
 
std::string blockchain_db_types (const std::string &sep)
 
BlockchainDBnew_db (const std::string &db_type)
 
void lmdb_resized (MDB_env *env)
 
int lmdb_txn_begin (MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **txn)
 
int lmdb_txn_renew (MDB_txn *txn)
 
std::string get_protocol_state_string (cryptonote_connection_context::state s)
 
size_t get_min_block_size (uint8_t version)
 
size_t get_max_block_size ()
 
size_t get_max_tx_size ()
 
bool get_block_reward (size_t median_size, size_t current_block_size, 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 (bool testnet, account_public_address const &adr)
 
std::string get_account_integrated_address_as_str (bool testnet, account_public_address const &adr, crypto::hash8 const &payment_id)
 
bool is_coinbase (const transaction &tx)
 
bool get_account_integrated_address_from_str (account_public_address &adr, bool &has_payment_id, crypto::hash8 &payment_id, bool testnet, std::string const &str)
 
bool get_account_address_from_str (account_public_address &adr, bool testnet, std::string const &str)
 
bool get_account_address_from_str_or_url (cryptonote::account_public_address &address, bool &has_payment_id, crypto::hash8 &payment_id, bool testnet, const std::string &str_or_url, std::function< std::string(const std::string &, const std::vector< std::string > &, bool)> dns_confirm)
 
bool get_account_address_from_str_or_url (cryptonote::account_public_address &address, bool testnet, 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)
 
void get_transaction_prefix_hash (const transaction_prefix &tx, crypto::hash &h)
 
crypto::hash get_transaction_prefix_hash (const transaction_prefix &tx)
 
bool parse_and_validate_tx_from_blob (const blobdata &tx_blob, transaction &tx)
 
bool parse_and_validate_tx_base_from_blob (const blobdata &tx_blob, transaction &tx)
 
bool parse_and_validate_tx_from_blob (const blobdata &tx_blob, transaction &tx, crypto::hash &tx_hash, crypto::hash &tx_prefix_hash)
 
bool generate_key_image_helper (const account_keys &ack, const crypto::public_key &tx_public_key, size_t real_output_index, keypair &in_ephemeral, crypto::key_image &ki)
 
uint64_t power_integral (uint64_t a, uint64_t b)
 
bool parse_amount (uint64_t &amount, const std::string &str_amount_)
 
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)
 
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_extra_nonce_to_tx_extra (std::vector< uint8_t > &tx_extra, const blobdata &extra_nonce)
 
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 encrypt_payment_id (crypto::hash8 &payment_id, const crypto::public_key &public_key, const crypto::secret_key &secret_key)
 
bool decrypt_payment_id (crypto::hash8 &payment_id, const crypto::public_key &public_key, const crypto::secret_key &secret_key)
 
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)
 
std::string short_hash_str (const crypto::hash &h)
 
bool is_out_to_acc (const account_keys &acc, const txout_to_key &out_key, const crypto::public_key &tx_pub_key, size_t output_index)
 
bool is_out_to_acc_precomp (const crypto::public_key &spend_public_key, const txout_to_key &out_key, const crypto::key_derivation &derivation, size_t output_index)
 
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, std::vector< size_t > &outs, uint64_t &money_transfered)
 
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)
 
std::string print_money (uint64_t amount, unsigned int decimal_point)
 
crypto::hash get_blob_hash (const blobdata &blob)
 
crypto::hash get_transaction_hash (const transaction &t)
 
bool get_transaction_hash (const transaction &t, crypto::hash &res)
 
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)
 
bool get_block_hash (const block &b, crypto::hash &res)
 
crypto::hash get_block_hash (const block &b)
 
bool get_block_longhash (const block &b, crypto::hash &res, uint64_t height)
 
std::vector< uint64_t > relative_output_offsets_to_absolute (const std::vector< uint64_t > &off)
 
std::vector< uint64_t > absolute_output_offsets_to_relative (const std::vector< uint64_t > &off)
 
crypto::hash get_block_longhash (const block &b, uint64_t height)
 
bool parse_and_validate_block_from_blob (const blobdata &b_blob, block &b)
 
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)
 
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)
 
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 (const crypto::hash &hash, difficulty_type difficulty)
 checks if a hash fits the given difficulty More...
 
difficulty_type next_difficulty (std::vector< std::uint64_t > timestamps, std::vector< difficulty_type > cumulative_difficulties, size_t target_seconds, uint8_t version)
 
block_complete_entry get_block_complete_entry (block &b, tx_memory_pool &pool)
 
bool construct_miner_tx (size_t height, size_t median_size, uint64_t already_generated_coins, size_t current_block_size, uint64_t fee, const account_public_address &miner_address, transaction &tx, const blobdata &extra_nonce, size_t max_outs, uint8_t hard_fork_version, bool testnet)
 
crypto::public_key get_destination_view_key_pub (const std::vector< tx_destination_entry > &destinations, const account_keys &sender_keys)
 
bool construct_tx_and_get_tx_key (const account_keys &sender_account_keys, const std::vector< tx_source_entry > &sources, const std::vector< tx_destination_entry > &destinations, std::vector< uint8_t > extra, transaction &tx, uint64_t unlock_time, crypto::secret_key &tx_key, bool rct)
 
bool construct_tx (const account_keys &sender_account_keys, const std::vector< tx_source_entry > &sources, const std::vector< tx_destination_entry > &destinations, std::vector< uint8_t > extra, transaction &tx, uint64_t unlock_time)
 
bool generate_genesis_block (block &bl, std::string const &genesis_tx, uint32_t nonce)
 
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)
 
static cryptonote::blobdata get_pruned_tx_blob (const cryptonote::blobdata &blobdata)
 
uint64_t slow_memmem (const void *start_buff, size_t buflen, const void *pat, size_t patlen)
 

Variables

std::string arg_db_type_description = "Specify database type, available: " + cryptonote::blockchain_db_types(", ")
 
const command_line::arg_descriptor< std::string > arg_db_type
 
const command_line::arg_descriptor< std::string > arg_db_sync_mode
 
const command_line::arg_descriptor< boolarg_db_salvage
 
static const crypto::hash null_hash = AUTO_VAL_INIT(null_hash)
 
static const crypto::hash8 null_hash8 = AUTO_VAL_INIT(null_hash8)
 
static const crypto::public_key null_pkey = AUTO_VAL_INIT(null_pkey)
 

Detailed Description

Holds cryptonote related classes and helpers.

Typedef Documentation

◆ blk_height

◆ blobdata

typedef std::string cryptonote::blobdata

◆ difficulty_type

typedef std::uint64_t cryptonote::difficulty_type

◆ mdb_block_info

◆ mdb_rflags

◆ mdb_threadinfo

◆ mdb_txn_cursors

◆ outkey

◆ outtx

◆ pre_rct_outkey

◆ 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

typedef std::pair<crypto::hash, uint64_t> cryptonote::tx_out_index

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

◆ txin_v

◆ txindex

◆ txout_target_v

Enumeration Type Documentation

◆ 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)

Function Documentation

◆ absolute_output_offsets_to_relative()

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

◆ 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_tx_pub_key_to_extra()

bool cryptonote::add_tx_pub_key_to_extra ( transaction 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 
)

◆ blockchain_db_types()

std::string cryptonote::blockchain_db_types ( const std::string &  sep)

◆ blockchain_valid_db_type()

bool cryptonote::blockchain_valid_db_type ( const std::string &  db_type)

◆ cadc()

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

◆ cadd()

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

◆ calculate_block_hash()

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

◆ calculate_transaction_hash()

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

◆ check_hash()

bool cryptonote::check_hash ( const crypto::hash hash,
difficulty_type  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_outs_overflow()

bool cryptonote::check_outs_overflow ( const transaction tx)

◆ check_outs_valid()

bool cryptonote::check_outs_valid ( const transaction tx)

◆ construct_miner_tx()

bool cryptonote::construct_miner_tx ( size_t  height,
size_t  median_size,
uint64_t  already_generated_coins,
size_t  current_block_size,
uint64_t  fee,
const account_public_address miner_address,
transaction tx,
const blobdata extra_nonce,
size_t  max_outs,
uint8_t  hard_fork_version,
bool  testnet 
)

◆ construct_tx()

bool cryptonote::construct_tx ( const account_keys sender_account_keys,
const std::vector< tx_source_entry > &  sources,
const std::vector< tx_destination_entry > &  destinations,
std::vector< uint8_t >  extra,
transaction tx,
uint64_t  unlock_time 
)

◆ construct_tx_and_get_tx_key()

bool cryptonote::construct_tx_and_get_tx_key ( const account_keys sender_account_keys,
const std::vector< tx_source_entry > &  sources,
const std::vector< tx_destination_entry > &  destinations,
std::vector< uint8_t >  extra,
transaction tx,
uint64_t  unlock_time,
crypto::secret_key tx_key,
bool  rct 
)

◆ 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_payment_id()

bool cryptonote::decrypt_payment_id ( crypto::hash8 payment_id,
const crypto::public_key public_key,
const crypto::secret_key secret_key 
)

◆ encrypt_payment_id()

bool cryptonote::encrypt_payment_id ( crypto::hash8 payment_id,
const crypto::public_key public_key,
const crypto::secret_key secret_key 
)

◆ 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 crypto::public_key tx_public_key,
size_t  real_output_index,
keypair in_ephemeral,
crypto::key_image ki 
)

◆ get_account_address_as_str()

std::string cryptonote::get_account_address_as_str ( bool  testnet,
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 ( account_public_address adr,
bool  testnet,
std::string const &  str 
)

◆ get_account_address_from_str_or_url() [1/2]

bool cryptonote::get_account_address_from_str_or_url ( cryptonote::account_public_address address,
bool has_payment_id,
crypto::hash8 payment_id,
bool  testnet,
const std::string &  str_or_url,
std::function< std::string(const std::string &, const std::vector< std::string > &, bool)>  dns_confirm 
)

◆ get_account_address_from_str_or_url() [2/2]

bool cryptonote::get_account_address_from_str_or_url ( cryptonote::account_public_address address,
bool  testnet,
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 ( bool  testnet,
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_account_integrated_address_from_str()

bool cryptonote::get_account_integrated_address_from_str ( account_public_address adr,
bool has_payment_id,
crypto::hash8 payment_id,
bool  testnet,
std::string const &  str 
)

◆ get_blob_hash() [1/2]

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

◆ get_blob_hash() [2/2]

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

◆ get_block_complete_entry()

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

◆ get_block_hash() [1/2]

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

◆ get_block_hash() [2/2]

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

◆ 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/2]

bool cryptonote::get_block_longhash ( const block b,
crypto::hash res,
uint64_t  height 
)

◆ get_block_longhash() [2/2]

crypto::hash cryptonote::get_block_longhash ( const block b,
uint64_t  height 
)

◆ get_block_reward()

bool cryptonote::get_block_reward ( size_t  median_size,
size_t  current_block_size,
uint64_t  already_generated_coins,
uint64_t &  reward,
uint8_t  version 
)

◆ 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 account_keys sender_keys 
)

◆ 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_max_block_size()

size_t cryptonote::get_max_block_size ( )

◆ get_max_tx_size()

size_t cryptonote::get_max_tx_size ( )

◆ get_min_block_size()

size_t cryptonote::get_min_block_size ( 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_outs_money_amount()

uint64_t cryptonote::get_outs_money_amount ( const transaction tx)

◆ 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_string()

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

◆ get_pruned_tx_blob()

static cryptonote::blobdata cryptonote::get_pruned_tx_blob ( const cryptonote::blobdata blobdata)
static

◆ 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/2]

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

◆ get_transaction_prefix_hash() [2/2]

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

◆ get_tx_fee() [1/2]

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

◆ get_tx_fee() [2/2]

uint64_t cryptonote::get_tx_fee ( const transaction tx)

◆ 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_prefix tx_prefix,
size_t  pk_index 
)

◆ get_tx_pub_key_from_extra() [3/3]

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

◆ get_tx_tree_hash() [1/3]

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

◆ 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]

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

◆ get_unit()

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

◆ is_coinbase()

bool cryptonote::is_coinbase ( const transaction tx)

◆ is_out_to_acc()

bool cryptonote::is_out_to_acc ( const account_keys acc,
const txout_to_key out_key,
const crypto::public_key tx_pub_key,
size_t  output_index 
)

◆ is_out_to_acc_precomp()

bool cryptonote::is_out_to_acc_precomp ( const crypto::public_key spend_public_key,
const txout_to_key out_key,
const crypto::key_derivation derivation,
size_t  output_index 
)

◆ is_valid_decomposed_amount()

bool cryptonote::is_valid_decomposed_amount ( uint64_t  amount)

◆ lmdb_resized()

void cryptonote::lmdb_resized ( MDB_env *  env)

◆ 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,
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,
const crypto::public_key tx_pub_key,
std::vector< size_t > &  outs,
uint64_t &  money_transfered 
)

◆ mul()

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

◆ new_db()

BlockchainDB * cryptonote::new_db ( const std::string &  db_type)

◆ next_difficulty()

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

◆ obj_to_json_str()

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

◆ operator!=() [1/2]

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

◆ operator!=() [2/2]

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

◆ operator==() [1/4]

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

◆ operator==() [2/4]

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

◆ operator==() [3/4]

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

◆ operator==() [4/4]

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

◆ parse_amount()

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

◆ parse_and_validate_block_from_blob()

bool cryptonote::parse_and_validate_block_from_blob ( const blobdata b_blob,
block b 
)

◆ parse_and_validate_tx_base_from_blob()

bool cryptonote::parse_and_validate_tx_base_from_blob ( const blobdata tx_blob,
transaction tx 
)

◆ parse_and_validate_tx_from_blob() [1/2]

bool cryptonote::parse_and_validate_tx_from_blob ( const blobdata tx_blob,
transaction tx 
)

◆ parse_and_validate_tx_from_blob() [2/2]

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

◆ parse_tx_extra()

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

◆ power_integral()

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

◆ print_money()

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

◆ 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 
)

◆ 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 
)

◆ short_hash_str()

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

◆ slow_memmem()

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

◆ t_serializable_object_to_blob() [1/2]

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

◆ t_serializable_object_to_blob() [2/2]

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

◆ 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 
)

Variable Documentation

◆ 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]."
, "fast:async:1000"
}

◆ arg_db_type

const command_line::arg_descriptor< std::string > cryptonote::arg_db_type
Initial value:
= {
"db-type"
, DEFAULT_DB_TYPE
}
std::string arg_db_type_description
Definition: blockchain_db.cpp:82

◆ arg_db_type_description

std::string cryptonote::arg_db_type_description = "Specify database type, available: " + cryptonote::blockchain_db_types(", ")

◆ null_hash

const crypto::hash cryptonote::null_hash = AUTO_VAL_INIT(null_hash)
static

◆ null_hash8

const crypto::hash8 cryptonote::null_hash8 = AUTO_VAL_INIT(null_hash8)
static

◆ null_pkey

const crypto::public_key cryptonote::null_pkey = AUTO_VAL_INIT(null_pkey)
static