---
title: "ConsumerGenesis queries the genesis state needed to start a consumer chain whose proposal has been accepted"
method: GET
path: "/interchain_security/ccv/provider/consumer_genesis/{consumer_id}"
tags: ["Query"]
---

# ConsumerGenesis queries the genesis state needed to start a consumer chain whose proposal has been accepted

`GET /interchain_security/ccv/provider/consumer_genesis/{consumer_id}`

## Request

- Base URL: `https://api.mantrachain.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mantrachain.io/interchain_security/ccv/provider/consumer_genesis/{consumer_id}`
- Auth: none declared

## Path parameters

- `consumer_id` string, required

## Response `200`

A successful response.

- object
  - `genesis_state` object
    - `params` object: ConsumerParams defines the parameters for CCV consumer module. Note this type is referenced in both the consumer and provider CCV modules, and persisted on the provider, see MakeConsumerGenesis and SetConsumerGenesis.
      - `enabled` boolean
      - `blocks_per_distribution_transmission` string, int64: ///////////////////// Distribution Params Number of blocks between ibc-token-transfers from the consumer chain to the provider chain. Note that at this transmission event a fraction of the accumulated tokens are divided and sent consumer redistribution address.
      - `distribution_transmission_channel` string: Channel, and provider-chain receiving address to send distribution token transfers over. These parameters is auto-set during the consumer <-> provider handshake procedure.
      - `provider_fee_pool_addr_str` string
      - `ccv_timeout_period` string
      - `transfer_timeout_period` string
      - `consumer_redistribution_fraction` string: The fraction of tokens allocated to the consumer redistribution address during distribution events. The fraction is a string representing a decimal number. For example "0.75" would represent 75%.
      - `historical_entries` string, int64: The number of historical info entries to persist in store. This param is a part of the cosmos sdk staking module. In the case of a ccv enabled consumer chain, the ccv module acts as the staking module.
      - `unbonding_period` string: Unbonding period for the consumer, which should be smaller than that of the provider in general.
      - `soft_opt_out_threshold` string
      - `reward_denoms` string[]: Reward denoms. These are the denominations which are allowed to be sent to the provider as rewards.
      - `provider_reward_denoms` string[]
      - `retry_delay_period` string: The period after which a consumer can retry sending a throttled packet.
      - `consumer_id` string: The consumer ID of this consumer chain. Used by the consumer module to send ICS rewards.
    - `provider` object
      - `client_state` object: The client state for the provider client filled in on new chain, nil on restart. If connection_id != "", then client_state is ignored.
        - `chain_id` string
        - `trust_level` object: Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values.
          - `numerator` string, uint64
          - `denominator` string, uint64
        - `trusting_period` string
        - `unbonding_period` string
        - `max_clock_drift` string: defines how much new (untrusted) header's Time can drift into the future.
        - `frozen_height` object: Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset Please note that json tags for generated Go code are overridden to explicitly exclude the omitempty jsontag. This enforces the Go json marshaller to always emit zero values for both revision_number and revision_height.
          - `revision_number` string, uint64
          - `revision_height` string, uint64
        - `latest_height` object: Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset Please note that json tags for generated Go code are overridden to explicitly exclude the omitempty jsontag. This enforces the Go json marshaller to always emit zero values for both revision_number and revision_height.
          - `revision_number` string, uint64
          - `revision_height` string, uint64
        - `proof_specs` object[]
          - `leaf_spec` object: * LeafOp represents the raw key-value data we wish to prove, and must be flexible to represent the internal transformation from the original key-value pairs into the basis hash, for many existing merkle trees. key and value are passed in. So that the signature of this operation is: leafOp(key, value) -> output To process this, first prehash the keys and values if needed (ANY means no hash in this case): hkey = prehashKey(key) hvalue = prehashValue(value) Then combine the bytes, and hash it output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)
            - `hash` 'NO_HASH' | 'SHA256' | 'SHA512' | 'KECCAK256' | 'RIPEMD160' | 'BITCOIN' | 'SHA512_256' | 'BLAKE2B_512' | 'BLAKE2S_256' | 'BLAKE3': - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.
            - `prehash_key` 'NO_HASH' | 'SHA256' | 'SHA512' | 'KECCAK256' | 'RIPEMD160' | 'BITCOIN' | 'SHA512_256' | 'BLAKE2B_512' | 'BLAKE2S_256' | 'BLAKE3': - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.
            - `prehash_value` 'NO_HASH' | 'SHA256' | 'SHA512' | 'KECCAK256' | 'RIPEMD160' | 'BITCOIN' | 'SHA512_256' | 'BLAKE2B_512' | 'BLAKE2S_256' | 'BLAKE3': - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.
            - `length` 'NO_PREFIX' | 'VAR_PROTO' | 'VAR_RLP' | 'FIXED32_BIG' | 'FIXED32_LITTLE' | 'FIXED64_BIG' | 'FIXED64_LITTLE' | 'REQUIRE_32_BYTES' | 'REQUIRE_64_BYTES': - NO_PREFIX: NO_PREFIX don't include any length info - VAR_PROTO: VAR_PROTO uses protobuf (and go-amino) varint encoding of the length - VAR_RLP: VAR_RLP uses rlp int encoding of the length - FIXED32_BIG: FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer - FIXED32_LITTLE: FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer - FIXED64_BIG: FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer - FIXED64_LITTLE: FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer - REQUIRE_32_BYTES: REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) - REQUIRE_64_BYTES: REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output)
            - `prefix` string, byte: prefix is a fixed bytes that may optionally be included at the beginning to differentiate a leaf node from an inner node.
          - `inner_spec` object: InnerSpec contains all store-specific structure info to determine if two proofs from a given store are neighbors. This enables: isLeftMost(spec: InnerSpec, op: InnerOp) isRightMost(spec: InnerSpec, op: InnerOp) isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
            - `child_order` integer[]
            - `child_size` integer
            - `min_prefix_length` integer
            - `max_prefix_length` integer
            - `empty_child` string, byte
            - `hash` 'NO_HASH' | 'SHA256' | 'SHA512' | 'KECCAK256' | 'RIPEMD160' | 'BITCOIN' | 'SHA512_256' | 'BLAKE2B_512' | 'BLAKE2S_256' | 'BLAKE3': - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.
          - `max_depth` integer
          - `min_depth` integer
          - `prehash_key_before_comparison` boolean: prehash_key_before_comparison is a flag that indicates whether to use the prehash_key specified by LeafOp to compare lexical ordering of keys for non-existence proofs.
        - `upgrade_path` string[]
        - `allow_update_after_expiry` boolean
        - `allow_update_after_misbehaviour` boolean
      - `consensus_state` object: The consensus state for the provider client filled in on new chain, nil on restart. If connection_id != "", then consensus_state is ignored.
        - `timestamp` string, date-time: timestamp that corresponds to the block height in which the ConsensusState was stored.
        - `root` object: MerkleRoot defines a merkle root hash. In the Cosmos SDK, the AppHash of a block header becomes the root.
          - `hash` string, byte
        - `next_validators_hash` string, byte
      - `initial_val_set` object[]: InitialValset filled in on new chain and on restart.
        - `pub_key` object
          - `ed25519` string, byte
          - `secp256k1` string, byte
        - `power` string, int64
    - `new_chain` boolean
    - `preCCV` boolean
    - `connection_id` string: The ID of the connection end on the consumer chain on top of which the CCV channel will be established. If connection_id == "", a new client of the provider chain and a new connection on top of this client are created. The new client is initialized using client_state and consensus_state.

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/mantrachain/apis/mantra-grpc-gateway-docs.md) - [All operations](https://skmtc.dev/mantrachain/apis/mantra-grpc-gateway-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/mantrachain/apis/mantra-grpc-gateway-docs/revisions/641ce457f7fd?raw)
