7namespace sysio {
namespace chain {
66 template<
typename Stream>
68 return c.
log(out) <<
"\n";
114 template<
typename Stream>
155 return static_cast<const Base&
>(*this);
160 template<
typename Stream>
162 return c.
log(out) <<
"\n";
172 return !(lhs == rhs);
181 template<
typename Stream>
202 (max_block_net_usage)(target_block_net_usage_pct)
203 (max_transaction_net_usage)(base_per_transaction_net_usage)(net_usage_leeway)
204 (context_free_discount_net_usage_num)(context_free_discount_net_usage_den)
206 (max_block_cpu_usage)(target_block_cpu_usage_pct)
207 (max_transaction_cpu_usage)(min_transaction_cpu_usage)
209 (max_transaction_lifetime)(deferred_trx_expiration_window)(max_transaction_delay)
210 (max_inline_action_size)(max_inline_action_depth)(max_authority_depth)
215 (max_action_return_value_size)
227template <
typename DataStream>
236 case chain_config_v0::max_block_net_usage_id:
239 case chain_config_v0::target_block_net_usage_pct_id:
242 case chain_config_v0::max_transaction_net_usage_id:
245 case chain_config_v0::base_per_transaction_net_usage_id:
248 case chain_config_v0::net_usage_leeway_id:
251 case chain_config_v0::context_free_discount_net_usage_num_id:
254 case chain_config_v0::context_free_discount_net_usage_den_id:
257 case chain_config_v0::max_block_cpu_usage_id:
260 case chain_config_v0::target_block_cpu_usage_pct_id:
263 case chain_config_v0::max_transaction_cpu_usage_id:
266 case chain_config_v0::min_transaction_cpu_usage_id:
269 case chain_config_v0::max_transaction_lifetime_id:
272 case chain_config_v0::deferred_trx_expiration_window_id:
275 case chain_config_v0::max_transaction_delay_id:
278 case chain_config_v0::max_inline_action_size_id:
281 case chain_config_v0::max_inline_action_depth_id:
284 case chain_config_v0::max_authority_depth_id:
288 FC_THROW_EXCEPTION(config_parse_error,
"DataStream& operator<<: no such id: ${id}", (
"id", entry.
id));
300template <
typename DataStream>
314 case chain_config_v1::max_action_return_value_size_id:
332template <
typename DataStream>
336 SYS_ASSERT(entry.
is_allowed(), sysio::chain::unsupported_feature,
"config id ${id} is no allowed", (
"id", entry.
id));
339 case chain_config_v0::max_block_net_usage_id:
342 case chain_config_v0::target_block_net_usage_pct_id:
345 case chain_config_v0::max_transaction_net_usage_id:
348 case chain_config_v0::base_per_transaction_net_usage_id:
351 case chain_config_v0::net_usage_leeway_id:
354 case chain_config_v0::context_free_discount_net_usage_num_id:
357 case chain_config_v0::context_free_discount_net_usage_den_id:
360 case chain_config_v0::max_block_cpu_usage_id:
363 case chain_config_v0::target_block_cpu_usage_pct_id:
366 case chain_config_v0::max_transaction_cpu_usage_id:
369 case chain_config_v0::min_transaction_cpu_usage_id:
372 case chain_config_v0::max_transaction_lifetime_id:
375 case chain_config_v0::deferred_trx_expiration_window_id:
378 case chain_config_v0::max_transaction_delay_id:
381 case chain_config_v0::max_inline_action_size_id:
384 case chain_config_v0::max_inline_action_depth_id:
387 case chain_config_v0::max_authority_depth_id:
391 FC_THROW_EXCEPTION(sysio::chain::config_parse_error,
"DataStream& operator<<: no such id: ${id}", (
"id", entry.
id));
404template <
typename DataStream>
411 case chain_config_v1::max_action_return_value_size_id:
429template<
typename DataStream,
typename T>
437 std::vector<bool> visited(T::PARAMS_COUNT,
false);
438 for (
auto uid : selection.
ids){
440 SYS_ASSERT(
id < visited.size(), config_parse_error,
"provided id ${id} should be less than ${size}", (
"id",
id)(
"size", visited.size()));
441 SYS_ASSERT(!visited[
id], config_parse_error,
"duplicate id provided: ${id}", (
"id",
id));
458template<
typename DataStream,
typename T>
466 std::vector<bool> visited(T::PARAMS_COUNT,
false);
467 for (
uint32_t i = 0; i < length; ++i) {
471 SYS_ASSERT(
id.
value < visited.size(), config_parse_error,
"provided id ${id} should be less than ${size}", (
"id",
id)(
"size", visited.size()));
472 SYS_ASSERT(!visited[
id], config_parse_error,
"duplicate id provided: ${id}", (
"id",
id));
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
Concept for reading and writing characters.
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
void unpack(Stream &s, std::deque< T > &value)
void pack(Stream &s, const std::deque< T > &value)
datastream< ST > & operator<<(datastream< ST > &s, const sysio::chain::may_not_exist< T > &v)
datastream< ST > & operator>>(datastream< ST > &s, sysio::chain::may_not_exist< T > &v)
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
#define FC_REFLECT_DERIVED(TYPE, INHERITS, MEMBERS)
Specializes fc::reflector for TYPE where type inherits other reflected classes.
unsigned __int64 uint64_t
Producer-voted blockchain configuration parameters.
const chain_config_v0 & v0() const
uint16_t max_inline_action_depth
recursion depth limit on sending inline actions
uint32_t max_transaction_lifetime
the maximum number of seconds that an input transaction's expiration can be ahead of the time of the ...
friend bool operator!=(const chain_config_v0 &lhs, const chain_config_v0 &rhs)
uint32_t target_block_net_usage_pct
the target percent (1% == 100, 100%= 10,000) of maximum net usage; exceeding this triggers congestion...
uint32_t context_free_discount_net_usage_num
the numerator for the discount on net usage of context-free data
uint32_t max_transaction_cpu_usage
the maximum billable cpu usage (in microseconds) that the chain will allow regardless of account limi...
uint32_t max_block_cpu_usage
the maxiumum billable cpu usage (in microseconds) for a block
uint32_t min_transaction_cpu_usage
the minimum billable cpu usage (in microseconds) that the chain requires
uint32_t deferred_trx_expiration_window
the number of seconds after the time a deferred transaction can first execute until it expires
friend bool operator==(const chain_config_v0 &lhs, const chain_config_v0 &rhs)
uint64_t max_block_net_usage
the maxiumum net usage in instructions for a block
@ min_transaction_cpu_usage_id
@ target_block_cpu_usage_pct_id
@ max_transaction_net_usage_id
@ max_transaction_cpu_usage_id
@ base_per_transaction_net_usage_id
@ max_inline_action_depth_id
@ max_transaction_lifetime_id
@ context_free_discount_net_usage_num_id
@ max_inline_action_size_id
@ context_free_discount_net_usage_den_id
@ target_block_net_usage_pct_id
@ deferred_trx_expiration_window_id
@ max_transaction_delay_id
Stream & log(Stream &out) const
uint32_t net_usage_leeway
friend Stream & operator<<(Stream &out, const chain_config_v0 &c)
uint32_t context_free_discount_net_usage_den
the denominator for the discount on net usage of context-free data
uint32_t max_transaction_net_usage
the maximum objectively measured net usage that the chain will allow regardless of account limits
uint16_t max_authority_depth
recursion depth limit for checking if an authority is satisfied
uint32_t base_per_transaction_net_usage
the base amount of net usage billed for a transaction to cover incidentals
uint32_t max_transaction_delay
the maximum number of seconds that can be imposed as a delay requirement by authorization checks
uint32_t target_block_cpu_usage_pct
the target percent (1% == 100, 100%= 10,000) of maximum cpu usage; exceeding this triggers congestion...
uint32_t max_inline_action_size
maximum allowed size (in bytes) of an inline action
v1 Producer-voted blockchain configuration parameters
uint32_t max_action_return_value_size
size limit for action return value
@ max_action_return_value_size_id
friend Stream & operator<<(Stream &out, const chain_config_v1 &c)
const Base & base() const
friend bool operator==(const chain_config_v1 &lhs, const chain_config_v1 &rhs)
friend bool operator!=(const chain_config_v1 &lhs, const chain_config_v1 &rhs)
chain_config_v1 & operator=(const Base &b)
Stream & log(Stream &out) const
bool operator()(uint32_t id) const
const controller & control
vector< fc::unsigned_int > ids