Wire Sysio Wire Sysion 1.0.0
|
#include <controller.hpp>
Classes | |
struct | config |
Public Types | |
enum class | block_status { irreversible = 0 , validated = 1 , complete = 2 , incomplete = 3 } |
Static Public Member Functions | |
static std::optional< uint64_t > | convert_exception_to_error_code (const fc::exception &e) |
static chain_id_type | extract_chain_id (snapshot_reader &snapshot) |
static std::optional< chain_id_type > | extract_chain_id_from_db (const path &state_dir) |
Public Attributes | |
signal< void(uint32_t)> | block_start |
signal< void(const signed_block_ptr &)> | pre_accepted_block |
signal< void(const block_state_ptr &)> | accepted_block_header |
signal< void(const block_state_ptr &)> | accepted_block |
signal< void(const block_state_ptr &)> | irreversible_block |
signal< void(const transaction_metadata_ptr &)> | accepted_transaction |
signal< void(std::tuple< const transaction_trace_ptr &, const packed_transaction_ptr & >)> | applied_transaction |
signal< void(const int &)> | bad_alloc |
Friends | |
class | apply_context |
class | transaction_context |
Definition at line 63 of file controller.hpp.
|
strong |
Definition at line 106 of file controller.hpp.
sysio::chain::controller::controller | ( | const config & | cfg, |
const chain_id_type & | chain_id ) |
Definition at line 2610 of file controller.cpp.
sysio::chain::controller::controller | ( | const config & | cfg, |
protocol_feature_set && | pfs, | ||
const chain_id_type & | chain_id ) |
Definition at line 2615 of file controller.cpp.
sysio::chain::controller::~controller | ( | ) |
Definition at line 2620 of file controller.cpp.
vector< transaction_metadata_ptr > sysio::chain::controller::abort_block | ( | ) |
Definition at line 2847 of file controller.cpp.
const producer_authority_schedule & sysio::chain::controller::active_producers | ( | ) | const |
Definition at line 3179 of file controller.cpp.
void sysio::chain::controller::add_indices | ( | ) |
Definition at line 2630 of file controller.cpp.
void sysio::chain::controller::add_resource_greylist | ( | const account_name & | name | ) |
Definition at line 3421 of file controller.cpp.
void sysio::chain::controller::add_to_ram_correction | ( | account_name | account, |
uint64_t | ram_bytes ) |
Definition at line 3438 of file controller.cpp.
bool sysio::chain::controller::all_subjective_mitigations_disabled | ( | ) | const |
Definition at line 3456 of file controller.cpp.
sha256 sysio::chain::controller::calculate_integrity_hash | ( | ) |
Definition at line 3119 of file controller.cpp.
void sysio::chain::controller::check_action_list | ( | account_name | code, |
action_name | action ) const |
void sysio::chain::controller::check_actor_list | ( | const flat_set< account_name > & | actors | ) | const |
Definition at line 3312 of file controller.cpp.
void sysio::chain::controller::check_contract_list | ( | account_name | code | ) | const |
Definition at line 3316 of file controller.cpp.
void sysio::chain::controller::check_key_list | ( | const public_key_type & | key | ) | const |
Definition at line 3324 of file controller.cpp.
void sysio::chain::controller::commit_block | ( | ) |
Definition at line 2842 of file controller.cpp.
uint32_t sysio::chain::controller::configured_subjective_signature_length_limit | ( | ) | const |
Definition at line 3342 of file controller.cpp.
bool sysio::chain::controller::contracts_console | ( | ) | const |
Definition at line 3265 of file controller.cpp.
|
static |
Definition at line 3478 of file controller.cpp.
block_state_ptr sysio::chain::controller::create_block_state | ( | const block_id_type & | id, |
const signed_block_ptr & | b ) const |
Definition at line 2859 of file controller.cpp.
std::future< block_state_ptr > sysio::chain::controller::create_block_state_future | ( | const block_id_type & | id, |
const signed_block_ptr & | b ) |
Definition at line 2855 of file controller.cpp.
const chainbase::database & sysio::chain::controller::db | ( | ) | const |
Definition at line 2646 of file controller.cpp.
uint32_t sysio::chain::controller::earliest_available_block_num | ( | ) | const |
Definition at line 3469 of file controller.cpp.
void sysio::chain::controller::enable_deep_mind | ( | deep_mind_handler * | logger | ) |
Definition at line 3464 of file controller.cpp.
|
static |
Definition at line 3488 of file controller.cpp.
|
static |
Definition at line 3522 of file controller.cpp.
signed_block_ptr sysio::chain::controller::fetch_block_by_id | ( | block_id_type | id | ) | const |
Definition at line 3066 of file controller.cpp.
signed_block_ptr sysio::chain::controller::fetch_block_by_number | ( | uint32_t | block_num | ) | const |
Definition at line 3074 of file controller.cpp.
block_state_ptr sysio::chain::controller::fetch_block_state_by_id | ( | block_id_type | id | ) | const |
block_state_ptr sysio::chain::controller::fetch_block_state_by_number | ( | uint32_t | block_num | ) | const |
Definition at line 3088 of file controller.cpp.
block_state_ptr sysio::chain::controller::finalize_block | ( | const signer_callback_type & | signer_callback | ) |
Definition at line 2818 of file controller.cpp.
const apply_handler * sysio::chain::controller::find_apply_handler | ( | account_name | contract, |
scope_name | scope, | ||
action_name | act ) const |
Definition at line 3289 of file controller.cpp.
const fork_database & sysio::chain::controller::fork_db | ( | ) | const |
Definition at line 2650 of file controller.cpp.
block_id_type sysio::chain::controller::fork_db_head_block_id | ( | ) | const |
Definition at line 2972 of file controller.cpp.
uint32_t sysio::chain::controller::fork_db_head_block_num | ( | ) | const |
Definition at line 2968 of file controller.cpp.
account_name sysio::chain::controller::fork_db_head_block_producer | ( | ) | const |
Definition at line 2980 of file controller.cpp.
time_point sysio::chain::controller::fork_db_head_block_time | ( | ) | const |
Definition at line 2976 of file controller.cpp.
block_id_type sysio::chain::controller::fork_db_pending_head_block_id | ( | ) | const |
Definition at line 2988 of file controller.cpp.
uint32_t sysio::chain::controller::fork_db_pending_head_block_num | ( | ) | const |
Definition at line 2984 of file controller.cpp.
account_name sysio::chain::controller::fork_db_pending_head_block_producer | ( | ) | const |
Definition at line 2996 of file controller.cpp.
time_point sysio::chain::controller::fork_db_pending_head_block_time | ( | ) | const |
Definition at line 2992 of file controller.cpp.
|
inline |
Definition at line 349 of file controller.hpp.
const account_object & sysio::chain::controller::get_account | ( | account_name | n | ) | const |
Definition at line 3303 of file controller.cpp.
const flat_set< pair< account_name, action_name > > & sysio::chain::controller::get_action_blacklist | ( | ) | const |
Definition at line 2902 of file controller.cpp.
const flat_set< account_name > & sysio::chain::controller::get_actor_blacklist | ( | ) | const |
Definition at line 2893 of file controller.cpp.
const flat_set< account_name > & sysio::chain::controller::get_actor_whitelist | ( | ) | const |
Definition at line 2890 of file controller.cpp.
const authorization_manager & sysio::chain::controller::get_authorization_manager | ( | ) | const |
Definition at line 2591 of file controller.cpp.
block_id_type sysio::chain::controller::get_block_id_for_num | ( | uint32_t | block_num | ) | const |
Definition at line 3096 of file controller.cpp.
chain_id_type sysio::chain::controller::get_chain_id | ( | ) | const |
Definition at line 3273 of file controller.cpp.
const flat_set< account_name > & sysio::chain::controller::get_contract_blacklist | ( | ) | const |
Definition at line 2899 of file controller.cpp.
const flat_set< account_name > & sysio::chain::controller::get_contract_whitelist | ( | ) | const |
Definition at line 2896 of file controller.cpp.
deep_mind_handler * sysio::chain::controller::get_deep_mind_logger | ( | ) | const |
Definition at line 3460 of file controller.cpp.
const dynamic_global_property_object & sysio::chain::controller::get_dynamic_global_properties | ( | ) | const |
Definition at line 3059 of file controller.cpp.
const global_property_object & sysio::chain::controller::get_global_properties | ( | ) | const |
Definition at line 3062 of file controller.cpp.
uint32_t sysio::chain::controller::get_greylist_limit | ( | ) | const |
Definition at line 3417 of file controller.cpp.
const flat_set< public_key_type > & sysio::chain::controller::get_key_blacklist | ( | ) | const |
Definition at line 2905 of file controller.cpp.
uint32_t sysio::chain::controller::get_max_nonprivileged_inline_action_size | ( | ) | const |
Definition at line 2605 of file controller.cpp.
authorization_manager & sysio::chain::controller::get_mutable_authorization_manager | ( | ) |
Definition at line 2595 of file controller.cpp.
resource_limits_manager & sysio::chain::controller::get_mutable_resource_limits_manager | ( | ) |
Definition at line 2586 of file controller.cpp.
const vector< transaction_receipt > & sysio::chain::controller::get_pending_trx_receipts | ( | ) | const |
Definition at line 3041 of file controller.cpp.
vector< digest_type > sysio::chain::controller::get_preactivated_protocol_features | ( | ) | const |
Definition at line 2760 of file controller.cpp.
const protocol_feature_manager & sysio::chain::controller::get_protocol_feature_manager | ( | ) | const |
Definition at line 2600 of file controller.cpp.
db_read_mode sysio::chain::controller::get_read_mode | ( | ) | const |
Definition at line 3277 of file controller.cpp.
const flat_set< account_name > & sysio::chain::controller::get_resource_greylist | ( | ) | const |
Definition at line 3433 of file controller.cpp.
const resource_limits_manager & sysio::chain::controller::get_resource_limits_manager | ( | ) | const |
Definition at line 2582 of file controller.cpp.
std::optional< fc::microseconds > sysio::chain::controller::get_subjective_cpu_leeway | ( | ) | const |
Definition at line 3403 of file controller.cpp.
uint32_t sysio::chain::controller::get_terminate_at_block | ( | ) | const |
Definition at line 3285 of file controller.cpp.
boost::asio::io_context & sysio::chain::controller::get_thread_pool | ( | ) |
Definition at line 2851 of file controller.cpp.
validation_mode sysio::chain::controller::get_validation_mode | ( | ) | const |
Definition at line 3281 of file controller.cpp.
wasm_interface & sysio::chain::controller::get_wasm_interface | ( | ) |
Definition at line 3299 of file controller.cpp.
const block_header & sysio::chain::controller::head_block_header | ( | ) | const |
Definition at line 2961 of file controller.cpp.
block_id_type sysio::chain::controller::head_block_id | ( | ) | const |
Definition at line 2955 of file controller.cpp.
uint32_t sysio::chain::controller::head_block_num | ( | ) | const |
Definition at line 2949 of file controller.cpp.
account_name sysio::chain::controller::head_block_producer | ( | ) | const |
Definition at line 2958 of file controller.cpp.
block_state_ptr sysio::chain::controller::head_block_state | ( | ) | const |
Definition at line 2964 of file controller.cpp.
time_point sysio::chain::controller::head_block_time | ( | ) | const |
Definition at line 2952 of file controller.cpp.
bool sysio::chain::controller::is_building_block | ( | ) | const |
Definition at line 3328 of file controller.cpp.
bool sysio::chain::controller::is_builtin_activated | ( | builtin_protocol_feature_t | f | ) | const |
Definition at line 3385 of file controller.cpp.
bool sysio::chain::controller::is_known_unexpired_transaction | ( | const transaction_id_type & | id | ) | const |
Definition at line 3395 of file controller.cpp.
bool sysio::chain::controller::is_producing_block | ( | ) | const |
Definition at line 3332 of file controller.cpp.
bool sysio::chain::controller::is_profiling | ( | account_name | name | ) | const |
Definition at line 3269 of file controller.cpp.
bool sysio::chain::controller::is_protocol_feature_activated | ( | const digest_type & | feature_digest | ) | const |
Definition at line 3377 of file controller.cpp.
bool sysio::chain::controller::is_ram_billing_in_notify_allowed | ( | ) | const |
Definition at line 3338 of file controller.cpp.
bool sysio::chain::controller::is_resource_greylisted | ( | const account_name & | name | ) | const |
bool sysio::chain::controller::is_trusted_producer | ( | const account_name & | producer | ) | const |
Definition at line 3261 of file controller.cpp.
block_id_type sysio::chain::controller::last_irreversible_block_id | ( | ) | const |
Definition at line 3050 of file controller.cpp.
uint32_t sysio::chain::controller::last_irreversible_block_num | ( | ) | const |
Definition at line 3046 of file controller.cpp.
time_point sysio::chain::controller::last_irreversible_block_time | ( | ) | const |
Definition at line 3054 of file controller.cpp.
bool sysio::chain::controller::light_validation_allowed | ( | ) | const |
Definition at line 3219 of file controller.cpp.
uint32_t sysio::chain::controller::pending_block_num | ( | ) | const |
Definition at line 3009 of file controller.cpp.
account_name sysio::chain::controller::pending_block_producer | ( | ) | const |
Definition at line 3018 of file controller.cpp.
const block_signing_authority & sysio::chain::controller::pending_block_signing_authority | ( | ) | const |
Definition at line 3027 of file controller.cpp.
time_point sysio::chain::controller::pending_block_time | ( | ) | const |
Definition at line 3000 of file controller.cpp.
std::optional< block_id_type > sysio::chain::controller::pending_producer_block_id | ( | ) | const |
Definition at line 3036 of file controller.cpp.
const producer_authority_schedule & sysio::chain::controller::pending_producers | ( | ) | const |
Definition at line 3189 of file controller.cpp.
void sysio::chain::controller::preactivate_feature | ( | const digest_type & | feature_digest | ) |
Definition at line 2652 of file controller.cpp.
std::optional< producer_authority_schedule > sysio::chain::controller::proposed_producers | ( | ) | const |
Definition at line 3211 of file controller.cpp.
void sysio::chain::controller::push_block | ( | const block_state_ptr & | bsp, |
const forked_branch_callback & | cb, | ||
const trx_meta_cache_lookup & | trx_lookup ) |
bsp | block to push |
cb | calls cb with forked applied transactions for each forked block |
trx_lookup | user provided lookup function for externally cached transaction_metadata |
Definition at line 2863 of file controller.cpp.
transaction_trace_ptr sysio::chain::controller::push_scheduled_transaction | ( | const transaction_id_type & | scheduled, |
fc::time_point | block_deadline, | ||
fc::microseconds | max_transaction_time, | ||
uint32_t | billed_cpu_time_us, | ||
bool | explicit_billed_cpu_time ) |
Attempt to execute a specific transaction in our deferred trx database
Definition at line 2881 of file controller.cpp.
transaction_trace_ptr sysio::chain::controller::push_transaction | ( | const transaction_metadata_ptr & | trx, |
fc::time_point | deadline, | ||
fc::microseconds | max_transaction_time, | ||
uint32_t | billed_cpu_time_us, | ||
bool | explicit_billed_cpu_time, | ||
int64_t | subjective_cpu_bill_us ) |
Definition at line 2871 of file controller.cpp.
void sysio::chain::controller::remove_resource_greylist | ( | const account_name & | name | ) |
void sysio::chain::controller::replace_account_keys | ( | name | account, |
name | permission, | ||
const public_key_type & | key ) |
Definition at line 3561 of file controller.cpp.
void sysio::chain::controller::replace_producer_keys | ( | const public_key_type & | key | ) |
Definition at line 3542 of file controller.cpp.
bool sysio::chain::controller::sender_avoids_whitelist_blacklist_enforcement | ( | account_name | sender | ) | const |
Definition at line 3308 of file controller.cpp.
void sysio::chain::controller::set_action_blacklist | ( | const flat_set< pair< account_name, action_name > > & | new_action_blacklist | ) |
Definition at line 2921 of file controller.cpp.
void sysio::chain::controller::set_actor_blacklist | ( | const flat_set< account_name > & | new_actor_blacklist | ) |
Definition at line 2912 of file controller.cpp.
void sysio::chain::controller::set_actor_whitelist | ( | const flat_set< account_name > & | new_actor_whitelist | ) |
Definition at line 2909 of file controller.cpp.
void sysio::chain::controller::set_contract_blacklist | ( | const flat_set< account_name > & | new_contract_blacklist | ) |
Definition at line 2918 of file controller.cpp.
void sysio::chain::controller::set_contract_whitelist | ( | const flat_set< account_name > & | new_contract_whitelist | ) |
Definition at line 2915 of file controller.cpp.
void sysio::chain::controller::set_greylist_limit | ( | uint32_t | limit | ) |
Definition at line 3407 of file controller.cpp.
void sysio::chain::controller::set_key_blacklist | ( | const flat_set< public_key_type > & | new_key_blacklist | ) |
Definition at line 2928 of file controller.cpp.
int64_t sysio::chain::controller::set_proposed_producers | ( | vector< producer_authority > | producers | ) |
Definition at line 3128 of file controller.cpp.
void sysio::chain::controller::set_s_header | ( | const s_header & | s_header | ) |
Definition at line 2931 of file controller.cpp.
void sysio::chain::controller::set_subjective_cpu_leeway | ( | fc::microseconds | leeway | ) |
Definition at line 3399 of file controller.cpp.
void sysio::chain::controller::sign_block | ( | const signer_callback_type & | signer_callback | ) |
bool sysio::chain::controller::skip_auth_check | ( | ) | const |
Definition at line 3238 of file controller.cpp.
bool sysio::chain::controller::skip_db_sessions | ( | ) | const |
Definition at line 3253 of file controller.cpp.
bool sysio::chain::controller::skip_db_sessions | ( | block_status | bs | ) | const |
Definition at line 3246 of file controller.cpp.
bool sysio::chain::controller::skip_trx_checks | ( | ) | const |
Definition at line 3242 of file controller.cpp.
void sysio::chain::controller::start_block | ( | block_timestamp_type | time, |
uint16_t | confirm_block_count, | ||
const vector< digest_type > & | new_protocol_feature_activations, | ||
const fc::time_point & | deadline = fc::time_point::maximum() ) |
Starts a new pending block session upon which new transactions can be pushed.
Definition at line 2803 of file controller.cpp.
void sysio::chain::controller::start_block | ( | block_timestamp_type | time = block_timestamp_type(), |
uint16_t | confirm_block_count = 0 ) |
Starts a new pending block session upon which new transactions can be pushed.
Will only activate protocol features that have been pre-activated.
Definition at line 2780 of file controller.cpp.
void sysio::chain::controller::startup | ( | std::function< void()> | shutdown, |
std::function< bool()> | check_shutdown ) |
Definition at line 2642 of file controller.cpp.
void sysio::chain::controller::startup | ( | std::function< void()> | shutdown, |
std::function< bool()> | check_shutdown, | ||
const genesis_state & | genesis ) |
Definition at line 2638 of file controller.cpp.
void sysio::chain::controller::startup | ( | std::function< void()> | shutdown, |
std::function< bool()> | check_shutdown, | ||
const snapshot_reader_ptr & | snapshot ) |
Definition at line 2634 of file controller.cpp.
|
inline |
Definition at line 362 of file controller.hpp.
void sysio::chain::controller::validate_db_available_size | ( | ) | const |
Definition at line 3371 of file controller.cpp.
void sysio::chain::controller::validate_expiration | ( | const transaction & | t | ) | const |
Definition at line 3346 of file controller.cpp.
void sysio::chain::controller::validate_protocol_features | ( | const vector< digest_type > & | features_to_activate | ) | const |
Definition at line 2774 of file controller.cpp.
void sysio::chain::controller::validate_tapos | ( | const transaction & | t | ) | const |
Definition at line 3362 of file controller.cpp.
void sysio::chain::controller::write_snapshot | ( | const snapshot_writer_ptr & | snapshot | ) |
Definition at line 3123 of file controller.cpp.
|
friend |
Definition at line 377 of file controller.hpp.
|
friend |
Definition at line 378 of file controller.hpp.
signal<void(const block_state_ptr&)> sysio::chain::controller::accepted_block |
Definition at line 329 of file controller.hpp.
signal<void(const block_state_ptr&)> sysio::chain::controller::accepted_block_header |
Definition at line 328 of file controller.hpp.
signal<void(const transaction_metadata_ptr&)> sysio::chain::controller::accepted_transaction |
Definition at line 331 of file controller.hpp.
signal<void(std::tuple<const transaction_trace_ptr&, const packed_transaction_ptr&>)> sysio::chain::controller::applied_transaction |
Definition at line 332 of file controller.hpp.
signal<void(const int&)> sysio::chain::controller::bad_alloc |
Definition at line 333 of file controller.hpp.
signal<void(uint32_t)> sysio::chain::controller::block_start |
Definition at line 326 of file controller.hpp.
signal<void(const block_state_ptr&)> sysio::chain::controller::irreversible_block |
Definition at line 330 of file controller.hpp.
signal<void(const signed_block_ptr&)> sysio::chain::controller::pre_accepted_block |
Definition at line 327 of file controller.hpp.