BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface software
Classes | Public Member Functions | Public Attributes | List of all members
graphene::net::detail::node_impl Class Reference

#include <node_impl.hxx>

Inheritance diagram for graphene::net::detail::node_impl:
graphene::net::peer_connection_delegate

Classes

struct  item_id_index
 

Public Member Functions

 node_impl (const std::string &user_agent)
 
virtual ~node_impl ()
 
void save_node_configuration ()
 
void p2p_network_connect_loop ()
 
void trigger_p2p_network_connect_loop ()
 
bool have_already_received_sync_item (const item_hash_t &item_hash)
 
void request_sync_item_from_peer (const peer_connection_ptr &peer, const item_hash_t &item_to_request)
 
void request_sync_items_from_peer (const peer_connection_ptr &peer, const std::vector< item_hash_t > &items_to_request)
 
void fetch_sync_items_loop ()
 
void trigger_fetch_sync_items_loop ()
 
bool is_item_in_any_peers_inventory (const item_id &item) const
 
void fetch_items_loop ()
 
void trigger_fetch_items_loop ()
 
void advertise_inventory_loop ()
 
void trigger_advertise_inventory_loop ()
 
void terminate_inactive_connections_loop ()
 
void fetch_updated_peer_lists_loop ()
 
void update_bandwidth_data (uint32_t bytes_read_this_second, uint32_t bytes_written_this_second)
 
void bandwidth_monitor_loop ()
 
void dump_node_status_task ()
 
bool is_accepting_new_connections ()
 
bool is_wanting_new_connections ()
 
uint32_t get_number_of_connections ()
 
peer_connection_ptr get_peer_by_node_id (const node_id_t &id)
 
bool is_already_connected_to_id (const node_id_t &node_id)
 
bool merge_address_info_with_potential_peer_database (const std::vector< address_info > addresses)
 
void display_current_connections ()
 
uint32_t calculate_unsynced_block_count_from_all_peers ()
 
std::vector< item_hash_tcreate_blockchain_synopsis_for_peer (const peer_connection *peer)
 
void fetch_next_batch_of_item_ids_from_peer (peer_connection *peer, bool reset_fork_tracking_data_for_peer=false)
 
fc::variant_object generate_hello_user_data ()
 
void parse_hello_user_data_for_peer (peer_connection *originating_peer, const fc::variant_object &user_data)
 
void on_message (peer_connection *originating_peer, const message &received_message) override
 
void on_hello_message (peer_connection *originating_peer, const hello_message &hello_message_received)
 
void on_connection_accepted_message (peer_connection *originating_peer, const connection_accepted_message &connection_accepted_message_received)
 
void on_connection_rejected_message (peer_connection *originating_peer, const connection_rejected_message &connection_rejected_message_received)
 
void on_address_request_message (peer_connection *originating_peer, const address_request_message &address_request_message_received)
 
void on_address_message (peer_connection *originating_peer, const address_message &address_message_received)
 
void on_fetch_blockchain_item_ids_message (peer_connection *originating_peer, const fetch_blockchain_item_ids_message &fetch_blockchain_item_ids_message_received)
 
void on_blockchain_item_ids_inventory_message (peer_connection *originating_peer, const blockchain_item_ids_inventory_message &blockchain_item_ids_inventory_message_received)
 
void on_fetch_items_message (peer_connection *originating_peer, const fetch_items_message &fetch_items_message_received)
 
void on_item_not_available_message (peer_connection *originating_peer, const item_not_available_message &item_not_available_message_received)
 
void on_item_ids_inventory_message (peer_connection *originating_peer, const item_ids_inventory_message &item_ids_inventory_message_received)
 
void on_closing_connection_message (peer_connection *originating_peer, const closing_connection_message &closing_connection_message_received)
 
void on_current_time_request_message (peer_connection *originating_peer, const current_time_request_message &current_time_request_message_received)
 
void on_current_time_reply_message (peer_connection *originating_peer, const current_time_reply_message &current_time_reply_message_received)
 
void forward_firewall_check_to_next_available_peer (firewall_check_state_data *firewall_check_state)
 
void on_check_firewall_message (peer_connection *originating_peer, const check_firewall_message &check_firewall_message_received)
 
void on_check_firewall_reply_message (peer_connection *originating_peer, const check_firewall_reply_message &check_firewall_reply_message_received)
 
void on_get_current_connections_request_message (peer_connection *originating_peer, const get_current_connections_request_message &get_current_connections_request_message_received)
 
void on_get_current_connections_reply_message (peer_connection *originating_peer, const get_current_connections_reply_message &get_current_connections_reply_message_received)
 
void on_connection_closed (peer_connection *originating_peer) override
 
void send_sync_block_to_node_delegate (const graphene::net::block_message &block_message_to_send)
 
void process_backlog_of_sync_blocks ()
 
void trigger_process_backlog_of_sync_blocks ()
 
void process_block_during_sync (peer_connection *originating_peer, const graphene::net::block_message &block_message, const message_hash_type &message_hash)
 
void process_block_during_normal_operation (peer_connection *originating_peer, const graphene::net::block_message &block_message, const message_hash_type &message_hash)
 
void process_block_message (peer_connection *originating_peer, const message &message_to_process, const message_hash_type &message_hash)
 
void process_ordinary_message (peer_connection *originating_peer, const message &message_to_process, const message_hash_type &message_hash)
 
void start_synchronizing ()
 
void start_synchronizing_with_peer (const peer_connection_ptr &peer)
 
void new_peer_just_added (const peer_connection_ptr &peer)
 
void close ()
 called after a peer finishes handshaking, kicks off syncing More...
 
void accept_connection_task (peer_connection_ptr new_peer)
 
void accept_loop ()
 
void send_hello_message (const peer_connection_ptr &peer)
 
void connect_to_task (peer_connection_ptr new_peer, const fc::ip::endpoint &remote_endpoint)
 
bool is_connection_to_endpoint_in_progress (const fc::ip::endpoint &remote_endpoint)
 
void move_peer_to_active_list (const peer_connection_ptr &peer)
 
void move_peer_to_closing_list (const peer_connection_ptr &peer)
 
void move_peer_to_terminating_list (const peer_connection_ptr &peer)
 
peer_connection_ptr get_connection_to_endpoint (const fc::ip::endpoint &remote_endpoint)
 
void dump_node_status ()
 
void delayed_peer_deletion_task ()
 
void schedule_peer_for_deletion (const peer_connection_ptr &peer_to_delete)
 
void disconnect_from_peer (peer_connection *originating_peer, const std::string &reason_for_disconnect, bool caused_by_error=false, const fc::oexception &additional_data=fc::oexception())
 
void set_node_delegate (node_delegate *del, fc::thread *thread_for_delegate_calls)
 
void load_configuration (const fc::path &configuration_directory)
 
void listen_to_p2p_network ()
 
void connect_to_p2p_network ()
 
void add_node (const fc::ip::endpoint &ep)
 
void add_seed_node (const std::string &seed_string)
 
void resolve_seed_node_and_add (const std::string &seed_string)
 
void initiate_connect_to (const peer_connection_ptr &peer)
 
void connect_to_endpoint (const fc::ip::endpoint &ep)
 
void listen_on_endpoint (const fc::ip::endpoint &ep, bool wait_if_not_available)
 
void accept_incoming_connections (bool accept)
 
void listen_on_port (uint16_t port, bool wait_if_not_available)
 
fc::ip::endpoint get_actual_listening_endpoint () const
 
std::vector< peer_statusget_connected_peers () const
 
uint32_t get_connection_count () const
 
void broadcast (const message &item_to_broadcast, const message_propagation_data &propagation_data)
 
void broadcast (const message &item_to_broadcast)
 
void sync_from (const item_id &current_head_block, const std::vector< uint32_t > &hard_fork_block_numbers)
 
bool is_connected () const
 
std::vector< potential_peer_recordget_potential_peers () const
 
void set_advanced_node_parameters (const fc::variant_object &params)
 
fc::variant_object get_advanced_node_parameters ()
 
message_propagation_data get_transaction_propagation_data (const graphene::net::transaction_id_type &transaction_id)
 
message_propagation_data get_block_propagation_data (const graphene::net::block_id_type &block_id)
 
node_id_t get_node_id () const
 
void set_allowed_peers (const std::vector< node_id_t > &allowed_peers)
 
void clear_peer_database ()
 
void set_total_bandwidth_limit (uint32_t upload_bytes_per_second, uint32_t download_bytes_per_second)
 
void disable_peer_advertising ()
 
fc::variant_object get_call_statistics () const
 
message get_message_for_item (const item_id &item) override
 
fc::variant_object network_get_info () const
 
fc::variant_object network_get_usage_stats () const
 
bool is_hard_fork_block (uint32_t block_number) const
 
uint32_t get_next_known_hard_fork_block_number (uint32_t block_number) const
 
- Public Member Functions inherited from graphene::net::peer_connection_delegate
virtual ~peer_connection_delegate ()=default
 

Public Attributes

std::unique_ptr< statistics_gathering_node_delegate_wrapper_delegate
 
fc::sha256 _chain_id
 
fc::path _node_configuration_directory
 
node_configuration _node_configuration
 
fc::ip::endpoint _actual_listening_endpoint
 stores the endpoint we're listening on. This will be the same as More...
 
firewalled_state _is_firewalled
 we determine whether we're firewalled by asking other nodes. Store the result here: More...
 
fc::optional< fc::ip::endpoint_publicly_visible_listening_endpoint
 if we're behind NAT, our listening endpoint address will appear different to the rest of the world. store it here. More...
 
fc::time_point _last_firewall_check_message_sent
 
fc::future< void > _process_backlog_of_sync_blocks_done
 list of sync blocks we've received, but can't yet process because we are still missing blocks that come earlier in the chain More...
 
bool _suspend_fetching_sync_blocks
 
fc::future< void > _terminate_inactive_connections_loop_done
 list of items we have received but not yet advertised to our peers More...
 
uint8_t _recent_block_interval_in_seconds
 
std::string _user_agent_string
 
node_id_t _node_public_key
 
node_id_t _node_id
 
uint32_t _desired_number_of_connections
 
uint32_t _maximum_number_of_connections
 
uint32_t _peer_connection_retry_timeout
 
uint32_t _peer_inactivity_timeout
 
fc::tcp_server _tcp_server
 
fc::future< void > _accept_loop_complete
 
concurrent_unordered_set< graphene::net::peer_connection_ptr_handshaking_connections
 
concurrent_unordered_set< graphene::net::peer_connection_ptr_active_connections
 
concurrent_unordered_set< graphene::net::peer_connection_ptr_closing_connections
 
concurrent_unordered_set< graphene::net::peer_connection_ptr_terminating_connections
 
boost::circular_buffer< item_hash_t_most_recent_blocks_accepted
 
uint32_t _sync_item_type
 
uint32_t _total_number_of_unfetched_items
 
std::vector< uint32_t > _hard_fork_block_numbers
 the number of items we still need to fetch while syncing More...
 
blockchain_tied_message_cache _message_cache
 list of all block numbers where there are hard forks More...
 
fc::rate_limiting_group _rate_limiter
 cache message we have received and might be required to provide to other peers via inventory requests More...
 
uint32_t _last_reported_number_of_connections
 
bool _peer_advertising_disabled
 
fc::future< void > _fetch_updated_peer_lists_loop_done
 
boost::circular_buffer< uint32_t > _average_network_read_speed_seconds
 
boost::circular_buffer< uint32_t > _average_network_write_speed_seconds
 
boost::circular_buffer< uint32_t > _average_network_read_speed_minutes
 
boost::circular_buffer< uint32_t > _average_network_write_speed_minutes
 
boost::circular_buffer< uint32_t > _average_network_read_speed_hours
 
boost::circular_buffer< uint32_t > _average_network_write_speed_hours
 
unsigned _average_network_usage_second_counter
 
unsigned _average_network_usage_minute_counter
 
fc::time_point_sec _bandwidth_monitor_last_update_time
 
fc::future< void > _bandwidth_monitor_loop_done
 
fc::future< void > _dump_node_status_task_done
 
std::list< peer_connection_ptr_peers_to_delete
 
fc::future< void > _delayed_peer_deletion_task_done
 
bool _node_is_shutting_down
 
unsigned _maximum_number_of_blocks_to_handle_at_one_time
 
unsigned _maximum_number_of_sync_blocks_to_prefetch
 
unsigned _maximum_blocks_per_peer_during_syncing
 
std::list< fc::future< void > > _handle_message_calls_in_progress
 
std::list< potential_peer_record_add_once_node_list
 used by the task that manages connecting to peers More...
 
peer_database _potential_peer_db
 list of peers we want to connect to as soon as possible More...
 
fc::promise< void >::ptr _retrigger_connect_loop_promise
 
bool _potential_peer_database_updated
 
fc::future< void > _p2p_network_connect_loop_done
 
fc::promise< void >::ptr _retrigger_advertise_inventory_loop_promise
 list of transactions we've recently pushed and had rejected by the delegate More...
 
fc::future< void > _advertise_inventory_loop_done
 
std::unordered_set< item_id_new_inventory
 
typedef std::unordered_map< graphene::net::block_id_type, fc::time_pointactive_sync_requests_map
 
fc::promise< void >::ptr _retrigger_fetch_sync_items_loop_promise
 used by the task that fetches sync items during synchronization More...
 
bool _sync_items_to_fetch_updated
 
fc::future< void > _fetch_sync_items_loop_done
 
active_sync_requests_map _active_sync_requests
 
std::list< graphene::net::block_message_new_received_sync_items
 list of sync blocks we've asked for from peers but have not yet received More...
 
std::list< graphene::net::block_message_received_sync_items
 list of sync blocks we've just received but haven't yet tried to process More...
 
typedef boost::multi_index_container< prioritized_item_id, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::identity< prioritized_item_id > >, boost::multi_index::hashed_unique< boost::multi_index::tag< item_id_index >, boost::multi_index::member< prioritized_item_id, item_id,&prioritized_item_id::item >, std::hash< item_id > > > > items_to_fetch_set_type
 
fc::promise< void >::ptr _retrigger_fetch_item_loop_promise
 used by the task that fetches items during normal operation More...
 
bool _items_to_fetch_updated
 
fc::future< void > _fetch_item_loop_done
 
unsigned _items_to_fetch_sequence_counter
 
items_to_fetch_set_type _items_to_fetch
 
peer_connection::timestamped_items_set_type _recently_failed_items
 list of items we know another peer has and we want More...
 
boost::container::flat_set< std::string > _seed_nodes
 used by the task that checks whether addresses of seed nodes have been updated More...
 
fc::future< void > _update_seed_nodes_loop_done
 
void update_seed_nodes_task ()
 
void schedule_next_update_seed_nodes_task ()
 

Detailed Description

Definition at line 268 of file node_impl.hxx.

Member Typedef Documentation

typedef std::unordered_map<graphene::net::block_id_type, fc::time_point> graphene::net::detail::node_impl::active_sync_requests_map

Definition at line 309 of file node_impl.hxx.

typedef boost::multi_index_container<prioritized_item_id, boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::identity<prioritized_item_id> >, boost::multi_index::hashed_unique<boost::multi_index::tag<item_id_index>, boost::multi_index::member<prioritized_item_id, item_id, &prioritized_item_id::item>, std::hash<item_id> > > > graphene::net::detail::node_impl::items_to_fetch_set_type

Definition at line 331 of file node_impl.hxx.

Constructor & Destructor Documentation

graphene::net::detail::node_impl::node_impl ( const std::string &  user_agent)

Definition at line 290 of file node.cpp.

graphene::net::detail::node_impl::~node_impl ( )
virtual

Definition at line 329 of file node.cpp.

Member Function Documentation

void graphene::net::detail::node_impl::accept_connection_task ( peer_connection_ptr  new_peer)

Definition at line 3933 of file node.cpp.

void graphene::net::detail::node_impl::accept_incoming_connections ( bool  accept)

Definition at line 4571 of file node.cpp.

void graphene::net::detail::node_impl::accept_loop ( )

Definition at line 3940 of file node.cpp.

void graphene::net::detail::node_impl::add_node ( const fc::ip::endpoint ep)

Definition at line 4329 of file node.cpp.

void graphene::net::detail::node_impl::add_seed_node ( const std::string &  seed_string)

Definition at line 4344 of file node.cpp.

void graphene::net::detail::node_impl::advertise_inventory_loop ( )

Definition at line 775 of file node.cpp.

void graphene::net::detail::node_impl::bandwidth_monitor_loop ( )

Definition at line 1142 of file node.cpp.

void graphene::net::detail::node_impl::broadcast ( const message item_to_broadcast,
const message_propagation_data propagation_data 
)

Definition at line 4668 of file node.cpp.

void graphene::net::detail::node_impl::broadcast ( const message item_to_broadcast)

Definition at line 4691 of file node.cpp.

uint32_t graphene::net::detail::node_impl::calculate_unsynced_block_count_from_all_peers ( )

Definition at line 1948 of file node.cpp.

void graphene::net::detail::node_impl::clear_peer_database ( )

Definition at line 4796 of file node.cpp.

void graphene::net::detail::node_impl::close ( )

called after a peer finishes handshaking, kicks off syncing

Definition at line 3616 of file node.cpp.

void graphene::net::detail::node_impl::connect_to_endpoint ( const fc::ip::endpoint ep)

Definition at line 4392 of file node.cpp.

void graphene::net::detail::node_impl::connect_to_p2p_network ( )

Definition at line 4301 of file node.cpp.

void graphene::net::detail::node_impl::connect_to_task ( peer_connection_ptr  new_peer,
const fc::ip::endpoint remote_endpoint 
)

Definition at line 4014 of file node.cpp.

std::vector< item_hash_t > graphene::net::detail::node_impl::create_blockchain_synopsis_for_peer ( const peer_connection peer)

Definition at line 1966 of file node.cpp.

void graphene::net::detail::node_impl::delayed_peer_deletion_task ( )

Definition at line 1175 of file node.cpp.

void graphene::net::detail::node_impl::disable_peer_advertising ( )

Definition at line 4809 of file node.cpp.

void graphene::net::detail::node_impl::disconnect_from_peer ( peer_connection originating_peer,
const std::string &  reason_for_disconnect,
bool  caused_by_error = false,
const fc::oexception additional_data = fc::oexception() 
)

Definition at line 4511 of file node.cpp.

void graphene::net::detail::node_impl::display_current_connections ( )

Definition at line 1322 of file node.cpp.

void graphene::net::detail::node_impl::dump_node_status ( )

Definition at line 4462 of file node.cpp.

void graphene::net::detail::node_impl::dump_node_status_task ( )

Definition at line 1165 of file node.cpp.

void graphene::net::detail::node_impl::fetch_items_loop ( )

Definition at line 645 of file node.cpp.

void graphene::net::detail::node_impl::fetch_next_batch_of_item_ids_from_peer ( peer_connection peer,
bool  reset_fork_tracking_data_for_peer = false 
)

Definition at line 2015 of file node.cpp.

void graphene::net::detail::node_impl::fetch_sync_items_loop ( )

Definition at line 561 of file node.cpp.

void graphene::net::detail::node_impl::fetch_updated_peer_lists_loop ( )

Definition at line 1080 of file node.cpp.

void graphene::net::detail::node_impl::forward_firewall_check_to_next_available_peer ( firewall_check_state_data firewall_check_state)

Definition at line 3258 of file node.cpp.

fc::variant_object graphene::net::detail::node_impl::generate_hello_user_data ( )

Definition at line 1429 of file node.cpp.

fc::ip::endpoint graphene::net::detail::node_impl::get_actual_listening_endpoint ( ) const

Definition at line 4586 of file node.cpp.

fc::variant_object graphene::net::detail::node_impl::get_advanced_node_parameters ( )

Definition at line 4748 of file node.cpp.

message_propagation_data graphene::net::detail::node_impl::get_block_propagation_data ( const graphene::net::block_id_type &  block_id)

Definition at line 4767 of file node.cpp.

fc::variant_object graphene::net::detail::node_impl::get_call_statistics ( ) const

Definition at line 4815 of file node.cpp.

std::vector< peer_status > graphene::net::detail::node_impl::get_connected_peers ( ) const

Definition at line 4592 of file node.cpp.

uint32_t graphene::net::detail::node_impl::get_connection_count ( ) const

Definition at line 4662 of file node.cpp.

peer_connection_ptr graphene::net::detail::node_impl::get_connection_to_endpoint ( const fc::ip::endpoint remote_endpoint)

Definition at line 4405 of file node.cpp.

message graphene::net::detail::node_impl::get_message_for_item ( const item_id item)
overridevirtual

Implements graphene::net::peer_connection_delegate.

Definition at line 2339 of file node.cpp.

uint32_t graphene::net::detail::node_impl::get_next_known_hard_fork_block_number ( uint32_t  block_number) const

Definition at line 4866 of file node.cpp.

node_id_t graphene::net::detail::node_impl::get_node_id ( ) const

Definition at line 4773 of file node.cpp.

uint32_t graphene::net::detail::node_impl::get_number_of_connections ( )

Definition at line 1249 of file node.cpp.

peer_connection_ptr graphene::net::detail::node_impl::get_peer_by_node_id ( const node_id_t id)

Definition at line 1255 of file node.cpp.

std::vector< potential_peer_record > graphene::net::detail::node_impl::get_potential_peers ( ) const

Definition at line 4714 of file node.cpp.

message_propagation_data graphene::net::detail::node_impl::get_transaction_propagation_data ( const graphene::net::transaction_id_type &  transaction_id)

Definition at line 4761 of file node.cpp.

bool graphene::net::detail::node_impl::have_already_received_sync_item ( const item_hash_t item_hash)

Definition at line 527 of file node.cpp.

void graphene::net::detail::node_impl::initiate_connect_to ( const peer_connection_ptr peer)

Definition at line 4371 of file node.cpp.

bool graphene::net::detail::node_impl::is_accepting_new_connections ( )

Definition at line 1237 of file node.cpp.

bool graphene::net::detail::node_impl::is_already_connected_to_id ( const node_id_t node_id)

Definition at line 1272 of file node.cpp.

bool graphene::net::detail::node_impl::is_connected ( ) const

Definition at line 4708 of file node.cpp.

bool graphene::net::detail::node_impl::is_connection_to_endpoint_in_progress ( const fc::ip::endpoint remote_endpoint)

Definition at line 4429 of file node.cpp.

bool graphene::net::detail::node_impl::is_hard_fork_block ( uint32_t  block_number) const

Definition at line 4862 of file node.cpp.

bool graphene::net::detail::node_impl::is_item_in_any_peers_inventory ( const item_id item) const

Definition at line 634 of file node.cpp.

bool graphene::net::detail::node_impl::is_wanting_new_connections ( )

Definition at line 1243 of file node.cpp.

void graphene::net::detail::node_impl::listen_on_endpoint ( const fc::ip::endpoint ep,
bool  wait_if_not_available 
)

Definition at line 4563 of file node.cpp.

void graphene::net::detail::node_impl::listen_on_port ( uint16_t  port,
bool  wait_if_not_available 
)

Definition at line 4578 of file node.cpp.

void graphene::net::detail::node_impl::listen_to_p2p_network ( )

Definition at line 4206 of file node.cpp.

void graphene::net::detail::node_impl::load_configuration ( const fc::path configuration_directory)

Definition at line 4133 of file node.cpp.

bool graphene::net::detail::node_impl::merge_address_info_with_potential_peer_database ( const std::vector< address_info addresses)

Definition at line 1304 of file node.cpp.

void graphene::net::detail::node_impl::move_peer_to_active_list ( const peer_connection_ptr peer)

Definition at line 4435 of file node.cpp.

void graphene::net::detail::node_impl::move_peer_to_closing_list ( const peer_connection_ptr peer)

Definition at line 4444 of file node.cpp.

void graphene::net::detail::node_impl::move_peer_to_terminating_list ( const peer_connection_ptr peer)

Definition at line 4453 of file node.cpp.

fc::variant_object graphene::net::detail::node_impl::network_get_info ( ) const

Definition at line 4821 of file node.cpp.

fc::variant_object graphene::net::detail::node_impl::network_get_usage_stats ( ) const

Definition at line 4831 of file node.cpp.

void graphene::net::detail::node_impl::new_peer_just_added ( const peer_connection_ptr peer)

Definition at line 3603 of file node.cpp.

void graphene::net::detail::node_impl::on_address_message ( peer_connection originating_peer,
const address_message address_message_received 
)

Definition at line 1787 of file node.cpp.

void graphene::net::detail::node_impl::on_address_request_message ( peer_connection originating_peer,
const address_request_message address_request_message_received 
)

Definition at line 1757 of file node.cpp.

void graphene::net::detail::node_impl::on_blockchain_item_ids_inventory_message ( peer_connection originating_peer,
const blockchain_item_ids_inventory_message blockchain_item_ids_inventory_message_received 
)

Definition at line 2045 of file node.cpp.

void graphene::net::detail::node_impl::on_check_firewall_message ( peer_connection originating_peer,
const check_firewall_message check_firewall_message_received 
)

Definition at line 3297 of file node.cpp.

void graphene::net::detail::node_impl::on_check_firewall_reply_message ( peer_connection originating_peer,
const check_firewall_reply_message check_firewall_reply_message_received 
)

Definition at line 3350 of file node.cpp.

void graphene::net::detail::node_impl::on_closing_connection_message ( peer_connection originating_peer,
const closing_connection_message closing_connection_message_received 
)

Definition at line 2529 of file node.cpp.

void graphene::net::detail::node_impl::on_connection_accepted_message ( peer_connection originating_peer,
const connection_accepted_message connection_accepted_message_received 
)

Definition at line 1700 of file node.cpp.

void graphene::net::detail::node_impl::on_connection_closed ( peer_connection originating_peer)
overridevirtual

Implements graphene::net::peer_connection_delegate.

Definition at line 2563 of file node.cpp.

void graphene::net::detail::node_impl::on_connection_rejected_message ( peer_connection originating_peer,
const connection_rejected_message connection_rejected_message_received 
)

Definition at line 1721 of file node.cpp.

void graphene::net::detail::node_impl::on_current_time_reply_message ( peer_connection originating_peer,
const current_time_reply_message current_time_reply_message_received 
)

Definition at line 3247 of file node.cpp.

void graphene::net::detail::node_impl::on_current_time_request_message ( peer_connection originating_peer,
const current_time_request_message current_time_request_message_received 
)

Definition at line 3237 of file node.cpp.

void graphene::net::detail::node_impl::on_fetch_blockchain_item_ids_message ( peer_connection originating_peer,
const fetch_blockchain_item_ids_message fetch_blockchain_item_ids_message_received 
)

Definition at line 1833 of file node.cpp.

void graphene::net::detail::node_impl::on_fetch_items_message ( peer_connection originating_peer,
const fetch_items_message fetch_items_message_received 
)

Definition at line 2356 of file node.cpp.

void graphene::net::detail::node_impl::on_get_current_connections_reply_message ( peer_connection originating_peer,
const get_current_connections_reply_message get_current_connections_reply_message_received 
)

Definition at line 3491 of file node.cpp.

void graphene::net::detail::node_impl::on_get_current_connections_request_message ( peer_connection originating_peer,
const get_current_connections_request_message get_current_connections_request_message_received 
)

Definition at line 3429 of file node.cpp.

void graphene::net::detail::node_impl::on_hello_message ( peer_connection originating_peer,
const hello_message hello_message_received 
)

Definition at line 1486 of file node.cpp.

void graphene::net::detail::node_impl::on_item_ids_inventory_message ( peer_connection originating_peer,
const item_ids_inventory_message item_ids_inventory_message_received 
)

Definition at line 2458 of file node.cpp.

void graphene::net::detail::node_impl::on_item_not_available_message ( peer_connection originating_peer,
const item_not_available_message item_not_available_message_received 
)

Definition at line 2423 of file node.cpp.

void graphene::net::detail::node_impl::on_message ( peer_connection originating_peer,
const message received_message 
)
overridevirtual

Implements graphene::net::peer_connection_delegate.

Definition at line 1353 of file node.cpp.

void graphene::net::detail::node_impl::p2p_network_connect_loop ( )

Definition at line 387 of file node.cpp.

void graphene::net::detail::node_impl::parse_hello_user_data_for_peer ( peer_connection originating_peer,
const fc::variant_object user_data 
)

Definition at line 1464 of file node.cpp.

void graphene::net::detail::node_impl::process_backlog_of_sync_blocks ( )

Definition at line 2835 of file node.cpp.

void graphene::net::detail::node_impl::process_block_during_normal_operation ( peer_connection originating_peer,
const graphene::net::block_message block_message,
const message_hash_type message_hash 
)

Definition at line 2999 of file node.cpp.

void graphene::net::detail::node_impl::process_block_during_sync ( peer_connection originating_peer,
const graphene::net::block_message block_message,
const message_hash_type message_hash 
)

Definition at line 2987 of file node.cpp.

void graphene::net::detail::node_impl::process_block_message ( peer_connection originating_peer,
const message message_to_process,
const message_hash_type message_hash 
)

Definition at line 3157 of file node.cpp.

void graphene::net::detail::node_impl::process_ordinary_message ( peer_connection originating_peer,
const message message_to_process,
const message_hash_type message_hash 
)

Definition at line 3503 of file node.cpp.

void graphene::net::detail::node_impl::request_sync_item_from_peer ( const peer_connection_ptr peer,
const item_hash_t item_to_request 
)

Definition at line 536 of file node.cpp.

void graphene::net::detail::node_impl::request_sync_items_from_peer ( const peer_connection_ptr peer,
const std::vector< item_hash_t > &  items_to_request 
)

Definition at line 547 of file node.cpp.

void graphene::net::detail::node_impl::resolve_seed_node_and_add ( const std::string &  seed_string)

Definition at line 4351 of file node.cpp.

void graphene::net::detail::node_impl::save_node_configuration ( )

Definition at line 365 of file node.cpp.

void graphene::net::detail::node_impl::schedule_next_update_seed_nodes_task ( )

Definition at line 512 of file node.cpp.

void graphene::net::detail::node_impl::schedule_peer_for_deletion ( const peer_connection_ptr peer_to_delete)

Definition at line 1194 of file node.cpp.

void graphene::net::detail::node_impl::send_hello_message ( const peer_connection_ptr peer)

Definition at line 3971 of file node.cpp.

void graphene::net::detail::node_impl::send_sync_block_to_node_delegate ( const graphene::net::block_message block_message_to_send)

Definition at line 2651 of file node.cpp.

void graphene::net::detail::node_impl::set_advanced_node_parameters ( const fc::variant_object params)

Definition at line 4724 of file node.cpp.

void graphene::net::detail::node_impl::set_allowed_peers ( const std::vector< node_id_t > &  allowed_peers)

Definition at line 4778 of file node.cpp.

void graphene::net::detail::node_impl::set_node_delegate ( node_delegate del,
fc::thread thread_for_delegate_calls 
)

Definition at line 4123 of file node.cpp.

void graphene::net::detail::node_impl::set_total_bandwidth_limit ( uint32_t  upload_bytes_per_second,
uint32_t  download_bytes_per_second 
)

Definition at line 4802 of file node.cpp.

void graphene::net::detail::node_impl::start_synchronizing ( )

Definition at line 3596 of file node.cpp.

void graphene::net::detail::node_impl::start_synchronizing_with_peer ( const peer_connection_ptr peer)

Definition at line 3584 of file node.cpp.

void graphene::net::detail::node_impl::sync_from ( const item_id current_head_block,
const std::vector< uint32_t > &  hard_fork_block_numbers 
)

Definition at line 4699 of file node.cpp.

void graphene::net::detail::node_impl::terminate_inactive_connections_loop ( )

Definition at line 857 of file node.cpp.

void graphene::net::detail::node_impl::trigger_advertise_inventory_loop ( )

Definition at line 850 of file node.cpp.

void graphene::net::detail::node_impl::trigger_fetch_items_loop ( )

Definition at line 767 of file node.cpp.

void graphene::net::detail::node_impl::trigger_fetch_sync_items_loop ( )

Definition at line 625 of file node.cpp.

void graphene::net::detail::node_impl::trigger_p2p_network_connect_loop ( )

Definition at line 481 of file node.cpp.

void graphene::net::detail::node_impl::trigger_process_backlog_of_sync_blocks ( )

Definition at line 2980 of file node.cpp.

void graphene::net::detail::node_impl::update_bandwidth_data ( uint32_t  bytes_read_this_second,
uint32_t  bytes_written_this_second 
)

Definition at line 1118 of file node.cpp.

void graphene::net::detail::node_impl::update_seed_nodes_task ( )

Definition at line 490 of file node.cpp.

Member Data Documentation

fc::future<void> graphene::net::detail::node_impl::_accept_loop_complete

Definition at line 373 of file node_impl.hxx.

concurrent_unordered_set<graphene::net::peer_connection_ptr> graphene::net::detail::node_impl::_active_connections

stores fully established connections we're either syncing with or in normal operation with

Definition at line 379 of file node_impl.hxx.

active_sync_requests_map graphene::net::detail::node_impl::_active_sync_requests

Definition at line 311 of file node_impl.hxx.

fc::ip::endpoint graphene::net::detail::node_impl::_actual_listening_endpoint

stores the endpoint we're listening on. This will be the same as

Definition at line 285 of file node_impl.hxx.

std::list<potential_peer_record> graphene::net::detail::node_impl::_add_once_node_list

used by the task that manages connecting to peers

Definition at line 295 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_advertise_inventory_loop_done

Definition at line 340 of file node_impl.hxx.

boost::circular_buffer<uint32_t> graphene::net::detail::node_impl::_average_network_read_speed_hours

Definition at line 405 of file node_impl.hxx.

boost::circular_buffer<uint32_t> graphene::net::detail::node_impl::_average_network_read_speed_minutes

Definition at line 403 of file node_impl.hxx.

boost::circular_buffer<uint32_t> graphene::net::detail::node_impl::_average_network_read_speed_seconds

Definition at line 401 of file node_impl.hxx.

unsigned graphene::net::detail::node_impl::_average_network_usage_minute_counter

Definition at line 408 of file node_impl.hxx.

unsigned graphene::net::detail::node_impl::_average_network_usage_second_counter

Definition at line 407 of file node_impl.hxx.

boost::circular_buffer<uint32_t> graphene::net::detail::node_impl::_average_network_write_speed_hours

Definition at line 406 of file node_impl.hxx.

boost::circular_buffer<uint32_t> graphene::net::detail::node_impl::_average_network_write_speed_minutes

Definition at line 404 of file node_impl.hxx.

boost::circular_buffer<uint32_t> graphene::net::detail::node_impl::_average_network_write_speed_seconds

Definition at line 402 of file node_impl.hxx.

fc::time_point_sec graphene::net::detail::node_impl::_bandwidth_monitor_last_update_time

Definition at line 410 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_bandwidth_monitor_loop_done

Definition at line 411 of file node_impl.hxx.

fc::sha256 graphene::net::detail::node_impl::_chain_id

Definition at line 275 of file node_impl.hxx.

concurrent_unordered_set<graphene::net::peer_connection_ptr> graphene::net::detail::node_impl::_closing_connections

stores connections we've closed (sent closing message, not actually closed), but are still waiting for the remote end to close before we delete them

Definition at line 381 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_delayed_peer_deletion_task_done

Definition at line 428 of file node_impl.hxx.

std::unique_ptr<statistics_gathering_node_delegate_wrapper> graphene::net::detail::node_impl::_delegate

Definition at line 274 of file node_impl.hxx.

uint32_t graphene::net::detail::node_impl::_desired_number_of_connections

if we have less than _desired_number_of_connections, we will try to connect with more nodes

Definition at line 364 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_dump_node_status_task_done

Definition at line 413 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_fetch_item_loop_done

Definition at line 323 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_fetch_sync_items_loop_done

Definition at line 307 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_fetch_updated_peer_lists_loop_done

Definition at line 399 of file node_impl.hxx.

std::list<fc::future<void> > graphene::net::detail::node_impl::_handle_message_calls_in_progress

Definition at line 440 of file node_impl.hxx.

concurrent_unordered_set<graphene::net::peer_connection_ptr> graphene::net::detail::node_impl::_handshaking_connections

Stores all connections which have not yet finished key exchange or are still sending initial handshaking messages back and forth (not yet ready to initiate syncing)

Definition at line 377 of file node_impl.hxx.

std::vector<uint32_t> graphene::net::detail::node_impl::_hard_fork_block_numbers

the number of items we still need to fetch while syncing

Definition at line 389 of file node_impl.hxx.

firewalled_state graphene::net::detail::node_impl::_is_firewalled

we determine whether we're firewalled by asking other nodes. Store the result here:

Definition at line 288 of file node_impl.hxx.

items_to_fetch_set_type graphene::net::detail::node_impl::_items_to_fetch

Definition at line 333 of file node_impl.hxx.

unsigned graphene::net::detail::node_impl::_items_to_fetch_sequence_counter

Definition at line 332 of file node_impl.hxx.

bool graphene::net::detail::node_impl::_items_to_fetch_updated

Definition at line 322 of file node_impl.hxx.

fc::time_point graphene::net::detail::node_impl::_last_firewall_check_message_sent

Definition at line 291 of file node_impl.hxx.

uint32_t graphene::net::detail::node_impl::_last_reported_number_of_connections

Definition at line 395 of file node_impl.hxx.

unsigned graphene::net::detail::node_impl::_maximum_blocks_per_peer_during_syncing

Definition at line 438 of file node_impl.hxx.

unsigned graphene::net::detail::node_impl::_maximum_number_of_blocks_to_handle_at_one_time

Definition at line 436 of file node_impl.hxx.

uint32_t graphene::net::detail::node_impl::_maximum_number_of_connections

if we have _maximum_number_of_connections or more, we will refuse any inbound connections

Definition at line 366 of file node_impl.hxx.

unsigned graphene::net::detail::node_impl::_maximum_number_of_sync_blocks_to_prefetch

Definition at line 437 of file node_impl.hxx.

blockchain_tied_message_cache graphene::net::detail::node_impl::_message_cache

list of all block numbers where there are hard forks

Definition at line 391 of file node_impl.hxx.

boost::circular_buffer<item_hash_t> graphene::net::detail::node_impl::_most_recent_blocks_accepted

Definition at line 385 of file node_impl.hxx.

std::unordered_set<item_id> graphene::net::detail::node_impl::_new_inventory

Definition at line 341 of file node_impl.hxx.

std::list<graphene::net::block_message> graphene::net::detail::node_impl::_new_received_sync_items

list of sync blocks we've asked for from peers but have not yet received

Definition at line 312 of file node_impl.hxx.

node_configuration graphene::net::detail::node_impl::_node_configuration

Definition at line 280 of file node_impl.hxx.

fc::path graphene::net::detail::node_impl::_node_configuration_directory

Definition at line 279 of file node_impl.hxx.

node_id_t graphene::net::detail::node_impl::_node_id

_node_id is a random number generated each time the client is launched, used to prevent us from connecting to the same client multiple times (sent in hello messages). Since this was introduced after the hello_message was finalized, this is sent in the user_data field. While this shares the same underlying type as a public key, it is really just a random number.

Definition at line 361 of file node_impl.hxx.

bool graphene::net::detail::node_impl::_node_is_shutting_down

Definition at line 434 of file node_impl.hxx.

node_id_t graphene::net::detail::node_impl::_node_public_key

_node_public_key is a key automatically generated when the client is first run, stored in node_config.json. It doesn't really have much of a purpose yet, there was just some thought that we might someday have a use for nodes having a private key (sent in hello messages)

Definition at line 352 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_p2p_network_connect_loop_done

Definition at line 300 of file node_impl.hxx.

bool graphene::net::detail::node_impl::_peer_advertising_disabled

Definition at line 397 of file node_impl.hxx.

uint32_t graphene::net::detail::node_impl::_peer_connection_retry_timeout

retry connections to peers that have failed or rejected us this often, in seconds

Definition at line 368 of file node_impl.hxx.

uint32_t graphene::net::detail::node_impl::_peer_inactivity_timeout

how many seconds of inactivity are permitted before disconnecting a peer

Definition at line 370 of file node_impl.hxx.

std::list<peer_connection_ptr> graphene::net::detail::node_impl::_peers_to_delete

Definition at line 427 of file node_impl.hxx.

bool graphene::net::detail::node_impl::_potential_peer_database_updated

Definition at line 299 of file node_impl.hxx.

peer_database graphene::net::detail::node_impl::_potential_peer_db

list of peers we want to connect to as soon as possible

Definition at line 297 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_process_backlog_of_sync_blocks_done

list of sync blocks we've received, but can't yet process because we are still missing blocks that come earlier in the chain

Definition at line 316 of file node_impl.hxx.

fc::optional<fc::ip::endpoint> graphene::net::detail::node_impl::_publicly_visible_listening_endpoint

if we're behind NAT, our listening endpoint address will appear different to the rest of the world. store it here.

Definition at line 290 of file node_impl.hxx.

fc::rate_limiting_group graphene::net::detail::node_impl::_rate_limiter

cache message we have received and might be required to provide to other peers via inventory requests

Definition at line 393 of file node_impl.hxx.

std::list<graphene::net::block_message> graphene::net::detail::node_impl::_received_sync_items

list of sync blocks we've just received but haven't yet tried to process

Definition at line 313 of file node_impl.hxx.

uint8_t graphene::net::detail::node_impl::_recent_block_interval_in_seconds

Definition at line 345 of file node_impl.hxx.

peer_connection::timestamped_items_set_type graphene::net::detail::node_impl::_recently_failed_items

list of items we know another peer has and we want

Definition at line 334 of file node_impl.hxx.

fc::promise<void>::ptr graphene::net::detail::node_impl::_retrigger_advertise_inventory_loop_promise

list of transactions we've recently pushed and had rejected by the delegate

used by the task that advertises inventory during normal operation

Definition at line 339 of file node_impl.hxx.

fc::promise<void>::ptr graphene::net::detail::node_impl::_retrigger_connect_loop_promise

Definition at line 298 of file node_impl.hxx.

fc::promise<void>::ptr graphene::net::detail::node_impl::_retrigger_fetch_item_loop_promise

used by the task that fetches items during normal operation

Definition at line 321 of file node_impl.hxx.

fc::promise<void>::ptr graphene::net::detail::node_impl::_retrigger_fetch_sync_items_loop_promise

used by the task that fetches sync items during synchronization

Definition at line 305 of file node_impl.hxx.

boost::container::flat_set<std::string> graphene::net::detail::node_impl::_seed_nodes

used by the task that checks whether addresses of seed nodes have been updated

Definition at line 444 of file node_impl.hxx.

bool graphene::net::detail::node_impl::_suspend_fetching_sync_blocks

Definition at line 317 of file node_impl.hxx.

uint32_t graphene::net::detail::node_impl::_sync_item_type

Definition at line 387 of file node_impl.hxx.

bool graphene::net::detail::node_impl::_sync_items_to_fetch_updated

Definition at line 306 of file node_impl.hxx.

fc::tcp_server graphene::net::detail::node_impl::_tcp_server

Definition at line 372 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_terminate_inactive_connections_loop_done

list of items we have received but not yet advertised to our peers

Definition at line 344 of file node_impl.hxx.

concurrent_unordered_set<graphene::net::peer_connection_ptr> graphene::net::detail::node_impl::_terminating_connections

stores connections we've closed, but are still waiting for the OS to notify us that the socket is really closed

Definition at line 383 of file node_impl.hxx.

uint32_t graphene::net::detail::node_impl::_total_number_of_unfetched_items

Definition at line 388 of file node_impl.hxx.

fc::future<void> graphene::net::detail::node_impl::_update_seed_nodes_loop_done

Definition at line 445 of file node_impl.hxx.

std::string graphene::net::detail::node_impl::_user_agent_string

Definition at line 347 of file node_impl.hxx.


The documentation for this class was generated from the following files: