Skip to main content

Genesis Config

EXPERIMENTAL_genesis_config request type

This endpoint allows you to get the genesis configuration of the NEAR blockchain.

Network
FastNear API keyNo saved key
Get API key
Endpointhttps://rpc.mainnet.fastnear.com
Authnone detected
Live Response

Responses from the selected endpoint appear here after you run a request.

Live response output will appear here after you run a request.

Request reference

application/json

This operation accepts a JSON-RPC body over POST to /.

Required request inputs: yes

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

Request schema

object
requires jsonrpc, id, method, params
jsonrpc *string
2.0
id *string

Example: fastnear

method *string
genesis_config
params *array

Empty array as this method takes no parameters

Example:

Response reference

200 application/json

Successful response

Response schema

objectJsonRpcResponse
requires jsonrpc, id
jsonrpc *string
2.0
id *one of
stringnumber
resultobject
requires 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, validators, 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 validators per shard.

itemsinteger
block_producer_kickout_threshold *integer

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

chain_id *string

ID of the blockchain. This must be unique for every blockchain. 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 shard changes in chunk producer assignments, if algorithm is able to choose assignment with better balance of number of chunk producers for shards.

Default: 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 validators, between 0 and 100.

Default: 80

dynamic_resharding *boolean

Enable dynamic re-sharding.

epoch_length *integer

Epoch length counted in block heights.

fishermen_threshold *string

Amount in yoctoNEAR

gas_limit *string

Gas amount

gas_price_adjustment_rate *array

Gas price adjustment rate

itemsinteger
genesis_height *integer

Height of genesis block.

genesis_time *string

Official time of blockchain 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 validators we will kick out.

Default: 100

min_gas_price *string

Amount in yoctoNEAR

minimum_stake_divisorinteger

The minimum stake required for staking is last seat price divided by this number.

Default: 10

minimum_stake_ratioarray

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

itemsinteger
minimum_validators_per_shardinteger

The minimum number of validators each shard must have

Default: 1

num_block_producer_seats *integer

Number of block producer seats at genesis.

num_block_producer_seats_per_shard *array

Defines number of shards and number of block 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 block producers produce chunks for all shards

itemsinteger
num_blocks_per_year *integer

Expected number of blocks per year

num_chunk_only_producer_seatsinteger

Deprecated.

Default: 300

num_chunk_producer_seatsinteger

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

Default: 100

num_chunk_validator_seatsinteger

Default: 300

online_max_thresholdarray

Online maximum threshold above which validator gets full reward.

itemsinteger
online_min_thresholdarray

Online minimum threshold below which validator doesn't receive reward.

itemsinteger
protocol_reward_rate *array

Protocol treasury rate

itemsinteger
protocol_treasury_account *string

NEAR account ID

protocol_upgrade_stake_thresholdarray

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

itemsinteger
protocol_version *integer

Protocol version that this genesis works with.

shard_layoutobject

One of multiple possible types

Default: [object Object]

shuffle_shard_assignment_for_chunk_producersboolean

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

Default: false

target_validator_mandates_per_shardinteger

Number of target chunk validator mandates for each shard.

Default: 68

total_supply *string

Amount in yoctoNEAR

transaction_validity_period *integer

Number of blocks for which a given transaction is valid

use_production_configboolean

This is only for test purposes. We hard code some configs for mainnet and testnet in AllEpochConfig, and we want to have a way to test that code path. This flag is for that. If set to true, the node will use the same config override path as mainnet and testnet.

Default: false

validators *array

List of initial validators.

itemsobject

Account info for validators

errorobject
codeinteger
messagestring
dataobject