Wire Sysio Wire Sysion 1.0.0
|
Namespaces | |
namespace | chain |
namespace | chain_apis |
namespace | client |
namespace | detail |
namespace | finality_status |
namespace | resource_monitor |
namespace | state_history |
namespace | test |
namespace | test_control_apis |
namespace | testing |
namespace | trace_api |
namespace | version |
namespace | vm |
namespace | wallet |
namespace | wasm_backend |
Enumerations | |
enum | https_ecdh_curve_t { SECP384R1 , PRIME256V1 } |
enum class | http_params_types { no_params = 0 , params_required = 1 , possible_no_params = 2 } |
enum | go_away_reason { no_reason , self , duplicate , wrong_chain , wrong_version , forked , unlinkable , bad_transaction , validation , benign_other , fatal_other , authentication } |
enum | id_list_modes { none , catch_up , last_irr_catch_up , normal } |
enum class | pending_block_mode { producing , speculating } |
Functions | |
template<size_t Size> | |
bool | operator== (const fixed_key< Size > &c1, const fixed_key< Size > &c2) |
Compares two fixed_key variables c1 and c2. | |
template<size_t Size> | |
bool | operator!= (const fixed_key< Size > &c1, const fixed_key< Size > &c2) |
Compares two fixed_key variables c1 and c2. | |
template<size_t Size> | |
bool | operator> (const fixed_key< Size > &c1, const fixed_key< Size > &c2) |
Compares two fixed_key variables c1 and c2. | |
template<size_t Size> | |
bool | operator< (const fixed_key< Size > &c1, const fixed_key< Size > &c2) |
Compares two fixed_key variables c1 and c2. | |
uint64_t | ship_magic (uint16_t version, uint16_t features=0) |
bool | is_ship (uint64_t magic) |
uint16_t | get_ship_version (uint64_t magic) |
uint16_t | get_ship_features (uint64_t magic) |
bool | is_ship_supported_version (uint64_t magic) |
bool | is_ship_log_pruned (uint64_t magic) |
uint64_t | clear_ship_log_pruned_feature (uint64_t magic) |
template<> | |
chain_apis::read_only::get_transaction_status_params | parse_params< chain_apis::read_only::get_transaction_status_params, http_params_types::params_required > (const std::string &body) |
fc::time_point | calculate_genesis_timestamp (string tstr) |
void | clear_directory_contents (const fc::path &p) |
void | clear_chainbase_files (const fc::path &p) |
std::optional< builtin_protocol_feature > | read_builtin_protocol_feature (const fc::path &p) |
protocol_feature_set | initialize_protocol_features (const fc::path &p, bool populate_missing_builtins=true) |
template<> | |
bool | http_plugin_impl::allow_host< detail::asio_local_with_stub_log > (const detail::asio_local_with_stub_log::request_type &req, websocketpp::server< detail::asio_local_with_stub_log >::connection_ptr con) |
std::istream & | operator>> (std::istream &in, https_ecdh_curve_t &curve) |
std::ostream & | operator<< (std::ostream &osm, https_ecdh_curve_t curve) |
std::string_view | make_trimmed_string_view (const std::string &body) |
Used to trim whitespace from body. Returned string_view valid only for lifetime of body. | |
bool | is_empty_content (const std::string &body) |
template<typename T , http_params_types params_type> | |
T | parse_params (const std::string &body) |
constexpr auto | reason_str (go_away_reason rsn) |
constexpr auto | modes_str (id_list_modes m) |
template<typename Strand > | |
void | verify_strand_in_this_thread (const Strand &strand, const char *func, int line) |
const fc::string | logger_name ("net_plugin_impl") |
template<class enum_type , class = typename std::enable_if<std::is_enum<enum_type>::value>::type> | |
enum_type & | operator|= (enum_type &lhs, const enum_type &rhs) |
template<typename Function > | |
void | for_each_connection (Function f) |
template<typename Function > | |
void | for_each_block_connection (Function f) |
size_t | calc_trx_size (const packed_transaction_ptr &trx) |
template<typename T > | |
T | dejsonify (const string &s) |
void | new_chain_banner (const sysio::chain::controller &db) |
template<typename F > | |
auto | catch_and_log (F f) |
using sysio::api_description = std::map<string, url_handler> |
An API is composed of several calls, where each call has a URL and a handler. The URL is the path on the web server that triggers the call, and the handler is the function which implements the API call
Definition at line 38 of file http_plugin.hpp.
using sysio::connection_ptr = std::shared_ptr<connection> |
Definition at line 50 of file net_plugin.cpp.
using sysio::connection_wptr = std::weak_ptr<connection> |
Definition at line 51 of file net_plugin.cpp.
Definition at line 44 of file finality_status_object.hpp.
using sysio::http_plugin_impl_ptr = std::shared_ptr<class http_plugin_impl> |
Definition at line 175 of file http_plugin.cpp.
typedef fixed_key<32> sysio::key256 |
Definition at line 220 of file fixed_key.hpp.
Definition at line 22 of file login_plugin.cpp.
using sysio::net_message |
Definition at line 138 of file protocol.hpp.
typedef multi_index_container< node_transaction_state, indexed_by< ordered_unique< tag<by_id>, composite_key< node_transaction_state, member<node_transaction_state, transaction_id_type, &node_transaction_state::id>, member<node_transaction_state, uint32_t, &node_transaction_state::connection_id> >, composite_key_compare< sha256_less, std::less<uint32_t> > >, ordered_non_unique< tag< by_expiry >, member< node_transaction_state, fc::time_point_sec, &node_transaction_state::expires > > > > sysio::node_transaction_index |
Definition at line 85 of file net_plugin.cpp.
Definition at line 119 of file protocol.hpp.
Definition at line 118 of file protocol.hpp.
typedef multi_index_container< sysio::peer_block_state, indexed_by< ordered_unique< tag<by_id>, composite_key< peer_block_state, member<peer_block_state, uint32_t, &sysio::peer_block_state::connection_id>, member<peer_block_state, block_id_type, &sysio::peer_block_state::id> >, composite_key_compare< std::less<uint32_t>, sha256_less > >, ordered_non_unique< tag<by_peer_block_id>, composite_key< peer_block_state, member<peer_block_state, block_id_type, &sysio::peer_block_state::id>, member<peer_block_state, bool, &sysio::peer_block_state::have_block> >, composite_key_compare< sha256_less, std::greater<bool> > >, ordered_non_unique< tag<by_block_num>, member<sysio::peer_block_state, uint32_t, &sysio::peer_block_state::block_num > > > > sysio::peer_block_state_index |
Definition at line 116 of file net_plugin.cpp.
Definition at line 177 of file producer_plugin.cpp.
using sysio::send_buffer_type = std::shared_ptr<std::vector<char>> |
Definition at line 1320 of file net_plugin.cpp.
using sysio::ssl_context_ptr = websocketpp::lib::shared_ptr<websocketpp::lib::asio::ssl::context> |
Definition at line 174 of file http_plugin.cpp.
typedef shared_ptr<struct state_history_plugin_impl> sysio::state_history_ptr |
Definition at line 15 of file state_history_plugin.hpp.
typedef std::shared_ptr<class test_control_plugin_impl> sysio::test_control_ptr |
Definition at line 11 of file test_control_plugin.hpp.
Definition at line 112 of file producer_plugin.cpp.
typedef std::chrono::system_clock::duration::rep sysio::tstamp |
Definition at line 11 of file protocol.hpp.
using sysio::url_handler = std::function<void(string,string,url_response_callback)> |
URL handlers have this type
The handler must gaurantee that url_response_callback() is called; otherwise, the connection will hang and result in a memory leak.
Arguments: url, request_body, response_callback
Definition at line 29 of file http_plugin.hpp.
using sysio::url_response_callback = std::function<void(int,fc::variant)> |
Arguments: response_code, response_body
Definition at line 17 of file http_plugin.hpp.
Definition at line 131 of file chain_plugin.cpp.
Definition at line 172 of file http_plugin.cpp.
using sysio::websocket_server_tls_type = websocketpp::server<detail::asio_with_stub_log<websocketpp::transport::asio::tls_socket::endpoint>> |
Definition at line 173 of file http_plugin.cpp.
using sysio::websocket_server_type = websocketpp::server<detail::asio_with_stub_log<websocketpp::transport::asio::basic_socket::endpoint>> |
Definition at line 171 of file http_plugin.cpp.
Definition at line 46 of file protocol.hpp.
|
strong |
Enumerator | |
---|---|
no_params | |
params_required | |
possible_no_params |
Definition at line 215 of file http_plugin.hpp.
Enumerator | |
---|---|
SECP384R1 | |
PRIME256V1 |
Definition at line 48 of file http_plugin.cpp.
enum sysio::id_list_modes |
Enumerator | |
---|---|
none | |
catch_up | |
last_irr_catch_up | |
normal |
Definition at line 92 of file protocol.hpp.
|
strong |
Enumerator | |
---|---|
producing | |
speculating |
Definition at line 185 of file producer_plugin.cpp.
size_t sysio::calc_trx_size | ( | const packed_transaction_ptr & | trx | ) |
Definition at line 3106 of file net_plugin.cpp.
fc::time_point sysio::calculate_genesis_timestamp | ( | string | tstr | ) |
Definition at line 386 of file chain_plugin.cpp.
auto sysio::catch_and_log | ( | F | f | ) |
Definition at line 31 of file state_history_plugin.cpp.
void sysio::clear_chainbase_files | ( | const fc::path & | p | ) |
Definition at line 417 of file chain_plugin.cpp.
void sysio::clear_directory_contents | ( | const fc::path & | p | ) |
Definition at line 406 of file chain_plugin.cpp.
Definition at line 52 of file log.hpp.
Definition at line 3592 of file net_plugin.cpp.
void sysio::for_each_block_connection | ( | Function | f | ) |
Definition at line 868 of file net_plugin.cpp.
void sysio::for_each_connection | ( | Function | f | ) |
Definition at line 860 of file net_plugin.cpp.
Definition at line 628 of file http_plugin.cpp.
protocol_feature_set sysio::initialize_protocol_features | ( | const fc::path & | p, |
bool | populate_missing_builtins = true ) |
Definition at line 438 of file chain_plugin.cpp.
|
inline |
Definition at line 195 of file http_plugin.hpp.
|
inline |
Definition at line 42 of file log.hpp.
|
inline |
|
inline |
const fc::string sysio::logger_name | ( | "net_plugin_impl" | ) |
|
inline |
Definition at line 166 of file http_plugin.hpp.
|
constexpr |
Definition at line 99 of file protocol.hpp.
void sysio::new_chain_banner | ( | const sysio::chain::controller & | db | ) |
Definition at line 803 of file producer_plugin.cpp.
std::ostream & sysio::operator<< | ( | std::ostream & | osm, |
https_ecdh_curve_t | curve ) |
Definition at line 1011 of file http_plugin.cpp.
std::istream & sysio::operator>> | ( | std::istream & | in, |
https_ecdh_curve_t & | curve ) |
Definition at line 999 of file http_plugin.cpp.
Definition at line 393 of file net_plugin.cpp.
T sysio::parse_params | ( | const std::string & | body | ) |
Definition at line 222 of file http_plugin.hpp.
chain_apis::read_only::get_transaction_status_params sysio::parse_params< chain_apis::read_only::get_transaction_status_params, http_params_types::params_required > | ( | const std::string & | body | ) |
Definition at line 36 of file chain_api_plugin.cpp.
std::optional< builtin_protocol_feature > sysio::read_builtin_protocol_feature | ( | const fc::path & | p | ) |
Definition at line 425 of file chain_plugin.cpp.
|
constexpr |
Definition at line 61 of file protocol.hpp.
void sysio::verify_strand_in_this_thread | ( | const Strand & | strand, |
const char * | func, | ||
int | line ) |
Definition at line 54 of file net_plugin.cpp.
|
constexpr |
Definition at line 208 of file net_plugin.cpp.
|
constexpr |
Definition at line 212 of file net_plugin.cpp.
|
constexpr |
Definition at line 206 of file net_plugin.cpp.
|
constexpr |
Definition at line 205 of file net_plugin.cpp.
|
constexpr |
Definition at line 207 of file net_plugin.cpp.
|
constexpr |
Definition at line 204 of file net_plugin.cpp.
|
constexpr |
Definition at line 203 of file net_plugin.cpp.
|
constexpr |
Definition at line 210 of file net_plugin.cpp.
|
constexpr |
Definition at line 202 of file net_plugin.cpp.
|
constexpr |
default value initializers
Definition at line 201 of file net_plugin.cpp.
|
constexpr |
Definition at line 211 of file net_plugin.cpp.
|
constexpr |
Definition at line 209 of file net_plugin.cpp.
Definition at line 355 of file net_plugin.cpp.
|
constexpr |
Definition at line 25 of file protocol.hpp.
|
constexpr |
Definition at line 24 of file protocol.hpp.
Definition at line 214 of file net_plugin.cpp.
|
constexpr |
For a while, network version was a 16 bit value equal to the second set of 16 bits of the current build's git commit id. We are now replacing that with an integer protocol identifier. Based on historical analysis of all git commit identifiers, the larges gap between ajacent commit id values is shown below. these numbers were found with the following commands on the master branch:
git log | grep "^commit" | awk '{print substr($2,5,4)}' | sort -u > sorted.txt rm -f gap.txt; prev=0; for a in $(cat sorted.txt); do echo $prev $((0x$a - 0x$prev)) $a >> gap.txt; prev=$a; done; sort -k2 -n gap.txt | tail
DO NOT EDIT net_version_base OR net_version_range!
Definition at line 413 of file net_plugin.cpp.
|
constexpr |
Definition at line 431 of file net_plugin.cpp.
|
constexpr |
Definition at line 414 of file net_plugin.cpp.
|
constexpr |
Definition at line 216 of file net_plugin.cpp.
std::string sysio::peer_log_format |
Definition at line 356 of file net_plugin.cpp.
|
constexpr |
If there is a change to network protocol or behavior, increment net version to identify the need for compatibility hooks
Definition at line 421 of file net_plugin.cpp.
|
constexpr |
Definition at line 423 of file net_plugin.cpp.
|
constexpr |
Definition at line 426 of file net_plugin.cpp.
|
constexpr |
Definition at line 427 of file net_plugin.cpp.
|
constexpr |
Definition at line 422 of file net_plugin.cpp.
|
constexpr |
Definition at line 425 of file net_plugin.cpp.
|
constexpr |
Definition at line 424 of file net_plugin.cpp.
|
constexpr |
Definition at line 428 of file net_plugin.cpp.
|
constexpr |
Definition at line 215 of file net_plugin.cpp.