6namespace sysio {
namespace chain {
namespace config {
10const static auto default_blocks_dir_name =
"blocks";
11const static auto reversible_blocks_dir_name =
"reversible";
13const static auto default_state_dir_name =
"state";
14const static auto forkdb_filename =
"fork_db.dat";
15const static auto default_state_size = 1*1024*1024*1024ll;
16const static auto default_state_guard_size = 128*1024*1024ll;
19const static name system_account_name {
"sysio"_n };
20const static name null_account_name {
"sysio.null"_n };
21const static name producers_account_name {
"sysio.prods"_n };
24const static name majority_producers_permission_name {
"prod.major"_n };
25const static name minority_producers_permission_name {
"prod.minor"_n };
27const static name sysio_auth_scope {
"sysio.auth"_n };
28const static name sysio_all_scope {
"sysio.all"_n };
30const static name active_name {
"active"_n };
31const static name owner_name {
"owner"_n };
32const static name sysio_any_name {
"sysio.any"_n };
33const static name sysio_code_name {
"sysio.code"_n };
35const static int block_interval_ms = 500;
36const static int block_interval_us = block_interval_ms*1000;
37const static uint64_t block_timestamp_epoch = 946684800000ll;
38const static uint32_t genesis_num_supported_key_types = 2;
41const static int percent_100 = 10000;
42const static int percent_1 = 100;
44static const uint32_t account_cpu_usage_average_window_ms = 24*60*60*1000l;
45static const uint32_t account_net_usage_average_window_ms = 24*60*60*1000l;
46static const uint32_t block_cpu_usage_average_window_ms = 60*1000l;
47static const uint32_t block_size_average_window_ms = 60*1000l;
48static const uint32_t maximum_elastic_resource_multiplier = 1000;
54const static uint32_t rate_limiting_precision = 1000*1000;
57const static uint32_t default_max_block_net_usage = 1024 * 1024;
58const static uint32_t default_target_block_net_usage_pct = 10 * percent_1;
59const static uint32_t default_max_transaction_net_usage = default_max_block_net_usage / 2;
60const static uint32_t default_base_per_transaction_net_usage = 12;
61const static uint32_t default_net_usage_leeway = 500;
62const static uint32_t default_context_free_discount_net_usage_num = 20;
63const static uint32_t default_context_free_discount_net_usage_den = 100;
64const static uint32_t transaction_id_net_usage = 32;
66const static uint32_t default_max_block_cpu_usage = 200'000;
67const static uint32_t default_target_block_cpu_usage_pct = 10 * percent_1;
68const static uint32_t default_max_transaction_cpu_usage = 3*default_max_block_cpu_usage/4;
69const static uint32_t default_min_transaction_cpu_usage = 100;
70const static uint32_t default_subjective_cpu_leeway_us = 31000;
72const static uint32_t default_max_trx_lifetime = 60*60;
73const static uint32_t default_deferred_trx_expiration_window = 10*60;
74const static uint32_t default_max_trx_delay = 45*24*3600;
75const static uint32_t default_max_inline_action_size = 512 * 1024;
76const static uint16_t default_max_inline_action_depth = 4;
77const static uint16_t default_max_auth_depth = 6;
78const static uint32_t default_sig_cpu_bill_pct = 50 * percent_1;
79const static uint32_t default_block_cpu_effort_pct = 80 * percent_1;
80const static uint16_t default_controller_thread_pool_size = 2;
81const static uint32_t default_max_variable_signature_length = 16384u;
82const static uint32_t default_max_nonprivileged_inline_action_size = 4 * 1024;
83const static uint32_t default_max_action_return_value_size = 256;
85const static uint32_t default_max_transaction_finality_status_success_duration_sec = 180;
86const static uint32_t default_max_transaction_finality_status_failure_duration_sec = 180;
88static_assert(
MAX_SIZE_OF_BYTE_ARRAYS == 20*1024*1024,
"Changing MAX_SIZE_OF_BYTE_ARRAYS breaks consensus. Make sure this is expected");
90const static uint32_t default_max_wasm_mutable_global_bytes = 1024;
91const static uint32_t default_max_wasm_table_elements = 1024;
92const static uint32_t default_max_wasm_section_elements = 8192;
93const static uint32_t default_max_wasm_linear_memory_init = 64*1024;
94const static uint32_t default_max_wasm_func_local_bytes = 8192;
95const static uint32_t default_max_wasm_nested_structures = 1024;
96const static uint32_t default_max_wasm_symbol_bytes = 8192;
97const static uint32_t default_max_wasm_module_bytes = 20*1024*1024;
98const static uint32_t default_max_wasm_code_bytes = 20*1024*1024;
99const static uint32_t default_max_wasm_pages = 528;
100const static uint32_t default_max_wasm_call_depth = 251;
102const static uint32_t min_net_usage_delta_between_base_and_max_for_trx = 10*1024;
106const static uint32_t fixed_net_overhead_of_packed_trx = 16;
108const static uint32_t fixed_overhead_shared_vector_ram_bytes = 16;
109const static uint32_t overhead_per_row_per_index_ram_bytes = 32;
110const static uint32_t overhead_per_account_ram_bytes = 2*1024;
111const static uint32_t setcode_ram_bytes_multiplier = 10;
113const static uint32_t hashing_checktime_block_size = 10*1024;
115#ifdef SYSIO_SYS_VM_JIT_RUNTIME_ENABLED
121const static uint32_t default_abi_serializer_max_time_us = 15*1000;
126const static int producer_repetitions = 12;
127const static int max_producers = 125;
129const static size_t maximum_tracked_dpos_confirmations = 1024;
130static_assert(maximum_tracked_dpos_confirmations >= ((max_producers * 2 / 3) + 1) * producer_repetitions,
"Settings never allow for DPOS irreversibility" );
139const static int irreversible_threshold_percent= 70 * percent_1;
141const static uint64_t billable_alignment = 16;
153 return (
value * percentage) / sysio::chain::config::percent_100;
156template<
typename Number>
158 return ((
value * percentage) + sysio::chain::config::percent_100 - sysio::chain::config::percent_1) / sysio::chain::config::percent_100;
constexpr uint64_t SYS_PERCENT(uint64_t value, uint32_t percentage)
Number SYS_PERCENT_CEIL(Number value, uint32_t percentage)
constexpr uint64_t billable_size_v
unsigned __int64 uint64_t
Immutable except for fc::from_variant.
#define MAX_SIZE_OF_BYTE_ARRAYS