NEAR Protocol EXPERIMENTAL Protocol Config API

The EXPERIMENTAL Protocol Config API from NEAR Protocol — 1 operation(s) for experimental protocol config.

OpenAPI Specification

near-experimental-protocol-config-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  description: Low-latency indexed account, token, and public-key lookup APIs for wallets and explorers. Embedded portal clients may forward an optional `apiKey` query parameter, but the public FastNEAR API does not require it.
  title: FastNEAR accounts EXPERIMENTAL Protocol Config API
  version: 3.0.3
servers:
- description: Mainnet
  url: https://api.fastnear.com
- description: Testnet
  url: https://test.api.fastnear.com
tags:
- name: EXPERIMENTAL Protocol Config
paths:
  /EXPERIMENTAL_protocol_config:
    post:
      description: A configuration that defines the protocol-level parameters such as gas/storage costs, limits, feature flags, other settings
      operationId: EXPERIMENTAL_protocol_config
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequest_for_EXPERIMENTAL_protocol_config'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponse_for_RpcProtocolConfigResponse_and_RpcProtocolConfigError'
      tags:
      - EXPERIMENTAL Protocol Config
components:
  schemas:
    AccountIdValidityRulesVersion:
      format: uint8
      maximum: 255
      minimum: 0
      type: integer
    NearToken:
      type: string
    ActionCreationConfigView:
      description: Describes the cost of creating a specific action, `Action`. Includes all variants.
      properties:
        add_key_cost:
          allOf:
          - $ref: '#/components/schemas/AccessKeyCreationConfigView'
          description: Base cost of adding a key.
        create_account_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Base cost of creating an account.
        delegate_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: 'Base cost for processing a delegate action.


            This is on top of the costs for the actions inside the delegate action.'
        delete_account_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Base cost of deleting an account.
        delete_key_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Base cost of deleting a key.
        deploy_contract_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Base cost of deploying a contract.
        deploy_contract_cost_per_byte:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Cost per byte of deploying a contract.
        function_call_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Base cost of calling a function.
        function_call_cost_per_byte:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Cost per byte of method name and arguments of calling a function.
        stake_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Base cost of staking.
        transfer_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Base cost of making a transfer.
      type: object
    AccountCreationConfigView:
      description: The structure describes configuration for creation of new accounts.
      properties:
        min_allowed_top_level_account_length:
          description: The minimum length of the top-level account ID that is allowed to be created by any account.
          format: uint8
          maximum: 255
          minimum: 0
          type: integer
        registrar_account_id:
          allOf:
          - $ref: '#/components/schemas/AccountId'
          description: 'The account ID of the account registrar. This account ID allowed to create top-level

            accounts of any valid length.'
      type: object
    ShardLayoutV2:
      description: 'Counterpart to `ShardLayoutV2` composed of maps with string keys to aid

        serde serialization.'
      properties:
        boundary_accounts:
          items:
            $ref: '#/components/schemas/AccountId'
          type: array
        id_to_index_map:
          additionalProperties:
            format: uint
            minimum: 0
            type: integer
          type: object
        index_to_id_map:
          additionalProperties:
            $ref: '#/components/schemas/ShardId'
          type: object
        shard_ids:
          items:
            $ref: '#/components/schemas/ShardId'
          type: array
        shards_parent_map:
          additionalProperties:
            $ref: '#/components/schemas/ShardId'
          nullable: true
          type: object
        shards_split_map:
          additionalProperties:
            items:
              $ref: '#/components/schemas/ShardId'
            type: array
          nullable: true
          type: object
        version:
          format: uint32
          minimum: 0
          type: integer
      required:
      - boundary_accounts
      - shard_ids
      - id_to_index_map
      - index_to_id_map
      - version
      type: object
    Finality:
      description: Different types of finality.
      enum:
      - optimistic
      - near-final
      - final
      type: string
    ShardLayoutV3:
      description: 'Counterpart to `ShardLayoutV3` composed of maps with string keys to aid

        serde serialization.'
      properties:
        boundary_accounts:
          items:
            $ref: '#/components/schemas/AccountId'
          type: array
        id_to_index_map:
          additionalProperties:
            format: uint
            minimum: 0
            type: integer
          type: object
        last_split:
          $ref: '#/components/schemas/ShardId'
        shard_ids:
          items:
            $ref: '#/components/schemas/ShardId'
          type: array
        shards_split_map:
          additionalProperties:
            items:
              $ref: '#/components/schemas/ShardId'
            type: array
          type: object
      required:
      - boundary_accounts
      - shard_ids
      - id_to_index_map
      - shards_split_map
      - last_split
      type: object
    AccountId:
      $schema: https://json-schema.org/draft/2020-12/schema
      description: '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)

        ```'
      title: AccountId
      type: string
    NearGas:
      format: uint64
      minimum: 0
      type: integer
    ShardLayout:
      description: '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.'
      oneOf:
      - additionalProperties: false
        properties:
          V0:
            $ref: '#/components/schemas/ShardLayoutV0'
        required:
        - V0
        type: object
      - additionalProperties: false
        properties:
          V1:
            $ref: '#/components/schemas/ShardLayoutV1'
        required:
        - V1
        type: object
      - additionalProperties: false
        properties:
          V2:
            $ref: '#/components/schemas/ShardLayoutV2'
        required:
        - V2
        type: object
      - additionalProperties: false
        properties:
          V3:
            $ref: '#/components/schemas/ShardLayoutV3'
        required:
        - V3
        type: object
    RpcProtocolConfigRequest:
      oneOf:
      - properties:
          block_id:
            $ref: '#/components/schemas/BlockId'
        required:
        - block_id
        type: object
      - properties:
          finality:
            $ref: '#/components/schemas/Finality'
        required:
        - finality
        type: object
      - properties:
          sync_checkpoint:
            $ref: '#/components/schemas/SyncCheckpoint'
        required:
        - sync_checkpoint
        type: object
      title: RpcProtocolConfigRequest
      type: object
    CongestionControlConfigView:
      description: The configuration for congestion control. More info about congestion [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)
      properties:
        allowed_shard_outgoing_gas:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: 'How much gas the chosen allowed shard can send to a 100% congested shard.


            See [`CongestionControlConfig`] for more details.'
        max_congestion_incoming_gas:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: 'How much gas in delayed receipts of a shard is 100% incoming congestion.


            See [`CongestionControlConfig`] for more details.'
        max_congestion_memory_consumption:
          description: 'How much memory space of all delayed and buffered receipts in a shard is

            considered 100% congested.


            See [`CongestionControlConfig`] for more details.'
          format: uint64
          minimum: 0
          type: integer
        max_congestion_missed_chunks:
          description: How many missed chunks in a row in a shard is considered 100% congested.
          format: uint64
          minimum: 0
          type: integer
        max_congestion_outgoing_gas:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: 'How much gas in outgoing buffered receipts of a shard is 100% congested.


            Outgoing congestion contributes to overall congestion, which reduces how

            much other shards are allowed to forward to this shard.'
        max_outgoing_gas:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: 'The maximum amount of gas attached to receipts a shard can forward to

            another shard per chunk.


            See [`CongestionControlConfig`] for more details.'
        max_tx_gas:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: 'The maximum amount of gas in a chunk spent on converting new transactions to

            receipts.


            See [`CongestionControlConfig`] for more details.'
        min_outgoing_gas:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: 'The minimum gas each shard can send to a shard that is not fully congested.


            See [`CongestionControlConfig`] for more details.'
        min_tx_gas:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: 'The minimum amount of gas in a chunk spent on converting new transactions

            to receipts, as long as the receiving shard is not congested.


            See [`CongestionControlConfig`] for more details.'
        outgoing_receipts_big_size_limit:
          description: 'Large size limit for outgoing receipts to a shard, used when it''s safe

            to send a lot of receipts without making the state witness too large.

            It limits the total sum of outgoing receipts, not individual receipts.'
          format: uint64
          minimum: 0
          type: integer
        outgoing_receipts_usual_size_limit:
          description: 'The standard size limit for outgoing receipts aimed at a single shard.

            This limit is pretty small to keep the size of source_receipt_proofs under control.

            It limits the total sum of outgoing receipts, not individual receipts.'
          format: uint64
          minimum: 0
          type: integer
        reject_tx_congestion_threshold:
          description: 'How much congestion a shard can tolerate before it stops all shards from

            accepting new transactions with the receiver set to the congested shard.'
          format: double
          type: number
      type: object
    ShardLayoutV0:
      description: '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.'
      properties:
        num_shards:
          description: Map accounts evenly across all shards
          format: uint64
          minimum: 0
          type: integer
        version:
          description: Version of the shard layout, this is useful for uniquely identify the shard layout
          format: uint32
          minimum: 0
          type: integer
      required:
      - num_shards
      - version
      type: object
    RpcProtocolConfigError:
      oneOf:
      - properties:
          info:
            type: object
          name:
            enum:
            - UNKNOWN_BLOCK
            type: string
        required:
        - name
        - info
        type: object
      - properties:
          info:
            properties:
              error_message:
                type: string
            required:
            - error_message
            type: object
          name:
            enum:
            - INTERNAL_ERROR
            type: string
        required:
        - name
        - info
        type: object
    AccessKeyCreationConfigView:
      description: Describes the cost of creating an access key.
      properties:
        full_access_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Base cost of creating a full access access-key.
        function_call_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Base cost of creating an access-key restricted to specific functions.
        function_call_cost_per_byte:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: Cost per byte of method_names of creating a restricted access-key.
      required:
      - full_access_cost
      - function_call_cost
      - function_call_cost_per_byte
      type: object
    ShardLayoutV1:
      properties:
        boundary_accounts:
          description: '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.'
          items:
            $ref: '#/components/schemas/AccountId'
          type: array
        shards_split_map:
          description: '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'
          items:
            items:
              $ref: '#/components/schemas/ShardId'
            type: array
          nullable: true
          type: array
        to_parent_shard_map:
          description: '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'
          items:
            $ref: '#/components/schemas/ShardId'
          nullable: true
          type: array
        version:
          description: Version of the shard layout, this is useful for uniquely identify the shard layout
          format: uint32
          minimum: 0
          type: integer
      required:
      - boundary_accounts
      - version
      type: object
    RpcProtocolConfigResponse:
      properties:
        block_producer_kickout_threshold:
          description: Threshold for kicking out block producers, between 0 and 100.
          format: uint8
          maximum: 255
          minimum: 0
          type: integer
        chain_id:
          description: '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.'
          type: string
        chunk_producer_kickout_threshold:
          description: Threshold for kicking out chunk producers, between 0 and 100.
          format: uint8
          maximum: 255
          minimum: 0
          type: integer
        chunk_validator_only_kickout_threshold:
          description: Threshold for kicking out nodes which are only chunk validators, between 0 and 100.
          format: uint8
          maximum: 255
          minimum: 0
          type: integer
        dynamic_resharding:
          description: Enable dynamic re-sharding.
          type: boolean
        epoch_length:
          description: Epoch length counted in block heights.
          format: uint64
          minimum: 0
          type: integer
        fishermen_threshold:
          allOf:
          - $ref: '#/components/schemas/NearToken'
          description: Fishermen stake threshold.
        gas_limit:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: Initial gas limit.
        gas_price_adjustment_rate:
          description: Gas price adjustment rate
          items:
            format: int32
            type: integer
          maxItems: 2
          minItems: 2
          type: array
        genesis_height:
          description: Height of genesis block.
          format: uint64
          minimum: 0
          type: integer
        genesis_time:
          description: Official time of blockchain start.
          format: date-time
          type: string
        max_gas_price:
          allOf:
          - $ref: '#/components/schemas/NearToken'
          description: Maximum gas price.
        max_inflation_rate:
          description: Maximum inflation on the total supply every epoch.
          items:
            format: int32
            type: integer
          maxItems: 2
          minItems: 2
          type: array
        max_kickout_stake_perc:
          description: Max stake percentage of the validators we will kick out.
          format: uint8
          maximum: 255
          minimum: 0
          type: integer
        min_gas_price:
          allOf:
          - $ref: '#/components/schemas/NearToken'
          description: Minimum gas price. It is also the initial gas price.
        minimum_stake_divisor:
          description: The minimum stake required for staking is last seat price divided by this number.
          format: uint64
          minimum: 0
          type: integer
        minimum_stake_ratio:
          description: 'The lowest ratio s/s_total any block producer can have.

            See <https://github.com/near/NEPs/pull/167> for details'
          items:
            format: int32
            type: integer
          maxItems: 2
          minItems: 2
          type: array
        minimum_validators_per_shard:
          description: The minimum number of validators each shard must have
          format: uint64
          minimum: 0
          type: integer
        num_block_producer_seats:
          description: Number of block producer seats at genesis.
          format: uint64
          minimum: 0
          type: integer
        num_blocks_per_year:
          description: Expected number of blocks per year
          format: uint64
          minimum: 0
          type: integer
        online_max_threshold:
          description: Online maximum threshold above which validator gets full reward.
          items:
            format: int32
            type: integer
          maxItems: 2
          minItems: 2
          type: array
        online_min_threshold:
          description: Online minimum threshold below which validator doesn't receive reward.
          items:
            format: int32
            type: integer
          maxItems: 2
          minItems: 2
          type: array
        protocol_reward_rate:
          description: Protocol treasury rate
          items:
            format: int32
            type: integer
          maxItems: 2
          minItems: 2
          type: array
        protocol_treasury_account:
          allOf:
          - $ref: '#/components/schemas/AccountId'
          description: Protocol treasury account
        protocol_upgrade_stake_threshold:
          description: Threshold of stake that needs to indicate that they ready for upgrade.
          items:
            format: int32
            type: integer
          maxItems: 2
          minItems: 2
          type: array
        protocol_version:
          description: Current Protocol Version
          format: uint32
          minimum: 0
          type: integer
        runtime_config:
          allOf:
          - $ref: '#/components/schemas/RuntimeConfigView'
          description: Runtime configuration (mostly economics constants).
        shard_layout:
          allOf:
          - $ref: '#/components/schemas/ShardLayout'
          description: Layout information regarding how to split accounts to shards
        shuffle_shard_assignment_for_chunk_producers:
          description: '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]`.'
          type: boolean
        target_validator_mandates_per_shard:
          description: Number of target chunk validator mandates for each shard.
          format: uint64
          minimum: 0
          type: integer
        transaction_validity_period:
          description: Number of blocks for which a given transaction is valid
          format: uint64
          minimum: 0
          type: integer
      type: object
    DataReceiptCreationConfigView:
      description: The fees settings for a data receipt creation
      properties:
        base_cost:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: 'Base cost of creating a data receipt.

            Both `send` and `exec` costs are burned when a new receipt has input dependencies. The gas

            is charged for each input dependency. The dependencies are specified when a receipt is

            created using `promise_then` and `promise_batch_then`.

            NOTE: Any receipt with output dependencies will produce data receipts. Even if it fails.

            Even if the last action is not a function call (in case of success it will return empty

            value).'
        cost_per_byte:
          allOf:
          - $ref: '#/components/schemas/Fee'
          description: 'Additional cost per byte sent.

            Both `send` and `exec` costs are burned when a function call finishes execution and returns

            `N` bytes of data to every output dependency. For each output dependency the cost is

            `(send(sir) + exec()) * N`.'
      type: object
    InternalError:
      oneOf:
      - properties:
          info:
            properties:
              error_message:
                type: string
            required:
            - error_message
            type: object
          name:
            enum:
            - INTERNAL_ERROR
            type: string
        required:
        - name
        - info
        type: object
    SyncCheckpoint:
      enum:
      - genesis
      - earliest_available
      type: string
    VMKind:
      oneOf:
      - description: Wasmer 0.17.x VM. Gone now.
        enum:
        - Wasmer0
        type: string
      - description: Wasmtime VM.
        enum:
        - Wasmtime
        type: string
      - description: Wasmer 2.x VM.
        enum:
        - Wasmer2
        type: string
      - description: NearVM.
        enum:
        - NearVm
        type: string
    ShardId:
      description: '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.'
      format: uint64
      minimum: 0
      type: integer
    JsonRpcResponse_for_RpcProtocolConfigResponse_and_RpcProtocolConfigError:
      oneOf:
      - properties:
          result:
            $ref: '#/components/schemas/RpcProtocolConfigResponse'
        required:
        - result
        type: object
      - properties:
          error:
            $ref: '#/components/schemas/ErrorWrapper_for_RpcProtocolConfigError'
        required:
        - error
        type: object
      properties:
        id:
          type: string
        jsonrpc:
          type: string
      required:
      - jsonrpc
      - id
      title: JsonRpcResponse_for_RpcProtocolConfigResponse_and_RpcProtocolConfigError
      type: object
    VMConfigView:
      properties:
        bls12381_not_in_group_fix:
          description: See [VMConfig::bls12381_not_in_group_fix](crate::vm::Config::bls12381_not_in_group_fix).
          type: boolean
        chain_id_host_fn:
          description: See [VMConfig::chain_id_host_fn](crate::vm::Config::chain_id_host_fn).
          type: boolean
        discard_custom_sections:
          description: See [VMConfig::discard_custom_sections](crate::vm::Config::discard_custom_sections).
          type: boolean
        eth_implicit_accounts:
          description: See [VMConfig::eth_implicit_accounts](crate::vm::Config::eth_implicit_accounts).
          type: boolean
        eth_implicit_global_contract:
          description: See [VMConfig::eth_implicit_global_contract](crate::vm::Config::eth_implicit_global_contract).
          type: boolean
        ext_costs:
          allOf:
          - $ref: '#/components/schemas/ExtCostsConfigView'
          description: Costs for runtime externals
        fix_contract_loading_cost:
          description: See [VMConfig::fix_contract_loading_cost](crate::vm::Config::fix_contract_loading_cost).
          type: boolean
        gas_key_host_fns:
          description: See [VMConfig::gas_key_host_fns](crate::vm::Config::gas_key_host_fns).
          type: boolean
        global_contract_host_fns:
          description: See [VMConfig::global_contract_host_fns](crate::vm::Config::global_contract_host_fns).
          type: boolean
        grow_mem_cost:
          description: Gas cost of a growing memory by single page.
          format: uint32
          minimum: 0
          type: integer
        implicit_account_creation:
          description: Deprecated
          type: boolean
        limit_config:
          allOf:
          - $ref: '#/components/schemas/LimitConfig'
          description: 'Describes limits for VM and Runtime.


            TODO: Consider changing this to `VMLimitConfigView` to avoid dependency

            on runtime.'
        linear_op_base_cost:
          description: Base gas cost of a linear operation
          format: uint64
          minimum: 0
          type: integer
        linear_op_unit_cost:
          description: Unit gas cost of a linear operation
          format: uint64
          minimum: 0
          type: integer
        one_yocto_on_promise:
          description: See [VMConfig::one_yocto_on_promise](crate::vm::Config::one_yocto_on_promise).
          type: boolean
        p256_verify_host_fn:
          description: See [VMConfig::p256_verify_host_fn](crate::vm::Config::p256_verify_host_fn).
          type: boolean
        reftypes_bulk_memory:
          description: See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory).
          type: boolean
        regular_op_cost:
          description: Gas cost of a regular operation.
          format: uint32
          minimum: 0
          type: integer
        storage_get_mode:
          allOf:
          - $ref: '#/components/schemas/StorageGetMode'
          description: See [VMConfig::storage_get_mode](crate::vm::Config::storage_get_mode).
        vm_kind:
          allOf:
          - $ref: '#/components/schemas/VMKind'
          description: See [VMConfig::vm_kind](crate::vm::Config::vm_kind).
        yield_with_id_host_fns:
          description: See [VMConfig::yield_with_id_host_fns](crate::vm::Config::yield_with_id_host_fns).
          type: boolean
      type: object
    Fee:
      description: 'Costs associated with an object that can only be sent over the network (and executed

        by the receiver).

        NOTE: `send_sir` or `send_not_sir` fees are usually burned when the item is being created.

        And `execution` fee is burned when the item is being executed.'
      properties:
        execution:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: Fee for executing the object.
        send_not_sir:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: Fee for sending an object potentially across the shards.
        send_sir:
          allOf:
          - $ref: '#/components/schemas/NearGas'
          description: 'Fee for sending an object from the sender to itself, guaranteeing that it does not leave

            the shard.'
      required:
      - send_sir
      - send_not_sir
      - execution
      type: object
    LimitConfig:
      description: 'Describes limits for VM and Runtime.

        TODO #4139: consider switching to strongly-typed wrappers instead of raw quantities'
      properties:
        account_id_validity_rules_version:
          allOf:
          - $ref: '#/components/schemas/AccountIdValidityRulesVersion'
          default: 0
          description: 'Whether to enforce account_id well-formed-ness where it wasn''t enforced

            historically.'
        initial_memory_pages:
          description: 'The initial number of memory pages.

            NOTE: It''s not a limiter itself, but it''s a value we use for initial_memory_pages.'
          format: uint32
          minimum: 0
          type: integer
        max_actions_per_receipt:
          description: Max number of actions per receipt.
          format: uint64
          minimum: 0
          type: integer
        max_arguments_length:
          description: Max length of arguments in a function call action.
          format: uint64
          minimum: 0
          type: integer
        max_blocks_per_contract:
          description: 'If present, stores max total number of basic blocks across all functions in a contract.

            This caps total compilation time for a contract.'
          format: uint64
          minimum: 0
          nullable: true
          type: integer
        max_blocks_per_function:
          description: 'If present, stores max number of basic blocks (block/loop/if) in a single function.

            This caps per-function compilation time in Cranelift.'
          format: uint64
          minimum: 0
          nullable: true
          type: integer
        max_contract_size:
          description: Max contract size
          format: uint64
          minimum: 0
          type: integer
        max_deploy_actions_per_receipt:
          description: 'Max number of `DeployContract` and `DeployGlobalContract` actions

            combined within a single receipt.'
          format: uint64
          minimum: 0
          type: integer
        max_elements_per_contract_table:
          description: If present, stores max number of elements in a single contract's table
          format: uint
          minimum: 0
          nullable: true
          type: integer
        max_function_body_s

# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/near/refs/heads/main/openapi/near-experimental-protocol-config-api-openapi.yml