# Consensus API

The consensus API is not exposed to external clients and is only used for debugging purposes to verify the state of consensus in Miyabi.

# Get Consensus State

Returns the current state of consensus in Miyabi.

# Request

  • Method: GET
  • URL: /consensus/state
  • Query parameters in URL: None

# Response

  • Success

    • Code: 200

    • Return value:

      • {
          "value": {
            "utcNow": "Current UTC time",
            "proposalInterval": "The interval at which the Miyabi system attempts to propose a new block",
            "roundTimeout": "The timeout for each round before the next round is started",
            "pacemaker": {
              "isRunning": "State of the pacemaker to check if it running or not",
              "interval": "Interval at which pacemaker starts a new proposal(Similar to 'proposalInterval')",
              "nextCount": "Counter to keep track of number of proposals",
              "nextProposal": "Time at which next proposal will occur"
            },
            "heightInstances": {
                "capacity": "Total capacity",
                "minIndex": "Current minimum index(Equal to 'nextCount')",
                "instances": {
                  "0": null,
                  "1": null,
                  "2": null,
                  "3": null,
                  "4": null,
                  "5": null,
                  "6": null,
                  "7": null,
                  "8": null,
                  "9": null
                }
              },
          "atHeight": "Current block height at the time of response"
        }
        

# Get Consensus Member Information

Get the consensus member information.

# Request

  • Method: GET
  • URL: /consensus/memberinfo
  • Query parameters in URL: Height

# Response

  • Success

    • Code: 200

    • Return value:

      • {
          "value": {
            "members": [<List of Credentials for all participating members of consensus>],
            "quorumCredentials": [<List of Credentials for the 'Quorum' participating members of consensus>]
          },
          "atHeight": "Current block height at the time of response"
        }
        
  • Validation Error

    • Code: 400
    • Reason:
      • Query Height is larger than current height
      • Query Height is negative
  • Object Not Found

    • Code: 404
    • Reason:
      • Node is not core, IConsensusManager instance does not exist