7namespace sysio {
namespace chain {
63 template <
typename DigestType>
65 const size_t bs = sysio::chain::config::hashing_checktime_block_size;
66 typename DigestType::encoder enc;
68 enc.write( data, bs );
98 uint32_t creator_action_ordinal,
uint32_t closest_unnotified_ancestor_action_ordinal );
102 uint32_t creator_action_ordinal,
uint32_t closest_unnotified_ancestor_action_ordinal );
106 uint32_t creator_action_ordinal,
uint32_t closest_unnotified_ancestor_action_ordinal );
110 void schedule_transaction();
113 void validate_cpu_usage_to_bill(
int64_t billed_us,
int64_t account_cpu_limit,
bool check_minimum )
const;
114 void validate_account_cpu_usage(
int64_t billed_us,
int64_t account_cpu_limit )
const;
115 void validate_account_cpu_usage_estimate(
int64_t billed_us,
int64_t account_cpu_limit )
const;
117 void disallow_transaction_extensions(
const char* error_msg )
const;
153 bool is_initialized =
false;
156 bool net_limit_due_to_block =
true;
157 bool net_limit_due_to_greylist =
false;
161 bool cpu_limit_due_to_greylist =
false;
168 int64_t deadline_exception_code = block_cpu_usage_exceeded::code_value;
169 int64_t billing_timer_exception_code = block_cpu_usage_exceeded::code_value;
static constexpr time_point maximum()
void init_for_deferred_trx(fc::time_point published)
bool explicit_billed_cpu_time
int64_t billed_cpu_time_us
const packed_transaction & packed_trx
uint64_t initial_max_billable_cpu
the maximum number of virtual CPU instructions of the transaction that can be safely billed to the bi...
void pause_billing_timer()
uint32_t update_billed_cpu_time(fc::time_point now)
transaction_checktime_timer transaction_timer
flat_set< account_name > validate_ram_usage
void resume_billing_timer()
void init_for_implicit_trx(uint64_t initial_net_usage=0)
void add_net_usage(uint64_t u)
transaction_context(controller &c, const packed_transaction &t, transaction_checktime_timer &&timer, fc::time_point start=fc::time_point::now(), bool read_only=false)
fc::time_point block_deadline
transaction_trace_ptr trace
bool enforce_whiteblacklist
void validate_referenced_accounts(const transaction &trx, bool enforce_actor_whitelist_blacklist) const
record_transaction
std::optional< chainbase::database::session > undo_session
vector< digest_type > executed_action_receipt_digests
DigestType hash_with_checktime(const char *data, uint32_t datalen) const
flat_set< account_name > bill_to_accounts
void check_net_usage() const
std::tuple< int64_t, int64_t, bool, bool > max_bandwidth_billed_accounts_can_pay(bool force_elastic_limits=false) const
void init_for_input_trx(uint64_t packed_trx_unprunable_size, uint64_t packed_trx_prunable_size)
controller & control
Fields:
int64_t subjective_cpu_bill_us
std::shared_ptr< transaction_trace > transaction_trace_ptr
unsigned __int64 uint64_t
Immutable except for fc::from_variant.
~transaction_checktime_timer()
transaction_checktime_timer(transaction_checktime_timer &&)=default
transaction_checktime_timer(const transaction_checktime_timer &)=delete
void set_expiration_callback(void(*func)(void *), void *user)
std::atomic_bool & expired
transaction_checktime_timer()=delete
void start(fc::time_point tp)