This repository has been archived by the owner on Nov 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chainspec.toml
159 lines (153 loc) · 8.38 KB
/
chainspec.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
[genesis]
# Human readable name for convenience; the genesis_hash is the true identifier. The name influences the genesis hash by
# contributing to the seeding of the pseudo-random number generator used in contract-runtime for computing genesis
# post-state hash.
name = 'casper-example'
# Timestamp for the genesis block, also used in seeding the pseudo-random number generator used in contract-runtime for
# computing genesis post-state hash.
timestamp = '2020-10-01T00:00:01Z'
# Protocol version at genesis.
protocol_version = '1.0.0'
# Path (absolute, or relative to this chainspec.toml) to the file containing wasm bytecode for installing the mint
# system contract.
mint_installer_path = '../../target/wasm32-unknown-unknown/release/mint_install.wasm'
# Path (absolute, or relative to this chainspec.toml) to the file containing wasm bytecode for installing the Proof of
# Stake system contract.
pos_installer_path = '../../target/wasm32-unknown-unknown/release/pos_install.wasm'
# Path (absolute, or relative to this chainspec.toml) to the file containing wasm bytecode for installing the Standard
# Payment system contract.
standard_payment_installer_path = '../../target/wasm32-unknown-unknown/release/standard_payment_install.wasm'
# Path (absolute, or relative to this chainspec.toml) to the file containing wasm bytecode for installing the Auction
# system contract.
auction_installer_path = '../../target/wasm32-unknown-unknown/release/auction_install.wasm'
# Path (absolute, or relative to this chainspec.toml) to the CSV file containing initial account balances and bonds.
accounts_path = 'accounts.csv'
# Number of slots available in validator auction.
validator_slots = 5
[highway]
# Tick unit is milliseconds.
#
# Timestamp for the genesis era. At least one node has to be started when the genesis era is active in order to make
# key blocks for the upcoming eras. If the era is over by the time we start the nodes, they'll not be able to produce
# blocks in it, and there won't be a new era build either. That means when a completely new network is started, the
# genesis era start time has to be adjusted to be active at the time.
genesis_era_start_timestamp = '2020-10-01T00:00:01Z'
# Era duration.
era_duration = '41seconds'
# Minimum number of blocks per era. An era will take longer than `era_duration` if that is necessary to reach the
# minimum height.
minimum_era_height = 10
# Amount of time to go back before the start of the era for picking the booking block.
booking_duration = '10days'
# Amount of time to wait after the booking before we pick the key block, collecting the magic bits along the way.
entropy_duration = '3hours'
# Keep voting on the switch block for a fixed amount of time; effective if the summit level is zero.
voting_period_duration = '2days'
# Integer between 1 and 99 representing the fault tolerance threshold as a percentage, used by the internal finalizer.
# It is the percentage of validators that would need to equivocate to make two honest nodes see two conflicting
# blocks as finalized: A higher value F makes it safer to rely on finalized blocks. It also makes it more difficult to
# finalize blocks, however, and requires at least 50% + F/2 validators to be working correctly.
finality_threshold_percent = 10
# Integer between 0 and 255. The power of two that is the number of milliseconds in the minimum round length, and
# therefore the minimum delay between a block and its child. E.g. 14 means 2^14 milliseconds, i.e. about 16 seconds.
minimum_round_exponent = 12
[deploys]
# The maximum number of Motes allowed to be spent during payment. 0 means unlimited.
max_payment_cost = '0'
# The duration after the deploy timestamp that it can be included in a block.
max_ttl = '1day'
# The maximum number of other deploys a deploy can depend on (require to have been executed before it can execute).
max_dependencies = 10
# Maximum block size in bytes. 0 means unlimited.
max_block_size = 10_485_760
# The maximum number of deploys permitted in a single block.
block_max_deploy_count = 10
# The upper limit of total gas of all deploys in a block.
block_gas_limit = 10_000_000_000_000
[wasm_config]
# Amount of free memory (in 64kB pages) each contract can use for stack.
initial_memory = 64
# Max stack height (native WebAssembly stack limiter).
max_stack_height = 65_536
[wasm_config.storage_costs]
# Gas charged per byte stored in the global state.
gas_per_byte = 630_000_000
[wasm_config.opcode_costs]
# Bit operations multiplier.
bit = 1
# Arithmetic add operations multiplier.
add = 1
# Mul operations multiplier.
mul = 1
# Div operations multiplier.
div = 2
# Memory load operation multiplier.
load = 1
# Memory store operation multiplier.
store = 1
# Const store operation multiplier.
const = 1
# Local operations multiplier.
local = 1
# Global operations multiplier.
global = 1
# Control flow operations multiplier.
control_flow = 1
# Integer operations multiplier.
integer_comparsion = 1
# Conversion operations multiplier.
conversion = 1
# Unreachable operation multiplier.
unreachable = 1
# Nop operation multiplier.
nop = 1
# Get current memory operation multiplier.
current_memory = 23
# Grow memory cost, per page (64kb)
grow_memory = 240_000_000
# Regular opcode cost
regular = 210_000
# Host function declarations are located in smart_contracts/contract/src/ext_ffi.rs
[wasm_config.host_function_costs]
add = { cost = 5_800_000, arguments = [0, 1, 2, 3] }
add_associated_key = { cost = 9_000_000, arguments = [0, 1, 2, 3] }
add_contract_version = { cost = 200_000_000, arguments = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] } # Not instrumented yet, assuming a sufficiently large number
add_local = { cost = 4_700_000, arguments = [0, 1, 2, 3] }
call_contract = { cost = 4_500_000, arguments = [0, 1, 2, 3, 4, 5, 6] }
call_versioned_contract = { cost = 4_500_000, arguments = [0, 1, 2, 3, 4, 5, 6, 7, 8] } # Not instrumented yet, assuming the same as call_contract
create_contract_package_at_hash = { cost = 200_000_000, arguments = [0, 1] } # Not instrumented yet, assuming a sufficiently large number
create_contract_user_group = { cost = 200_000_000, arguments = [0, 1, 2, 3, 4, 5, 6, 7] } # Not instrumented yet, assuming a sufficiently large number
create_purse = { cost = 170_000_000, arguments = [0, 1] }
disable_contract_version = { cost = 200_000_000, arguments = [0, 1, 2, 3] } # Not instrumented yet, assuming a sufficiently large number
get_balance = { cost = 3_800_000, arguments = [0, 1, 2] }
get_blocktime = { cost = 330_000, arguments = [0] }
get_caller = { cost = 380_000, arguments = [0] }
get_key = { cost = 2_000_000, arguments = [0, 1, 2, 3, 4] }
get_main_purse = { cost = 1_300_000, arguments = [0] }
get_named_arg = { cost = 2_500_000, arguments = [0, 1, 2, 3] }
get_named_arg_size = { cost = 450_000, arguments = [0, 1, 2] }
get_phase = { cost = 710_000, arguments = [0] }
get_system_contract = { cost = 1_100_000, arguments = [0, 1, 2] }
has_key = { cost = 1_500_000, arguments = [0, 1] }
is_valid_uref = { cost = 760_000, arguments = [0, 1] }
load_named_keys = { cost = 42_000_000, arguments = [0, 1] }
new_uref = { cost = 17_000_000, arguments = [0, 1, 2] }
print = { cost = 20_000_000, arguments = [0, 1] }
provision_contract_user_group_uref = { cost = 200_000_000, arguments = [0,1,2,3,4] } # Not instrumented yet, assuming a sufficiently large number
put_key = { cost = 38_000_000, arguments = [0, 1] }
read_host_buffer = { cost = 3_500_000, arguments = [0, 1, 2] }
read_value = { cost = 6_000_000, arguments = [0, 1, 0] }
read_value_local = { cost = 5_500_000, arguments = [0, 1, 0] }
remove_associated_key = { cost = 4_200_000, arguments = [0, 1] }
remove_contract_user_group = { cost = 200_000_000, arguments = [0, 1, 2, 3] } # Not instrumented yet, assuming a sufficiently large number
remove_contract_user_group_urefs = { cost = 200_000_000, arguments = [0,1,2,3,4,5] } # Not instrumented yet, assuming a sufficiently large number
remove_key = { cost = 61_000_000, arguments = [0, 1] }
ret = { cost = 23_000_000, arguments = [0, 1] }
revert = { cost = 500_000, arguments = [0] }
set_action_threshold = { cost = 74_000_000, arguments = [0, 1] }
transfer_from_purse_to_account = { cost = 160_000_000, arguments = [0, 1, 2, 3, 4, 5] }
transfer_from_purse_to_purse = { cost = 82_000_000, arguments = [0, 1, 2, 3, 4, 5] }
transfer_to_account = { cost = 24_000_000, arguments = [0, 1, 2, 3] }
update_associated_key = { cost = 4_200_000, arguments = [0, 1, 2] }
write = { cost = 14_000_000, arguments = [0, 1, 0, 2] }
write_local = { cost = 9_500_000, arguments = [0, 1, 2, 3] }