> ## Documentation Index
> Fetch the complete documentation index at: https://cosmos-docs-sync-security-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# dump_consensus_state

> Get consensus state

Get consensus state.

Not safe to call from inside the ABCI application during a block execution.



## OpenAPI

````yaml /cometbft/latest/api-reference/rpc/openapi.yaml get /dump_consensus_state
openapi: 3.0.0
info:
  title: CometBFT RPC
  contact:
    name: CometBFT
    url: https://docs.cosmos.network/cometbft
  description: >
    CometBFT supports the following RPC protocols:


    * URI over HTTP

    * JSONRPC over HTTP

    * JSONRPC over websockets


    ## Configuration


    RPC can be configured by tuning parameters under `[rpc]` table in the

    `$CMTHOME/config/config.toml` file or by using the `--rpc.X` command-line

    flags.


    The default RPC listen address is `tcp://127.0.0.1:26657`.

    To set another address, set the `laddr` config parameter to desired value.

    CORS (Cross-Origin Resource Sharing) can be enabled by setting

    `cors_allowed_origins`, `cors_allowed_methods`, `cors_allowed_headers`

    config parameters.


    If testing using a local RPC node, under the `[rpc]`

    section change the `cors_allowed_origins` property, please add the URL of

    the site where this OpenAPI document is running, for example:

      `cors_allowed_origins = ["http://localhost:8088"]`

    or if testing from the official documentation site:

      `cors_allowed_origins = ["https://docs.cosmos.network"]`

    ## Arguments


    Arguments which expect strings or byte arrays may be passed as quoted

    strings, like `"abc"` or as `0x`-prefixed strings, like `0x616263`.


    ## URI/HTTP


    A REST like interface.

        curl localhost:26657/block?height=5

    ## JSONRPC/HTTP


    JSONRPC requests can be POST'd to the root RPC endpoint via HTTP.

        curl --header "Content-Type: application/json" --request POST --data '{"method": "block", "params": ["5"], "id": 1}' localhost:26657

    ## JSONRPC/websockets


    JSONRPC requests can be also made via websocket.

    The websocket endpoint is at `/websocket`, e.g. `localhost:26657/websocket`.

    Asynchronous RPC functions like event `subscribe` and `unsubscribe` are

    only available via websockets.


    For example using the [websocat](https://github.com/vi/websocat) tool, you
    can subscribe for 'NewBlock` events

    with the following command:

        echo '{ "jsonrpc": "2.0","method": "subscribe","id": 0,"params": {"query": "tm.event='"'NewBlock'"'"} }' | websocat -n -t ws://127.0.0.1:26657/websocket
  version: v0.38.x
  license:
    name: Apache 2.0
    url: https://github.com/cometbft/cometbft/blob/v0.38.x/LICENSE
servers:
  - url: https://rpc.cosmos.directory/cosmoshub
    description: Interact with the CometBFT RPC from a public node in the Cosmos registry
  - url: http://localhost:26657
    description: Interact with CometBFT RPC node running locally
security: []
tags:
  - name: Info
    description: Informations about the node APIs
  - name: Tx
    description: Transactions broadcast APIs
  - name: ABCI
    description: ABCI APIs
  - name: Evidence
    description: Evidence APIs
  - name: Unsafe
    description: Unsafe APIs
paths:
  /dump_consensus_state:
    get:
      tags:
        - Info
      summary: dump_consensus_state
      description: >-
        Get consensus state


        Get consensus state.


        Not safe to call from inside the ABCI application during a block
        execution.
      operationId: dump_consensus_state
      responses:
        '200':
          description: >
            Complete consensus state.


            See
            https://pkg.go.dev/github.com/cometbft/cometbft/types?tab=doc#Vote.String
            for Vote string description.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DumpConsensusResponse'
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DumpConsensusResponse:
      type: object
      required:
        - jsonrpc
        - id
        - result
      properties:
        jsonrpc:
          type: string
          example: '2.0'
        id:
          type: integer
          example: 0
        result:
          required:
            - round_state
            - peers
          properties:
            round_state:
              required:
                - height
                - round
                - step
                - start_time
                - commit_time
                - validators
                - proposal
                - proposal_block
                - proposal_block_parts
                - locked_round
                - locked_block
                - locked_block_parts
                - valid_round
                - valid_block
                - valid_block_parts
                - votes
                - commit_round
                - last_commit
                - last_validators
                - triggered_timeout_precommit
              properties:
                height:
                  type: string
                  example: '1311801'
                round:
                  type: integer
                  example: 0
                step:
                  type: integer
                  example: 3
                start_time:
                  type: string
                  example: '2019-08-05T11:28:49.064658805Z'
                commit_time:
                  type: string
                  example: '2019-08-05T11:28:44.064658805Z'
                validators:
                  required:
                    - validators
                    - proposer
                  properties:
                    validators:
                      type: array
                      items:
                        $ref: '#/components/schemas/ValidatorPriority'
                    proposer:
                      $ref: '#/components/schemas/ValidatorPriority'
                  type: object
                locked_round:
                  type: integer
                  example: -1
                valid_round:
                  type: string
                  example: '-1'
                votes:
                  type: array
                  items:
                    type: object
                    properties:
                      round:
                        type: string
                        example: '0'
                      prevotes:
                        type: array
                        nullable: true
                        items:
                          type: string
                        example:
                          - nil-Vote
                          - >-
                            Vote{19:46A3F8B8393B 1311801/00/1(Prevote)
                            000000000000 64CE682305CB @
                            2019-08-05T11:28:47.374703444Z}
                      prevotes_bit_array:
                        type: string
                        example: >-
                          BA{100:___________________x________________________________________________________________________________}
                          209706/170220253 = 0.00
                      precommits:
                        type: array
                        nullable: true
                        items:
                          type: string
                        example:
                          - nil-Vote
                      precommits_bit_array:
                        type: string
                        example: >-
                          BA{100:____________________________________________________________________________________________________}
                          0/170220253 = 0.00
                commit_round:
                  type: integer
                  example: -1
                last_commit:
                  nullable: true
                  required:
                    - votes
                    - votes_bit_array
                    - peer_maj_23s
                  properties:
                    votes:
                      type: array
                      items:
                        type: string
                      example:
                        - >-
                          Vote{0:000001E443FD 1311800/00/2(Precommit)
                          3071ADB27D1A 77EE1B6B6847 @
                          2019-08-05T11:28:43.810128139Z}
                    votes_bit_array:
                      type: string
                      example: >-
                        BA{100:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
                        170220253/170220253 = 1.00
                    peer_maj_23s:
                      properties: {}
                      type: object
                  type: object
                last_validators:
                  required:
                    - validators
                    - proposer
                  properties:
                    validators:
                      type: array
                      items:
                        $ref: '#/components/schemas/ValidatorPriority'
                    proposer:
                      $ref: '#/components/schemas/ValidatorPriority'
                  type: object
                triggered_timeout_precommit:
                  type: boolean
                  example: false
              type: object
            peers:
              type: array
              items:
                type: object
                properties:
                  node_address:
                    type: string
                    example: >-
                      357f6a6c1d27414579a8185060aa8adf9815c43c@68.183.41.207:26656
                  peer_state:
                    required:
                      - round_state
                      - stats
                    properties:
                      round_state:
                        required:
                          - height
                          - round
                          - step
                          - start_time
                          - proposal
                          - proposal_block_parts_header
                          - proposal_block_parts
                          - proposal_pol_round
                          - proposal_pol
                          - prevotes
                          - precommits
                          - last_commit_round
                          - last_commit
                          - catchup_commit_round
                          - catchup_commit
                        properties:
                          height:
                            type: string
                            example: '1311801'
                          round:
                            type: string
                            example: '0'
                          step:
                            type: integer
                            example: 3
                          start_time:
                            type: string
                            example: '2019-08-05T11:28:49.21730864Z'
                          proposal:
                            type: boolean
                            example: false
                          proposal_block_parts_header:
                            required:
                              - total
                              - hash
                            properties:
                              total:
                                type: integer
                                example: 0
                              hash:
                                type: string
                                example: ''
                            type: object
                          proposal_pol_round:
                            nullable: true
                            type: integer
                            example: -1
                          proposal_pol:
                            nullable: true
                            type: string
                            example: >-
                              ____________________________________________________________________________________________________
                          prevotes:
                            nullable: true
                            type: string
                            example: >-
                              ___________________x________________________________________________________________________________
                          precommits:
                            nullable: true
                            type: string
                            example: >-
                              ____________________________________________________________________________________________________
                          last_commit_round:
                            nullable: true
                            type: integer
                            example: 0
                          last_commit:
                            nullable: true
                            type: string
                            example: >-
                              xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                          catchup_commit_round:
                            nullable: true
                            type: integer
                            example: -1
                          catchup_commit:
                            nullable: true
                            type: string
                            example: >-
                              ____________________________________________________________________________________________________
                        type: object
                      stats:
                        required:
                          - votes
                          - block_parts
                        properties:
                          votes:
                            type: string
                            example: '1159558'
                          block_parts:
                            type: string
                            example: '4786'
                        type: object
                    type: object
          type: object
    ErrorResponse:
      description: Error Response
      allOf:
        - $ref: '#/components/schemas/JSONRPC'
        - type: object
          properties:
            error:
              type: string
              example: Description of failure
    ValidatorPriority:
      type: object
      properties:
        address:
          type: string
          example: 000001E443FD237E4B616E2FA69DF4EE3D49A94F
        pub_key:
          type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              example: tendermint/PubKeyEd25519
            value:
              type: string
              example: 9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM=
        voting_power:
          type: string
          example: '239727'
        proposer_priority:
          type: string
          example: '-11896414'
    JSONRPC:
      type: object
      properties:
        id:
          type: integer
          example: 0
        jsonrpc:
          type: string
          example: '2.0'

````