Перейти к основному содержимому

Конфигурация генезиса

EXPERIMENTAL_genesis_config — тип запроса.

Этот эндпоинт позволяет получить конфигурацию генезиса блокчейна NEAR.

Сеть
API-ключ FastNearНет сохранённого ключа
Получить API-ключ
Эндпоинтhttps://rpc.mainnet.fastnear.com
Авторизацияне обнаружена
Живой ответ

Ответы от выбранного эндпоинта появляются здесь после запуска запроса.

Здесь появится вывод живого ответа после запуска запроса.

Справка по запросу

application/json

Эта операция принимает JSON-RPC тело через POST на /.

Обязательные входные данные запроса: да

{
  "jsonrpc": "2.0",
  "id": "fastnear",
  "method": "genesis_config",
  "params": []
}

Схема запроса

object
требует jsonrpc, id, method, params
jsonrpc *string
2.0
id *string

Пример: fastnear

method *string
genesis_config
params *array

Empty array as this method takes no parameters

Пример:

Справка по ответу

200 application/json

Успешный ответ

Схема ответа

objectJsonRpcResponse
требует jsonrpc, id
jsonrpc *string
2.0
id *один из
stringnumber
resultobject
требует protocol_version, genesis_time, chain_id, genesis_height, num_block_producer_seats, num_block_producer_seats_per_shard, avg_hidden_validator_seats_per_shard, dynamic_resharding, epoch_length, gas_limit, min_gas_price, max_gas_price, block_producer_kickout_threshold, chunk_producer_kickout_threshold, gas_price_adjustment_rate, валидаторы, transaction_validity_period, protocol_reward_rate, max_inflation_rate, total_supply, num_blocks_per_year, protocol_treasury_account, fishermen_threshold
avg_hidden_validator_seats_per_shard *array

Expected number of hidden валидаторы per шард.

itemsinteger
block_producer_kickout_threshold *integer

Threshold for kicking out блока producers, between 0 and 100.

chain_id *string

ID of the блокчейн. This must be unique for every блокчейн. If your testnet blockchains do not have unique chain IDs, you will have a bad time.

chunk_producer_assignment_changes_limitinteger

Limits the number of шард changes in chunk producer assignments, if algorithm is able to choose assignment with better balance of number of chunk producers for shards.

Значение по умолчанию: 5

chunk_producer_kickout_threshold *integer

Threshold for kicking out chunk producers, between 0 and 100.

chunk_validator_only_kickout_thresholdinteger

Threshold for kicking out nodes which are only chunk валидаторы, between 0 and 100.

Значение по умолчанию: 80

dynamic_resharding *boolean

Enable dynamic re-sharding.

epoch_length *integer

Epoch length counted in блока heights.

fishermen_threshold *string

Amount in yoctoNEAR

gas_limit *string

Газ amount

gas_price_adjustment_rate *array

Газ price adjustment rate

itemsinteger
genesis_height *integer

Height of genesis блока.

genesis_time *string

Official time of блокчейн start.

max_gas_price *string

Amount in yoctoNEAR

max_inflation_rate *array

Maximum inflation on the total supply every epoch.

itemsinteger
max_kickout_stake_percinteger

Max stake percentage of the валидаторы we will kick out.

Значение по умолчанию: 100

min_gas_price *string

Amount in yoctoNEAR

minimum_stake_divisorinteger

The minimum stake required for стейкинг is last seat price divided by this number.

Значение по умолчанию: 10

minimum_stake_ratioarray

The lowest ratio s/s_total any блока producer can have. See <https://github.com/near/NEPs/pull/167> for details

itemsinteger
minimum_validators_per_shardinteger

The minimum number of валидаторы each шард must have

Значение по умолчанию: 1

num_block_producer_seats *integer

Number of блока producer seats at genesis.

num_block_producer_seats_per_shard *array

Defines number of shards and number of блока producer seats per each shard at genesis. Note: not used with protocol_feature_chunk_only_producers -- replaced by minimum_validators_per_shard Note: not used before as all блока producers produce chunks for all shards

itemsinteger
num_blocks_per_year *integer

Expected number of блоки per year

num_chunk_only_producer_seatsinteger

Deprecated.

Значение по умолчанию: 300

num_chunk_producer_seatsinteger

Number of chunk producers. Don't mess it up with chunk-only producers feature which is deprecated.

Значение по умолчанию: 100

num_chunk_validator_seatsinteger

Значение по умолчанию: 300

online_max_thresholdarray

Online maximum threshold above which валидатора gets full reward.

itemsinteger
online_min_thresholdarray

Online minimum threshold below which валидатора doesn't receive reward.

itemsinteger
protocol_reward_rate *array

Протокол treasury rate

itemsinteger
protocol_treasury_account *string

NEAR аккаунта ID

protocol_upgrade_stake_thresholdarray

Threshold of stake that needs to indicate that they ready for upgrade.

itemsinteger
protocol_version *integer

Протокол version that this genesis works with.

shard_layoutobject

One of multiple possible types

Значение по умолчанию: [object Object]

shuffle_shard_assignment_for_chunk_producersboolean

If true, shuffle the chunk producers across shards. In other words, if the шард assignments were [S_0, S_1, S_2, S_3] where S_i represents the set of chunk producers for шард i, if this flag were true, the шард assignments might become, for example, [S_2, S_0, S_3, S_1].

Значение по умолчанию: false

target_validator_mandates_per_shardinteger

Number of target chunk валидатора mandates for each shard.

Значение по умолчанию: 68

total_supply *string

Amount in yoctoNEAR

transaction_validity_period *integer

Number of блоки for which a given транзакции is valid

use_production_configboolean

Используется только для тестов. Мы жёстко задаём часть конфигурации для mainnet и testnet в AllEpochConfig, и нам нужен способ протестировать этот путь в коде. Для этого и служит этот флаг. Если установить true, нода будет использовать тот же путь переопределения конфигурации, что и mainnet и testnet.

Значение по умолчанию: false

валидаторы *array

List of initial валидаторы.

itemsobject

Аккаунт info for validators

errorobject
кодinteger
messagestring
dataobject