Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::genesis_state Struct Reference

#include <genesis_state.hpp>

Collaboration diagram for sysio::chain::genesis_state:

Public Member Functions

 genesis_state ()
 
chain_id_type compute_chain_id () const
 

Public Attributes

chain_config_v0 initial_configuration
 
time_point initial_timestamp
 
public_key_type initial_key
 

Static Public Attributes

static const string sysio_root_key
 
static constexpr wasm_config default_initial_wasm_configuration
 

Friends

bool operator== (const genesis_state &lhs, const genesis_state &rhs)
 
bool operator!= (const genesis_state &lhs, const genesis_state &rhs)
 

Detailed Description

Definition at line 14 of file genesis_state.hpp.

Constructor & Destructor Documentation

◆ genesis_state()

sysio::chain::genesis_state::genesis_state ( )

Definition at line 7 of file genesis_state.cpp.

7 {
8 initial_timestamp = fc::time_point::from_iso_string( "2018-06-01T12:00:00" );
10}
static time_point from_iso_string(const fc::string &s)
Definition time.cpp:67
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition variant.hpp:191
T as() const
Definition variant.hpp:327
fc::crypto::public_key public_key_type
Definition types.hpp:76
static const string sysio_root_key
Here is the call graph for this function:

Member Function Documentation

◆ compute_chain_id()

chain::chain_id_type sysio::chain::genesis_state::compute_chain_id ( ) const

Get the chain_id corresponding to this genesis state.

This is the SHA256 serialization of the genesis_state.

Definition at line 12 of file genesis_state.cpp.

12 {
13 digest_type::encoder enc;
14 fc::raw::pack( enc, *this );
15 return chain_id_type{enc.result()};
16}
void pack(Stream &s, const std::deque< T > &value)
Definition raw.hpp:531
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const genesis_state & lhs,
const genesis_state & rhs )
friend

Definition at line 70 of file genesis_state.hpp.

70{ return !(lhs == rhs); }

◆ operator==

bool operator== ( const genesis_state & lhs,
const genesis_state & rhs )
friend

Definition at line 65 of file genesis_state.hpp.

65 {
66 return std::tie( lhs.initial_configuration, lhs.initial_timestamp, lhs.initial_key )
67 == std::tie( rhs.initial_configuration, rhs.initial_timestamp, rhs.initial_key );
68 };

Member Data Documentation

◆ default_initial_wasm_configuration

wasm_config sysio::chain::genesis_state::default_initial_wasm_configuration
staticconstexpr
Initial value:
{
.max_mutable_global_bytes = config::default_max_wasm_mutable_global_bytes,
.max_table_elements = config::default_max_wasm_table_elements,
.max_section_elements = config::default_max_wasm_section_elements,
.max_linear_memory_init = config::default_max_wasm_linear_memory_init,
.max_func_local_bytes = config::default_max_wasm_func_local_bytes,
.max_nested_structures = config::default_max_wasm_nested_structures,
.max_symbol_bytes = config::default_max_wasm_symbol_bytes,
.max_module_bytes = config::default_max_wasm_module_bytes,
.max_code_bytes = config::default_max_wasm_code_bytes,
.max_pages = config::default_max_wasm_pages,
.max_call_depth = config::default_max_wasm_call_depth
}

Definition at line 41 of file genesis_state.hpp.

41 {
42 .max_mutable_global_bytes = config::default_max_wasm_mutable_global_bytes,
43 .max_table_elements = config::default_max_wasm_table_elements,
44 .max_section_elements = config::default_max_wasm_section_elements,
45 .max_linear_memory_init = config::default_max_wasm_linear_memory_init,
46 .max_func_local_bytes = config::default_max_wasm_func_local_bytes,
47 .max_nested_structures = config::default_max_wasm_nested_structures,
48 .max_symbol_bytes = config::default_max_wasm_symbol_bytes,
49 .max_module_bytes = config::default_max_wasm_module_bytes,
50 .max_code_bytes = config::default_max_wasm_code_bytes,
51 .max_pages = config::default_max_wasm_pages,
52 .max_call_depth = config::default_max_wasm_call_depth
53 };

◆ initial_configuration

chain_config_v0 sysio::chain::genesis_state::initial_configuration
Initial value:
= {
.max_block_net_usage = config::default_max_block_net_usage,
.target_block_net_usage_pct = config::default_target_block_net_usage_pct,
.max_transaction_net_usage = config::default_max_transaction_net_usage,
.base_per_transaction_net_usage = config::default_base_per_transaction_net_usage,
.net_usage_leeway = config::default_net_usage_leeway,
.context_free_discount_net_usage_num = config::default_context_free_discount_net_usage_num,
.context_free_discount_net_usage_den = config::default_context_free_discount_net_usage_den,
.max_block_cpu_usage = config::default_max_block_cpu_usage,
.target_block_cpu_usage_pct = config::default_target_block_cpu_usage_pct,
.max_transaction_cpu_usage = config::default_max_transaction_cpu_usage,
.min_transaction_cpu_usage = config::default_min_transaction_cpu_usage,
.max_transaction_lifetime = config::default_max_trx_lifetime,
.deferred_trx_expiration_window = config::default_deferred_trx_expiration_window,
.max_transaction_delay = config::default_max_trx_delay,
.max_inline_action_size = config::default_max_inline_action_size,
.max_inline_action_depth = config::default_max_inline_action_depth,
.max_authority_depth = config::default_max_auth_depth,
}

Definition at line 19 of file genesis_state.hpp.

19 {
20 .max_block_net_usage = config::default_max_block_net_usage,
21 .target_block_net_usage_pct = config::default_target_block_net_usage_pct,
22 .max_transaction_net_usage = config::default_max_transaction_net_usage,
23 .base_per_transaction_net_usage = config::default_base_per_transaction_net_usage,
24 .net_usage_leeway = config::default_net_usage_leeway,
25 .context_free_discount_net_usage_num = config::default_context_free_discount_net_usage_num,
26 .context_free_discount_net_usage_den = config::default_context_free_discount_net_usage_den,
27
28 .max_block_cpu_usage = config::default_max_block_cpu_usage,
29 .target_block_cpu_usage_pct = config::default_target_block_cpu_usage_pct,
30 .max_transaction_cpu_usage = config::default_max_transaction_cpu_usage,
31 .min_transaction_cpu_usage = config::default_min_transaction_cpu_usage,
32
33 .max_transaction_lifetime = config::default_max_trx_lifetime,
34 .deferred_trx_expiration_window = config::default_deferred_trx_expiration_window,
35 .max_transaction_delay = config::default_max_trx_delay,
36 .max_inline_action_size = config::default_max_inline_action_size,
37 .max_inline_action_depth = config::default_max_inline_action_depth,
38 .max_authority_depth = config::default_max_auth_depth,
39 };

◆ initial_key

public_key_type sysio::chain::genesis_state::initial_key

Definition at line 56 of file genesis_state.hpp.

◆ initial_timestamp

time_point sysio::chain::genesis_state::initial_timestamp

Definition at line 55 of file genesis_state.hpp.

◆ sysio_root_key

const string sysio::chain::genesis_state::sysio_root_key
static

Definition at line 17 of file genesis_state.hpp.


The documentation for this struct was generated from the following files: