Monero
cryptonote_core.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2020, The Monero Project
2 //
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without modification, are
6 // permitted provided that the following conditions are met:
7 //
8 // 1. Redistributions of source code must retain the above copyright notice, this list of
9 // conditions and the following disclaimer.
10 //
11 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
12 // of conditions and the following disclaimer in the documentation and/or other
13 // materials provided with the distribution.
14 //
15 // 3. Neither the name of the copyright holder nor the names of its contributors may be
16 // used to endorse or promote products derived from this software without specific
17 // prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27 // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 //
29 // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
30 
31 #pragma once
32 
33 #include <ctime>
34 
35 #include <boost/function.hpp>
36 #include <boost/program_options/options_description.hpp>
37 #include <boost/program_options/variables_map.hpp>
38 
39 #include "cryptonote_basic/fwd.h"
43 #include "storages/portable_storage_template_helper.h"
44 #include "common/download.h"
45 #include "common/command_line.h"
46 #include "tx_pool.h"
47 #include "blockchain.h"
48 #include "cryptonote_basic/miner.h"
50 #include "warnings.h"
51 #include "crypto/hash.h"
52 #include "span.h"
53 #include "rpc/fwd.h"
54 
57 
58 namespace cryptonote
59 {
60  struct test_options {
61  const std::pair<uint8_t, uint64_t> *hard_forks;
63  };
64 
73 
74  /************************************************************************/
75  /* */
76  /************************************************************************/
77 
85  class core final: public i_miner_handler, public i_core_events
86  {
87  public:
88 
96  core(i_cryptonote_protocol* pprotocol);
97 
105 
113  bool on_idle();
114 
128  bool handle_incoming_tx(const tx_blob_entry& tx_blob, tx_verification_context& tvc, relay_method tx_relay, bool relayed);
129 
145  bool handle_incoming_txs(epee::span<const tx_blob_entry> tx_blobs, epee::span<tx_verification_context> tvc, relay_method tx_relay, bool relayed);
146 
160  bool handle_incoming_txs(const std::vector<tx_blob_entry>& tx_blobs, std::vector<tx_verification_context>& tvc, relay_method tx_relay, bool relayed)
161  {
162  tvc.resize(tx_blobs.size());
163  return handle_incoming_txs(epee::to_span(tx_blobs), epee::to_mut_span(tvc), tx_relay, relayed);
164  }
165 
181  bool handle_incoming_block(const blobdata& block_blob, const block *b, block_verification_context& bvc, bool update_miner_blocktemplate = true);
182 
188  bool prepare_handle_incoming_blocks(const std::vector<block_complete_entry> &blocks_entry, std::vector<block> &blocks);
189 
195  bool cleanup_handle_incoming_blocks(bool force_sync = false);
196 
204  bool check_incoming_block_size(const blobdata& block_blob) const;
205 
211  i_cryptonote_protocol* get_protocol(){return m_pprotocol;}
212 
213  //-------------------- i_miner_handler -----------------------
214 
227  virtual bool handle_block_found(block& b, block_verification_context &bvc);
228 
234  virtual bool get_block_template(block& b, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, uint64_t& expected_reward, const blobdata& ex_nonce, uint64_t &seed_height, crypto::hash &seed_hash);
235  virtual bool get_block_template(block& b, const crypto::hash *prev_block, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, uint64_t& expected_reward, const blobdata& ex_nonce, uint64_t &seed_height, crypto::hash &seed_hash);
236 
241  virtual void on_transactions_relayed(epee::span<const cryptonote::blobdata> tx_blobs, relay_method tx_relay) final;
242 
243 
249  miner& get_miner(){return m_miner;}
250 
256  const miner& get_miner()const{return m_miner;}
257 
266  static void init_options(boost::program_options::options_description& desc);
267 
280  bool init(const boost::program_options::variables_map& vm, const test_options *test_options = NULL, const GetCheckpointsCallback& get_checkpoints = nullptr);
281 
287  bool set_genesis_block(const block& b);
288 
296  bool deinit();
297 
301  void test_drop_download();
302 
308  void test_drop_download_height(uint64_t height);
309 
315  bool get_test_drop_download() const;
316 
325  bool get_test_drop_download_height() const;
326 
332  uint64_t get_current_blockchain_height() const;
333 
340  void get_blockchain_top(uint64_t& height, crypto::hash& top_id) const;
341 
347  bool get_blocks(uint64_t start_offset, size_t count, std::vector<std::pair<cryptonote::blobdata,block>>& blocks, std::vector<cryptonote::blobdata>& txs) const;
348 
354  bool get_blocks(uint64_t start_offset, size_t count, std::vector<std::pair<cryptonote::blobdata,block>>& blocks) const;
355 
361  bool get_blocks(uint64_t start_offset, size_t count, std::vector<block>& blocks) const;
362 
368  template<class t_ids_container, class t_blocks_container, class t_missed_container>
369  bool get_blocks(const t_ids_container& block_ids, t_blocks_container& blocks, t_missed_container& missed_bs) const
370  {
371  return m_blockchain_storage.get_blocks(block_ids, blocks, missed_bs);
372  }
373 
379  crypto::hash get_block_id_by_height(uint64_t height) const;
380 
386  bool get_transactions(const std::vector<crypto::hash>& txs_ids, std::vector<cryptonote::blobdata>& txs, std::vector<crypto::hash>& missed_txs) const;
387 
393  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;
394 
400  bool get_transactions(const std::vector<crypto::hash>& txs_ids, std::vector<transaction>& txs, std::vector<crypto::hash>& missed_txs) const;
401 
407  bool get_block_by_hash(const crypto::hash &h, block &blk, bool *orphan = NULL) const;
408 
414  bool get_alternative_blocks(std::vector<block>& blocks) const;
415 
421  size_t get_alternative_blocks_count() const;
422 
428  void set_cryptonote_protocol(i_cryptonote_protocol* pprotocol);
429 
435  void set_checkpoints(checkpoints&& chk_pts);
436 
442  void set_checkpoints_file_path(const std::string& path);
443 
449  void set_enforce_dns_checkpoints(bool enforce_dns);
450 
456  void set_txpool_listener(boost::function<void(std::vector<txpool_event>)> zmq_pub);
457 
463  void disable_dns_checkpoints(bool disable = true) { m_disable_dns_checkpoints = disable; }
464 
470  bool pool_has_tx(const crypto::hash &txid) const;
471 
478  bool get_pool_transactions(std::vector<transaction>& txs, bool include_sensitive_txes = false) const;
479 
486  bool get_txpool_backlog(std::vector<tx_backlog_entry>& backlog, bool include_sensitive_txes = false) const;
487 
494  bool get_pool_transaction_hashes(std::vector<crypto::hash>& txs, bool include_sensitive_txes = false) const;
495 
502  bool get_pool_transaction_stats(struct txpool_stats& stats, bool include_sensitive_txes = false) const;
503 
509  bool get_pool_transaction(const crypto::hash& id, cryptonote::blobdata& tx, relay_category tx_category) const;
510 
517  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_sensitive_txes = false) const;
518 
524  bool get_pool_for_rpc(std::vector<cryptonote::rpc::tx_in_pool>& tx_infos, cryptonote::rpc::key_images_with_tx_hashes& key_image_infos) const;
525 
532  size_t get_pool_transactions_count(bool include_sensitive_txes = false) const;
533 
539  size_t get_blockchain_total_transactions() const;
540 
546  bool have_block(const crypto::hash& id) const;
547 
553  bool get_short_chain_history(std::list<crypto::hash>& ids) const;
554 
560  bool find_blockchain_supplement(const std::list<crypto::hash>& qblock_ids, bool clip_pruned, NOTIFY_RESPONSE_CHAIN_ENTRY::request& resp) const;
561 
567  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;
568 
574  bool get_tx_outputs_gindexs(const crypto::hash& tx_id, std::vector<uint64_t>& indexs) const;
575  bool get_tx_outputs_gindexs(const crypto::hash& tx_id, size_t n_txes, std::vector<std::vector<uint64_t>>& indexs) const;
576 
582  crypto::hash get_tail_id() const;
583 
589  difficulty_type get_block_cumulative_difficulty(uint64_t height) const;
590 
597 
603  bool get_output_distribution(uint64_t amount, uint64_t from_height, uint64_t to_height, uint64_t &start_height, std::vector<uint64_t> &distribution, uint64_t &base) const;
604 
610  void pause_mine();
611 
617  void resume_mine();
618 
624  Blockchain& get_blockchain_storage(){return m_blockchain_storage;}
625 
631  const Blockchain& get_blockchain_storage()const{return m_blockchain_storage;}
632 
638  std::string print_pool(bool short_format) const;
639 
645  void on_synchronized();
646 
652  void safesyncmode(const bool onoff);
653 
659  void set_target_blockchain_height(uint64_t target_blockchain_height);
660 
666  virtual uint64_t get_target_blockchain_height() const override;
667 
673  uint8_t get_ideal_hard_fork_version() const;
674 
680  uint8_t get_ideal_hard_fork_version(uint64_t height) const;
681 
687  uint8_t get_hard_fork_version(uint64_t height) const;
688 
694  uint64_t get_earliest_ideal_height_for_version(uint8_t version) const;
695 
700  std::time_t get_start_time() const;
701 
712  bool update_checkpoints(const bool skip_dns = false);
713 
720  void graceful_exit();
721 
727  void stop();
728 
734  bool is_key_image_spent(const crypto::key_image& key_im) const;
735 
746  bool are_key_images_spent(const std::vector<crypto::key_image>& key_im, std::vector<bool> &spent) const;
747 
756  bool are_key_images_spent_in_pool(const std::vector<crypto::key_image>& key_im, std::vector<bool> &spent) const;
757 
763  size_t get_block_sync_size(uint64_t height) const;
764 
770  std::pair<boost::multiprecision::uint128_t, boost::multiprecision::uint128_t> get_coinbase_tx_sum(const uint64_t start_offset, const size_t count);
771 
777  network_type get_nettype() const { return m_nettype; };
778 
787  bool is_update_available() const { return m_update_available; }
788 
794  bool fluffy_blocks_enabled() const { return m_fluffy_blocks_enabled; }
795 
801  uint64_t prevalidate_block_hashes(uint64_t height, const std::vector<crypto::hash> &hashes, const std::vector<uint64_t> &weights);
802 
808  uint64_t get_free_space() const;
809 
815  bool offline() const { return m_offline; }
816 
822  uint32_t get_blockchain_pruning_seed() const;
823 
831  bool prune_blockchain(uint32_t pruning_seed = 0);
832 
838  bool update_blockchain_pruning();
839 
845  bool check_blockchain_pruning();
846 
852  bool is_within_compiled_block_hash_area(uint64_t height) const;
853 
857  bool has_block_weights(uint64_t height, uint64_t nblocks) const;
858 
862  void flush_bad_txs_cache();
863 
867  void flush_invalid_blocks();
868 
876  bool get_txpool_complement(const std::vector<crypto::hash> &hashes, std::vector<cryptonote::blobdata> &txes);
877 
878  private:
879 
890  bool add_new_tx(transaction& tx, const crypto::hash& tx_hash, const cryptonote::blobdata &blob, size_t tx_weight, tx_verification_context& tvc, relay_method tx_relay, bool relayed);
891 
906  bool add_new_tx(transaction& tx, tx_verification_context& tvc, relay_method tx_relay, bool relayed);
907 
913  bool add_new_block(const block& b, block_verification_context& bvc);
914 
922  bool load_state_data();
923 
929  bool parse_tx_from_blob(transaction& tx, crypto::hash& tx_hash, const blobdata& blob) const;
930 
941  bool check_tx_syntax(const transaction& tx) const;
942 
959  bool check_tx_semantic(const transaction& tx, bool keeped_by_block) const;
960  void set_semantics_failed(const crypto::hash &tx_hash);
961 
962  bool handle_incoming_tx_pre(const tx_blob_entry& tx_blob, tx_verification_context& tvc, cryptonote::transaction &tx, crypto::hash &tx_hash);
963  bool handle_incoming_tx_post(const tx_blob_entry& tx_blob, tx_verification_context& tvc, cryptonote::transaction &tx, crypto::hash &tx_hash);
965  bool handle_incoming_tx_accumulated_batch(std::vector<tx_verification_batch_info> &tx_info, bool keeped_by_block);
966 
974  bool update_miner_block_template();
975 
983  bool handle_command_line(const boost::program_options::variables_map& vm);
984 
992  bool check_tx_inputs_keyimages_diff(const transaction& tx) const;
993 
1001  bool check_tx_inputs_ring_members_diff(const transaction& tx) const;
1002 
1011  bool check_tx_inputs_keyimages_domain(const transaction& tx) const;
1012 
1018  bool relay_txpool_transactions();
1019 
1025  bool check_updates();
1026 
1032  bool check_disk_space();
1033 
1039  bool check_block_rate();
1040 
1046  bool recalculate_difficulties();
1047 
1048  bool m_test_drop_download = true;
1049 
1050  uint64_t m_test_drop_download_height = 0;
1051 
1054 
1056 
1057  epee::critical_section m_incoming_tx_lock;
1058 
1059  //m_miner and m_miner_addres are probably temporary here
1061 
1062  std::string m_config_folder;
1063 
1065 
1066  epee::math_helper::once_a_time_seconds<60*60*12, false> m_store_blockchain_interval;
1067  epee::math_helper::once_a_time_seconds<60*60*2, true> m_fork_moaner;
1068  epee::math_helper::once_a_time_seconds<60*2, false> m_txpool_auto_relayer;
1069  epee::math_helper::once_a_time_seconds<60*60*12, true> m_check_updates_interval;
1070  epee::math_helper::once_a_time_seconds<60*10, true> m_check_disk_space_interval;
1071  epee::math_helper::once_a_time_seconds<90, false> m_block_rate_interval;
1072  epee::math_helper::once_a_time_seconds<60*60*5, true> m_blockchain_pruning_interval;
1073  epee::math_helper::once_a_time_seconds<60*60*24*7, false> m_diff_recalc_interval;
1074 
1075  std::atomic<bool> m_starter_message_showed;
1076 
1078 
1080 
1081  std::atomic<bool> m_update_available;
1082 
1083  std::string m_checkpoints_path;
1086 
1087  std::atomic_flag m_checkpoints_updating;
1089 
1091 
1092  time_t start_time;
1093 
1094  std::unordered_set<crypto::hash> bad_semantics_txes[2];
1096 
1097  enum {
1102  } check_updates_level;
1103 
1106  boost::mutex m_update_mutex;
1107 
1110 
1111  /* `boost::function` is used because the implementation never allocates if
1112  the callable object has a single `std::shared_ptr` or `std::weap_ptr`
1113  internally. Whereas, the libstdc++ `std::function` will allocate. */
1114 
1115  std::shared_ptr<tools::Notify> m_block_rate_notify;
1116  boost::function<void(std::vector<txpool_event>)> m_zmq_pub;
1117  };
1118 }
1119 
1120 POP_WARNINGS
cryptonote::core::get_miner
const miner & get_miner() const
gets the miner instance (const)
Definition: cryptonote_core.h:256
cryptonote::arg_testnet_on
const command_line::arg_descriptor< bool, false > arg_testnet_on
Definition: cryptonote_core.cpp:74
i_core_events.h
cryptonote::Blockchain
Definition: blockchain.h:96
download.h
cryptonote::cryptonote_protocol_stub
Definition: cryptonote_protocol_handler_common.h:52
cryptonote::arg_block_download_max_size
const command_line::arg_descriptor< size_t > arg_block_download_max_size
Definition: cryptonote_core.cpp:120
cryptonote::cryptonote_connection_context
Definition: connection_context.h:43
cryptonote::arg_regtest_on
const command_line::arg_descriptor< bool > arg_regtest_on
Definition: cryptonote_core.cpp:84
fwd.h
tools::download_async_handle
std::shared_ptr< download_thread_control > download_async_handle
Definition: download.h:35
cryptonote::tx_blob_entry
Definition: cryptonote_protocol_defs.h:122
base
Definition: base.py:1
cryptonote::relay_method
relay_method
Methods tracking how a tx was received and relayed.
Definition: enums.h:37
cryptonote::core::m_last_dns_checkpoints_update
time_t m_last_dns_checkpoints_update
time when dns checkpoints were last updated
Definition: cryptonote_core.h:1084
cryptonote::checkpoints
A container for blockchain checkpoints.
Definition: checkpoints.h:53
cryptonote::core::m_fluffy_blocks_enabled
bool m_fluffy_blocks_enabled
Definition: cryptonote_core.h:1108
cryptonote::core::UPDATES_UPDATE
@ UPDATES_UPDATE
Definition: cryptonote_core.h:1101
cryptonote::core::tx_verification_batch_info::tx_hash
crypto::hash tx_hash
Definition: cryptonote_core.h:964
cryptonote::core::get_nettype
network_type get_nettype() const
get the network type we're on
Definition: cryptonote_core.h:777
cryptonote::NOTIFY_REQUEST_GET_OBJECTS::request
epee::misc_utils::struct_init< request_t > request
Definition: cryptonote_protocol_defs.h:227
cryptonote::i_core_events
Definition: i_core_events.h:38
connection_context.h
cryptonote::i_miner_handler
Definition: miner.h:48
daemonizer::init_options
void init_options(boost::program_options::options_description &hidden_options, boost::program_options::options_description &normal_options)
Definition: posix_daemonizer.inl:56
cryptonote::network_type
network_type
Definition: cryptonote_config.h:268
command_line.h
cryptonote::difficulty_type
boost::multiprecision::uint128_t difficulty_type
Definition: difficulty.h:41
cryptonote::block_verification_context
Definition: verification_context.h:59
cryptonote::core::m_check_updates_interval
epee::math_helper::once_a_time_seconds< 60 *60 *12, true > m_check_updates_interval
interval for checking for new versions
Definition: cryptonote_core.h:1069
cryptonote::core::UPDATES_DISABLED
@ UPDATES_DISABLED
Definition: cryptonote_core.h:1098
cryptonote::core::m_last_json_checkpoints_update
time_t m_last_json_checkpoints_update
time when json checkpoints were last updated
Definition: cryptonote_core.h:1085
cryptonote::tx_info
Definition: core_rpc_server_commands_defs.h:1336
cryptonote::core::m_checkpoints_updating
std::atomic_flag m_checkpoints_updating
set if checkpoints are currently updating to avoid multiple threads attempting to update at once
Definition: cryptonote_core.h:1087
cryptonote::core::m_blockchain_pruning_interval
epee::math_helper::once_a_time_seconds< 60 *60 *5, true > m_blockchain_pruning_interval
interval for incremental blockchain pruning
Definition: cryptonote_core.h:1072
cryptonote::core::m_blockchain_storage
Blockchain m_blockchain_storage
Blockchain instance.
Definition: cryptonote_core.h:1053
cryptonote::GetCheckpointsCallback
std::function< const epee::span< const unsigned char >cryptonote::network_type network)> GetCheckpointsCallback
Callback routine that returns checkpoints data for specific network type.
Definition: blockchain.h:90
cryptonote::relay_category
relay_category
Definition: blockchain_db.h:110
cryptonote::arg_data_dir
const command_line::arg_descriptor< std::string, false, true, 2 > arg_data_dir
Definition: cryptonote_core.cpp:99
DISABLE_VS_WARNINGS
DISABLE_VS_WARNINGS(4244 4345 4503) using namespace crypto
init
static void init(std::string cache_filename)
Definition: blockchain_blackball.cpp:221
cryptonote::core::start_time
time_t start_time
Definition: cryptonote_core.h:1092
cryptonote::core::get_blockchain_storage
const Blockchain & get_blockchain_storage() const
gets the Blockchain instance (const)
Definition: cryptonote_core.h:631
cryptonote::core::m_block_rate_interval
epee::math_helper::once_a_time_seconds< 90, false > m_block_rate_interval
interval for checking block rate
Definition: cryptonote_core.h:1071
cryptonote::arg_sync_pruned_blocks
const command_line::arg_descriptor< bool > arg_sync_pruned_blocks
Definition: cryptonote_core.cpp:125
cryptonote::core
handles core cryptonote functionality
Definition: cryptonote_core.h:86
cryptonote_protocol_handler_common.h
base.b
int b
Definition: base.py:1
lmdb::stream::count
mdb_size_t count(MDB_cursor *cur)
Definition: value_stream.cpp:39
cryptonote::core::m_update_mutex
boost::mutex m_update_mutex
Definition: cryptonote_core.h:1106
cryptonote::core::m_check_disk_space_interval
epee::math_helper::once_a_time_seconds< 60 *10, true > m_check_disk_space_interval
interval for checking for disk space
Definition: cryptonote_core.h:1070
cryptonote::core::disable_dns_checkpoints
void disable_dns_checkpoints(bool disable=true)
set whether or not to enable or disable DNS checkpoints
Definition: cryptonote_core.h:463
cryptonote::COMMAND_RPC_GET_OUTPUTS_BIN::request
epee::misc_utils::struct_init< request_t > request
Definition: core_rpc_server_commands_defs.h:487
cryptonote::core::m_incoming_tx_lock
epee::critical_section m_incoming_tx_lock
incoming transaction lock
Definition: cryptonote_core.h:1057
miner.h
cryptonote::core::get_miner
miner & get_miner()
gets the miner instance
Definition: cryptonote_core.h:249
blocks
Definition: blocks.cpp:13
tx_pool.h
cryptonote::core::UPDATES_NOTIFY
@ UPDATES_NOTIFY
Definition: cryptonote_core.h:1099
cryptonote::core::m_update_available
std::atomic< bool > m_update_available
Definition: cryptonote_core.h:1081
cryptonote::tx_verification_context
Definition: verification_context.h:41
cryptonote::block
Definition: cryptonote_basic.h:464
cryptonote::core::UPDATES_DOWNLOAD
@ UPDATES_DOWNLOAD
Definition: cryptonote_core.h:1100
net::socks::version
version
Supported socks variants.
Definition: socks.h:58
cryptonote::core::m_offline
bool m_offline
Definition: cryptonote_core.h:1109
net::zmq::context
std::unique_ptr< void, terminate > context
Unique ZMQ context handle, calls zmq_term on destruction.
Definition: zmq.h:105
cryptonote::NOTIFY_RESPONSE_CHAIN_ENTRY::request
epee::misc_utils::struct_init< request_t > request
Definition: cryptonote_protocol_defs.h:314
cryptonote
Holds cryptonote related classes and helpers.
Definition: blockchain_db.cpp:45
cryptonote::core::m_starter_message_showed
std::atomic< bool > m_starter_message_showed
has the "daemon will sync now" message been shown?
Definition: cryptonote_core.h:1075
cryptonote::core::m_store_blockchain_interval
epee::math_helper::once_a_time_seconds< 60 *60 *12, false > m_store_blockchain_interval
interval for manual storing of Blockchain, if enabled
Definition: cryptonote_core.h:1066
cryptonote::core::m_last_update_length
size_t m_last_update_length
Definition: cryptonote_core.h:1105
cryptonote::core::m_disable_dns_checkpoints
bool m_disable_dns_checkpoints
Definition: cryptonote_core.h:1088
tools::check_updates
bool check_updates(const std::string &software, const std::string &buildtag, std::string &version, std::string &hash)
Definition: updates.cpp:40
cryptonote::rpc::key_images_with_tx_hashes
std::unordered_map< crypto::key_image, std::vector< crypto::hash > > key_images_with_tx_hashes
Definition: message_data_structs.h:107
cryptonote::core::m_nettype
network_type m_nettype
which network are we on?
Definition: cryptonote_core.h:1079
cryptonote::core::m_miner
miner m_miner
miner instance
Definition: cryptonote_core.h:1060
cryptonote::core::m_fork_moaner
epee::math_helper::once_a_time_seconds< 60 *60 *2, true > m_fork_moaner
interval for checking HardFork status
Definition: cryptonote_core.h:1067
cryptonote::core::m_block_rate_notify
std::shared_ptr< tools::Notify > m_block_rate_notify
Definition: cryptonote_core.h:1115
cryptonote::core::m_update_download
tools::download_async_handle m_update_download
Definition: cryptonote_core.h:1104
cryptonote::core::m_mempool
tx_memory_pool m_mempool
transaction pool instance
Definition: cryptonote_core.h:1052
cryptonote::blobdata
std::string blobdata
Definition: blobdatatype.h:39
cryptonote::arg_offline
const command_line::arg_descriptor< bool > arg_offline
Definition: cryptonote_core.cpp:112
cryptonote::core::m_protocol_stub
cryptonote_protocol_stub m_protocol_stub
cryptonote protocol stub instance
Definition: cryptonote_core.h:1064
cryptonote::core::m_txpool_auto_relayer
epee::math_helper::once_a_time_seconds< 60 *2, false > m_txpool_auto_relayer
interval for checking re-relaying txpool transactions
Definition: cryptonote_core.h:1068
cryptonote::core::tx_verification_batch_info
Definition: cryptonote_core.h:964
cryptonote::core::get_protocol
i_cryptonote_protocol * get_protocol()
get the cryptonote protocol instance
Definition: cryptonote_core.h:211
enums.h
cryptonote::txpool_stats
Definition: core_rpc_server_commands_defs.h:1494
cryptonote::account_public_address
Definition: cryptonote_basic.h:501
cryptonote::core::get_blocks
bool get_blocks(const t_ids_container &block_ids, t_blocks_container &blocks, t_missed_container &missed_bs) const
gets blocks based on a list of block hashes
Definition: cryptonote_core.h:369
cryptonote::core::m_checkpoints_path
std::string m_checkpoints_path
path to json checkpoints file
Definition: cryptonote_core.h:1083
cryptonote::test_options::long_term_block_weight_window
const size_t long_term_block_weight_window
Definition: cryptonote_core.h:62
cryptonote::core::m_zmq_pub
boost::function< void(std::vector< txpool_event >)> m_zmq_pub
Definition: cryptonote_core.h:1116
cryptonote::core::fluffy_blocks_enabled
bool fluffy_blocks_enabled() const
get whether fluffy blocks are enabled
Definition: cryptonote_core.h:794
cryptonote::tx_memory_pool
Transaction pool, handles transactions which are not part of a block.
Definition: tx_pool.h:97
hash.h
cryptonote::core::is_update_available
bool is_update_available() const
check whether an update is known to be available or not
Definition: cryptonote_core.h:787
cryptonote::transaction
Definition: cryptonote_basic.h:194
cryptonote::core::bad_semantics_txes_lock
boost::mutex bad_semantics_txes_lock
Definition: cryptonote_core.h:1095
cryptonote::test_options::hard_forks
const std::pair< uint8_t, uint64_t > * hard_forks
Definition: cryptonote_core.h:61
cryptonote::core::block_sync_size
size_t block_sync_size
Definition: cryptonote_core.h:1090
cryptonote::i_cryptonote_protocol
Definition: cryptonote_protocol_handler_common.h:42
cryptonote::core::m_target_blockchain_height
uint64_t m_target_blockchain_height
blockchain height target
Definition: cryptonote_core.h:1077
cryptonote::core::handle_incoming_txs
bool handle_incoming_txs(const std::vector< tx_blob_entry > &tx_blobs, std::vector< tx_verification_context > &tvc, relay_method tx_relay, bool relayed)
handles a list of incoming transactions
Definition: cryptonote_core.h:160
blockchain.h
cryptonote::core::get_blockchain_storage
Blockchain & get_blockchain_storage()
gets the Blockchain instance
Definition: cryptonote_core.h:624
cryptonote::NOTIFY_RESPONSE_GET_OBJECTS::request
epee::misc_utils::struct_init< request_t > request
Definition: cryptonote_protocol_defs.h:246
cryptonote::core::m_config_folder
std::string m_config_folder
folder to look in for configs and other files
Definition: cryptonote_core.h:1062
crypto::key_image
POD_CLASS key_image
Definition: crypto.h:87
PUSH_WARNINGS
PUSH_WARNINGS
Definition: hash-ops.h:53
cryptonote::core::m_diff_recalc_interval
epee::math_helper::once_a_time_seconds< 60 *60 *24 *7, false > m_diff_recalc_interval
interval for recalculating difficulties
Definition: cryptonote_core.h:1073
cryptonote::core::offline
bool offline() const
get whether the core is running offline
Definition: cryptonote_core.h:815
fwd.h
cryptonote::arg_stagenet_on
const command_line::arg_descriptor< bool, false > arg_stagenet_on
Definition: cryptonote_core.cpp:79
cryptonote::core::m_pprotocol
i_cryptonote_protocol * m_pprotocol
cryptonote protocol instance
Definition: cryptonote_core.h:1055
cryptonote::miner
Definition: miner.h:61
command_line::arg_descriptor< std::string, false, true, 2 >
cryptonote::COMMAND_RPC_GET_OUTPUTS_BIN::response
epee::misc_utils::struct_init< response_t > response
Definition: core_rpc_server_commands_defs.h:515
cryptonote::arg_fixed_difficulty
const command_line::arg_descriptor< difficulty_type > arg_fixed_difficulty
Definition: cryptonote_core.cpp:94
cryptonote::test_options
Definition: cryptonote_core.h:60
crypto::hash
POD_CLASS hash
Definition: hash.h:48