145 bool handle_incoming_txs(
const std::vector<blobdata>& tx_blobs, std::vector<tx_verification_context>& tvc,
bool keeped_by_block,
bool relayed,
bool do_not_relay);
246 static void init_options(boost::program_options::options_description& desc);
267 bool set_genesis_block(
const block& b);
281 void test_drop_download();
295 bool get_test_drop_download()
const;
305 bool get_test_drop_download_height()
const;
312 uint64_t get_current_blockchain_height()
const;
327 bool get_blocks(
uint64_t start_offset,
size_t count, std::vector<std::pair<cryptonote::blobdata,block>>&
blocks, std::vector<cryptonote::blobdata>& txs)
const;
334 bool get_blocks(
uint64_t start_offset,
size_t count, std::vector<std::pair<cryptonote::blobdata,block>>&
blocks)
const;
341 bool get_blocks(
uint64_t start_offset,
size_t count, std::vector<block>&
blocks)
const;
348 template<
class t_
ids_container,
class t_blocks_container,
class t_missed_container>
349 bool get_blocks(
const t_ids_container& block_ids, t_blocks_container&
blocks, t_missed_container& missed_bs)
const
351 return m_blockchain_storage.get_blocks(block_ids,
blocks, missed_bs);
366 bool get_transactions(
const std::vector<crypto::hash>& txs_ids, std::vector<cryptonote::blobdata>& txs, std::vector<crypto::hash>& missed_txs)
const;
373 bool get_split_transactions_blobs(
const std::vector<crypto::hash>& txs_ids, std::vector<std::tuple<crypto::hash, cryptonote::blobdata, crypto::hash, cryptonote::blobdata>>& txs, std::vector<crypto::hash>& missed_txs)
const;
380 bool get_transactions(
const std::vector<crypto::hash>& txs_ids, std::vector<transaction>& txs, std::vector<crypto::hash>& missed_txs)
const;
387 bool get_block_by_hash(
const crypto::hash &h,
block &blk,
bool *orphan = NULL)
const;
394 bool get_alternative_blocks(std::vector<block>&
blocks)
const;
401 size_t get_alternative_blocks_count()
const;
422 void set_checkpoints_file_path(
const std::string& path);
429 void set_enforce_dns_checkpoints(
bool enforce_dns);
460 bool get_pool_transactions(std::vector<transaction>& txs,
bool include_unrelayed_txes =
true)
const;
467 bool get_txpool_backlog(std::vector<tx_backlog_entry>& backlog)
const;
475 bool get_pool_transaction_hashes(std::vector<crypto::hash>& txs,
bool include_unrelayed_txes =
true)
const;
483 bool get_pool_transaction_stats(
struct txpool_stats& stats,
bool include_unrelayed_txes =
true)
const;
498 bool get_pool_transactions_and_spent_keys_info(std::vector<tx_info>& tx_infos, std::vector<spent_key_image_info>& key_image_infos,
bool include_unrelayed_txes =
true)
const;
512 size_t get_pool_transactions_count()
const;
519 size_t get_blockchain_total_transactions()
const;
533 bool get_short_chain_history(std::list<crypto::hash>& ids)
const;
547 bool find_blockchain_supplement(
const uint64_t req_start_block,
const std::list<crypto::hash>& qblock_ids, std::vector<std::pair<std::pair<cryptonote::blobdata, crypto::hash>, std::vector<std::pair<crypto::hash, cryptonote::blobdata> > > >&
blocks,
uint64_t& total_height,
uint64_t& start_height,
bool pruned,
bool get_miner_tx_hash,
size_t max_count)
const;
563 bool get_tx_outputs_gindexs(
const crypto::hash& tx_id, std::vector<uint64_t>& indexs)
const;
564 bool get_tx_outputs_gindexs(
const crypto::hash& tx_id,
size_t n_txes, std::vector<std::vector<uint64_t>>& indexs)
const;
634 std::string print_pool(
bool short_format)
const;
641 void on_synchronized();
648 void safesyncmode(
const bool onoff);
655 void set_target_blockchain_height(
uint64_t target_blockchain_height);
662 uint64_t get_target_blockchain_height()
const;
669 uint8_t get_ideal_hard_fork_version()
const;
696 std::time_t get_start_time()
const;
708 bool update_checkpoints();
715 std::string get_validators_list();
730 bool isValidatorsListValid();
738 void graceful_exit();
764 bool are_key_images_spent(
const std::vector<crypto::key_image>& key_im, std::vector<bool> &spent)
const;
776 bool utxo_nonexistant(
const std::vector<txin_to_key_public>& public_outputs, std::vector<bool> &spent)
const;
786 bool are_key_images_spent_in_pool(
const std::vector<crypto::key_image>& key_im, std::vector<bool> &spent)
const;
800 std::pair<uint64_t, uint64_t> get_coinbase_tx_sum(
const uint64_t start_offset,
const size_t count);
852 uint32_t get_blockchain_pruning_seed()
const;
861 bool prune_blockchain(
uint32_t pruning_seed = 0);
868 bool update_blockchain_pruning();
875 bool check_blockchain_pruning();
884 bool set_validator_key(std::string
key);
886 std::vector<std::string> generate_ed25519_keypair();
888 std::string sign_message(std::string sk, std::string msg);
892 std::vector<address_outputs> get_address_batch_history(
const address_parse_info &addr,
const uint64_t &start_tx_id = 0,
const uint64_t &batch_size = 100,
bool desc =
false);
894 std::vector<address_txs> get_addr_tx_batch_history(
const address_parse_info &addr,
const uint64_t &start_tx_id = 0,
const uint64_t &batch_size = 100,
bool desc =
false);
941 bool load_state_data();
978 bool check_tx_semantic(
const transaction& tx,
bool keeped_by_block)
const;
984 bool handle_incoming_tx_accumulated_batch(std::vector<tx_verification_batch_info> &tx_info,
bool keeped_by_block);
993 bool update_miner_block_template();
1002 bool handle_command_line(
const boost::program_options::variables_map& vm);
1011 bool check_tx_inputs_keyimages_diff(
const transaction& tx)
const;
1013 bool check_tx_inputs_utxos_diff(
const transaction& tx)
const;
1022 bool check_tx_inputs_ring_members_diff(
const transaction& tx)
const;
1032 bool check_tx_inputs_keyimages_domain(
const transaction& tx)
const;
1044 bool check_fork_time();
1051 bool relay_txpool_transactions();
1058 bool check_updates();
1065 bool check_disk_space();
1072 bool check_block_rate();
1074 bool m_test_drop_download =
true;
1076 uint64_t m_test_drop_download_height = 0;
1078 tx_memory_pool m_mempool;
1079 Blockchain m_blockchain_storage;
1081 i_cryptonote_protocol* m_pprotocol;
1087 account_public_address m_miner_address;
1089 std::string m_config_folder;
1091 cryptonote_protocol_stub m_protocol_stub;
1102 std::atomic<bool> m_starter_message_showed;
1104 uint64_t m_target_blockchain_height;
1106 network_type m_nettype;
1108 std::atomic<bool> m_update_available;
1110 std::string m_checkpoints_path;
1111 time_t m_last_dns_checkpoints_update;
1112 time_t m_last_json_checkpoints_update;
1114 std::atomic_flag m_checkpoints_updating;
1115 bool m_disable_dns_checkpoints;
1117 size_t block_sync_size;
1121 std::unordered_set<crypto::hash> bad_semantics_txes[2];
1122 boost::mutex bad_semantics_txes_lock;
1126 std::unique_ptr<electroneum::basic::Validators> m_validators;
1133 } check_updates_level;
1136 size_t m_last_update_length;
1137 boost::mutex m_update_mutex;
1139 bool m_fluffy_blocks_enabled;
1141 bool m_pad_transactions;
1143 std::shared_ptr<tools::Notify> m_block_rate_notify;
1145 bool m_fallback_to_pow;
1146 std::string m_fallback_to_pow_checkpoint_hash;
1147 uint64_t m_fallback_to_pow_checkpoint_height;