7#include <boost/signals2/signal.hpp>
25namespace sysio {
namespace chain {
29 namespace resource_limits {
36 using boost::signals2::signal;
119 void startup( std::function<
void()> shutdown, std::function<
bool()> check_shutdown,
const genesis_state& genesis);
120 void startup( std::function<
void()> shutdown, std::function<
bool()> check_shutdown);
155 uint32_t billed_cpu_time_us,
bool explicit_billed_cpu_time,
156 int64_t subjective_cpu_bill_us );
164 uint32_t billed_cpu_time_us,
bool explicit_billed_cpu_time );
320#if defined(SYSIO_SYS_VM_RUNTIME_ENABLED) || defined(SYSIO_SYS_VM_JIT_RUNTIME_ENABLED)
332 signal<void(std::tuple<const transaction_trace_ptr&, const packed_transaction_ptr&>)>
applied_transaction;
358 return std::optional<abi_serializer>();
366 return pretty_output;
382 std::unique_ptr<controller_impl> my;
Used to generate a useful error report when an exception is thrown.
wraps boost::filesystem::path to provide platform independent path manipulation.
static constexpr time_point maximum()
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
void set_greylist_limit(uint32_t limit)
block_state_ptr fetch_block_state_by_number(uint32_t block_num) const
signal< void(const transaction_metadata_ptr &)> accepted_transaction
void set_actor_whitelist(const flat_set< account_name > &)
const flat_set< account_name > & get_actor_blacklist() const
void check_action_list(account_name code, action_name action) const
signal< void(const block_state_ptr &)> accepted_block_header
bool is_protocol_feature_activated(const digest_type &feature_digest) const
const global_property_object & get_global_properties() const
const chainbase::database & db() const
bool is_producing_block() const
void sign_block(const signer_callback_type &signer_callback)
bool is_trusted_producer(const account_name &producer) const
validation_mode get_validation_mode() const
signed_block_ptr fetch_block_by_number(uint32_t block_num) const
const dynamic_global_property_object & get_dynamic_global_properties() const
account_name fork_db_pending_head_block_producer() const
block_id_type fork_db_pending_head_block_id() const
void set_actor_blacklist(const flat_set< account_name > &)
static std::optional< chain_id_type > extract_chain_id_from_db(const path &state_dir)
signal< void(const block_state_ptr &)> accepted_block
void add_to_ram_correction(account_name account, uint64_t ram_bytes)
signal< void(const block_state_ptr &)> irreversible_block
bool is_building_block() const
db_read_mode get_read_mode() const
static chain_id_type extract_chain_id(snapshot_reader &snapshot)
vector< transaction_metadata_ptr > abort_block()
account_name head_block_producer() const
transaction_trace_ptr 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)
block_state_ptr create_block_state(const block_id_type &id, const signed_block_ptr &b) const
uint32_t head_block_num() const
void push_block(const block_state_ptr &bsp, const forked_branch_callback &cb, const trx_meta_cache_lookup &trx_lookup)
block_id_type head_block_id() const
std::optional< producer_authority_schedule > proposed_producers() const
void validate_expiration(const transaction &t) const
block_state_ptr head_block_state() const
void write_snapshot(const snapshot_writer_ptr &snapshot)
bool skip_auth_check() const
bool is_profiling(account_name name) const
uint32_t pending_block_num() const
const apply_handler * find_apply_handler(account_name contract, scope_name scope, action_name act) const
bool is_ram_billing_in_notify_allowed() const
authorization_manager & get_mutable_authorization_manager()
deep_mind_handler * get_deep_mind_logger() const
signal< void(const signed_block_ptr &)> pre_accepted_block
uint32_t last_irreversible_block_num() const
const producer_authority_schedule & pending_producers() const
void set_key_blacklist(const flat_set< public_key_type > &)
void set_s_header(const s_header &)
uint32_t fork_db_pending_head_block_num() const
uint32_t get_max_nonprivileged_inline_action_size() const
boost::asio::io_context & get_thread_pool()
block_id_type fork_db_head_block_id() const
const protocol_feature_manager & get_protocol_feature_manager() const
uint32_t configured_subjective_signature_length_limit() const
bool light_validation_allowed() const
void replace_account_keys(name account, name permission, const public_key_type &key)
account_name fork_db_head_block_producer() const
const flat_set< account_name > & get_contract_whitelist() const
account_name pending_block_producer() const
const block_signing_authority & pending_block_signing_authority() const
void validate_db_available_size() const
signed_block_ptr fetch_block_by_id(block_id_type id) const
time_point fork_db_head_block_time() const
void enable_deep_mind(deep_mind_handler *logger)
time_point last_irreversible_block_time() const
wasm_interface & get_wasm_interface()
const flat_set< pair< account_name, action_name > > & get_action_blacklist() const
std::optional< block_id_type > pending_producer_block_id() const
@ incomplete
this is an incomplete block (either being produced by a producer or speculatively produced by a node)
@ irreversible
this block has already been applied before by this node and is considered irreversible
@ validated
this is a complete block signed by a valid producer and has been previously applied by this node and ...
@ complete
this is a complete block signed by a valid producer but is not yet irreversible nor has it yet been a...
uint32_t get_terminate_at_block() const
const authorization_manager & get_authorization_manager() const
void set_contract_blacklist(const flat_set< account_name > &)
block_state_ptr finalize_block(const signer_callback_type &signer_callback)
void validate_tapos(const transaction &t) const
block_id_type last_irreversible_block_id() const
const flat_set< account_name > & get_contract_blacklist() const
block_id_type get_block_id_for_num(uint32_t block_num) const
uint32_t get_greylist_limit() const
void remove_resource_greylist(const account_name &name)
bool is_resource_greylisted(const account_name &name) const
void check_key_list(const public_key_type &key) const
void check_actor_list(const flat_set< account_name > &actors) const
chain_id_type get_chain_id() const
bool is_builtin_activated(builtin_protocol_feature_t f) const
bool sender_avoids_whitelist_blacklist_enforcement(account_name sender) const
const flat_set< public_key_type > & get_key_blacklist() const
const flat_set< account_name > & get_resource_greylist() const
transaction_trace_ptr 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)
const account_object & get_account(account_name n) const
void set_contract_whitelist(const flat_set< account_name > &)
std::optional< abi_serializer > get_abi_serializer(account_name n, const abi_serializer::yield_function_t &yield) const
int64_t set_proposed_producers(vector< producer_authority > producers)
uint32_t earliest_available_block_num() const
time_point fork_db_pending_head_block_time() const
time_point pending_block_time() const
void validate_protocol_features(const vector< digest_type > &features_to_activate) const
signal< void(std::tuple< const transaction_trace_ptr &, const packed_transaction_ptr & >)> applied_transaction
vector< digest_type > get_preactivated_protocol_features() const
void set_subjective_cpu_leeway(fc::microseconds leeway)
bool skip_db_sessions() const
void replace_producer_keys(const public_key_type &key)
block_state_ptr fetch_block_state_by_id(block_id_type id) const
void add_resource_greylist(const account_name &name)
const block_header & head_block_header() const
bool is_known_unexpired_transaction(const transaction_id_type &id) const
std::future< block_state_ptr > create_block_state_future(const block_id_type &id, const signed_block_ptr &b)
const vector< transaction_receipt > & get_pending_trx_receipts() const
signal< void(uint32_t)> block_start
resource_limits_manager & get_mutable_resource_limits_manager()
const fork_database & fork_db() const
const producer_authority_schedule & active_producers() const
sha256 calculate_integrity_hash()
uint32_t fork_db_head_block_num() const
const flat_set< account_name > & get_actor_whitelist() const
static std::optional< uint64_t > convert_exception_to_error_code(const fc::exception &e)
time_point head_block_time() const
const resource_limits_manager & get_resource_limits_manager() const
controller_impl
void set_action_blacklist(const flat_set< pair< account_name, action_name > > &)
std::optional< fc::microseconds > get_subjective_cpu_leeway() const
signal< void(const int &)> bad_alloc
bool all_subjective_mitigations_disabled() const
void startup(std::function< void()> shutdown, std::function< bool()> check_shutdown, const snapshot_reader_ptr &snapshot)
bool contracts_console() const
bool skip_trx_checks() const
fc::variant to_variant_with_abi(const T &obj, const abi_serializer::yield_function_t &yield) const
controller(const config &cfg, const chain_id_type &chain_id)
void start_block(block_timestamp_type time=block_timestamp_type(), uint16_t confirm_block_count=0)
void check_contract_list(account_name code) const
Maintains global state information that frequently change.
manages light-weight state for all potential unconfirmed forks
Maintains global state information about block producer schedules and chain configuration parameters.
#define FC_CAPTURE_AND_LOG(...)
block_timestamp< config::block_interval_ms, config::block_timestamp_epoch > block_timestamp_type
std::function< std::vector< signature_type >(const digest_type &)> signer_callback_type
deque< block_state_ptr > branch_type
builtin_protocol_feature_t
std::shared_ptr< transaction_trace > transaction_trace_ptr
std::variant< block_signing_authority_v0 > block_signing_authority
sysio::chain::action_name action_name
std::shared_ptr< snapshot_writer > snapshot_writer_ptr
std::shared_ptr< signed_block > signed_block_ptr
std::shared_ptr< snapshot_reader > snapshot_reader_ptr
std::function< void(apply_context &)> apply_handler
std::shared_ptr< block_state > block_state_ptr
std::shared_ptr< transaction_metadata > transaction_metadata_ptr
std::function< transaction_metadata_ptr(const transaction_id_type &)> trx_meta_cache_lookup
std::function< void(const branch_type &)> forked_branch_callback
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define T(meth, val, expected)
schedule config_dir_name data_dir_name p2p_port http_port file_size name name keys peers producers(dont_start)) FC_REFLECT(testnet_def
unsigned __int64 uint64_t
static bool to_abi(const Vec &abi_vec, abi_def &abi)
static void to_variant(const T &o, fc::variant &vo, Resolver resolver, const yield_function_t &yield)
namespace sysio::chain::impl
validation_mode block_validation_mode
pinnable_mapped_file::map_mode db_map_mode
flat_set< account_name > contract_whitelist
std::optional< block_log_prune_config > prune_config
uint32_t max_nonprivileged_inline_action_size
uint32_t terminate_at_block
flat_set< account_name > actor_blacklist
flat_set< account_name > actor_whitelist
uint32_t sig_cpu_bill_pct
flat_set< account_name > resource_greylist
flat_set< account_name > contract_blacklist
flat_set< account_name > sender_bypass_whiteblacklist
bool disable_all_subjective_mitigations
bool allow_ram_billing_in_notify
eosvmoc::config eosvmoc_config
flat_set< pair< account_name, action_name > > action_blacklist
uint16_t thread_pool_size
uint32_t maximum_variable_signature_length
uint64_t state_guard_size
flat_set< account_name > profile_accounts
flat_set< public_key_type > key_blacklist
flat_set< account_name > trusted_producers
wasm_interface::vm_type wasm_runtime
Immutable except for fc::from_variant.
constexpr bool good() const
sysio::vm::wasm_allocator * get_wasm_allocator()