---
title: "Genesis Configuration"
method: POST
path: "/genesis_config"
---

# Genesis Configuration

`POST /genesis_config`

Get initial state and parameters for the genesis block

## Request body

- JsonRpcRequestForGenesisConfig
  - `id` string, required
  - `jsonrpc` string, required
  - `method` 'genesis_config', required
  - `params` unknown, required

## Response `200`

- union
  - object
    - `result` GenesisConfig, required
      - `avg_hidden_validator_seats_per_shard` integer[], required — Expected number of hidden validators per shard.
      - `block_producer_kickout_threshold` integer, required — Threshold for kicking out block producers, between 0 and 100.
      - `chain_id` string, required — 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_limit` integer — 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.
      - `chunk_producer_kickout_threshold` integer, required — Threshold for kicking out chunk producers, between 0 and 100.
      - `chunk_validator_only_kickout_threshold` integer — Threshold for kicking out nodes which are only chunk validators, between 0 and 100.
      - `dynamic_resharding` boolean, required — Enable dynamic re-sharding.
      - `epoch_length` integer, required — Epoch length counted in block heights.
      - `fishermen_threshold` string, required
      - `gas_limit` integer, required
      - `gas_price_adjustment_rate` integer[], required — Gas price adjustment rate
      - `genesis_height` integer, required — Height of genesis block.
      - `genesis_time` string, date-time, required — Official time of blockchain start.
      - `max_gas_price` string, required
      - `max_inflation_rate` integer[], required — Maximum inflation on the total supply every epoch.
      - `max_kickout_stake_perc` integer — Max stake percentage of the validators we will kick out.
      - `min_gas_price` string, required
      - `minimum_stake_divisor` integer — The minimum stake required for staking is last seat price divided by this number.
      - `minimum_stake_ratio` integer[] — The lowest ratio s/s_total any block producer can have. See <https://github.com/near/NEPs/pull/167> for details
      - `minimum_validators_per_shard` integer — The minimum number of validators each shard must have
      - `num_block_producer_seats` integer, required — Number of block producer seats at genesis.
      - `num_block_producer_seats_per_shard` integer[], required — 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
      - `num_blocks_per_year` integer, required — Expected number of blocks per year
      - `num_chunk_only_producer_seats` integer — Deprecated.
      - `num_chunk_producer_seats` integer — Number of chunk producers. Don't mess it up with chunk-only producers feature which is deprecated.
      - `num_chunk_validator_seats` integer
      - `online_max_threshold` integer[] — Online maximum threshold above which validator gets full reward.
      - `online_min_threshold` integer[] — Online minimum threshold below which validator doesn't receive reward.
      - `protocol_reward_rate` integer[], required — Protocol treasury rate
      - `protocol_treasury_account` string, required — NEAR Account Identifier. This is a unique, syntactically valid, human-readable account identifier on the NEAR network. [See the crate-level docs for information about validation.](index.html#account-id-rules) Also see [Error kind precedence](AccountId#error-kind-precedence). ## Examples ``` use near_account_id::AccountId; let alice: AccountId = "alice.near".parse().unwrap(); assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
      - `protocol_upgrade_stake_threshold` integer[] — Threshold of stake that needs to indicate that they ready for upgrade.
      - `protocol_version` integer, required — Protocol version that this genesis works with.
      - `shard_layout` union — A versioned struct that contains all information needed to assign accounts to shards. Because of re-sharding, the chain may use different shard layout to split shards at different times. Currently, `ShardLayout` is stored as part of `EpochConfig`, which is generated each epoch given the epoch protocol version. In mainnet/testnet, we use two shard layouts since re-sharding has only happened once. It is stored as part of genesis config, see default_simple_nightshade_shard_layout() Below is an overview for some important functionalities of ShardLayout interface.
        - ShardLayoutVariant0
          - `V0` ShardLayoutV0, required — A shard layout that maps accounts evenly across all shards -- by calculate the hash of account id and mod number of shards. This is added to capture the old `account_id_to_shard_id` algorithm, to keep backward compatibility for some existing tests. `parent_shards` for `ShardLayoutV1` is always `None`, meaning it can only be the first shard layout a chain uses.
            - `num_shards` integer, required — Map accounts evenly across all shards
            - `version` integer, required — Version of the shard layout, this is useful for uniquely identify the shard layout
        - ShardLayoutVariant1
          - `V1` ShardLayoutV1, required
            - `boundary_accounts` AccountId[], required — The boundary accounts are the accounts on boundaries between shards. Each shard contains a range of accounts from one boundary account to another - or the smallest or largest account possible. The total number of shards is equal to the number of boundary accounts plus 1.
            - `shards_split_map` array[], nullable — Maps shards from the last shard layout to shards that it splits to in this shard layout, Useful for constructing states for the shards. None for the genesis shard layout
              - …
            - `to_parent_shard_map` ShardId[], nullable — Maps shard in this shard layout to their parent shard Since shard_ids always range from 0 to num_shards - 1, we use vec instead of a hashmap
            - `version` integer, required — Version of the shard layout, this is useful for uniquely identify the shard layout
        - ShardLayoutVariant2
          - `V2` ShardLayoutV2, required — Counterpart to `ShardLayoutV2` composed of maps with string keys to aid serde serialization.
            - `boundary_accounts` AccountId[], required
            - `id_to_index_map` object, required
            - `index_to_id_map` object, required
            - `shard_ids` ShardId[], required
            - `shards_parent_map` object, nullable
            - `shards_split_map` object, nullable
            - `version` integer, required
        - ShardLayoutVariant3
          - `V3` ShardLayoutV3, required — Counterpart to `ShardLayoutV3` composed of maps with string keys to aid serde serialization.
            - `boundary_accounts` AccountId[], required
            - `id_to_index_map` object, required
            - `last_split` integer, required — The shard identifier. It may be an arbitrary number - it does not need to be a number in the range 0..NUM_SHARDS. The shard ids do not need to be sequential or contiguous. The shard id is wrapped in a new type to prevent the old pattern of using indices in range 0..NUM_SHARDS and casting to ShardId. Once the transition if fully complete it potentially may be simplified to a regular type alias.
            - `shard_ids` ShardId[], required
            - `shards_split_map` object, required
      - `shuffle_shard_assignment_for_chunk_producers` boolean — 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]`.
      - `target_validator_mandates_per_shard` integer — Number of target chunk validator mandates for each shard.
      - `total_supply` string, required
      - `transaction_validity_period` integer, required — Number of blocks for which a given transaction is valid
      - `use_production_config` boolean — 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.
      - `validators` AccountInfo[], required — List of initial validators.
        - `account_id` string, required — NEAR Account Identifier. This is a unique, syntactically valid, human-readable account identifier on the NEAR network. [See the crate-level docs for information about validation.](index.html#account-id-rules) Also see [Error kind precedence](AccountId#error-kind-precedence). ## Examples ``` use near_account_id::AccountId; let alice: AccountId = "alice.near".parse().unwrap(); assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
        - `amount` string, required
        - `public_key` string, required
    - `id` string, required
    - `jsonrpc` string, required
  - object
    - `error` union, required
      - ErrorWrapperForGenesisConfigErrorVariant0
        - `cause` union, required
          - RpcRequestValidationErrorKindVariant0
            - `info` object, required
              - …
            - `name` 'METHOD_NOT_FOUND', required
          - RpcRequestValidationErrorKindVariant1
            - `info` object, required
              - …
            - `name` 'PARSE_ERROR', required
        - `name` 'REQUEST_VALIDATION_ERROR', required
      - ErrorWrapperForGenesisConfigErrorVariant1
        - `cause` unknown, required
        - `name` 'HANDLER_ERROR', required
      - ErrorWrapperForGenesisConfigErrorVariant2
        - `cause` InternalError, required
          - `info` object, required
            - `error_message` string, required
          - `name` 'INTERNAL_ERROR', required
        - `name` 'INTERNAL_ERROR', required
    - `id` string, required
    - `jsonrpc` string, required

---

[API](https://skmtc.net/near/apis/near-protocol-json-rpc-api-2.md) · [All operations](https://skmtc.net/near/apis/near-protocol-json-rpc-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/near/near-protocol-json-rpc-api-2/versions/2985730b17e5/schema)
