Paralism Node RESTAPI

  1. Home
  2. Docs
  3. Paralism Node RESTAPI
  4. 2. GetOnchainState queries the processing status of submitted on-chain requests

2. GetOnchainState queries the processing status of submitted on-chain requests

*Parameter: id, the id of the on-chain request to query

*Example:

http://127.0.0.1:8080/GetOnchainState?requestid=DexA4KRY9zEMkSmLBrU9XRWWzbUyw

*Four examples:

{
  "chainNumber": 1,
  "hyperBlockId": 16,
  "localBlockId": 2,
  "onChainState": "onchained"
}
{
  "chainNumber": 1,
  "hyperBlockId": 3507,
  "localBlockId": 2,
  "onChainState": "matured "
}

{
  "onChainState": "onchaining2"
}

{
  "onChainState": "queueing",
  "queuenum": 3
}

Return value:

  • queue, the sequence number of on-chain requests cached locally on the node. Returns when the state is queuing.
  • onChainState, on-chain state:
  • queuing, the on-chain request is cached locally on the node and queued in the uplink.
  • onchaining1, the on-chain data has been added to the local consensus for constructing the sub chain.
  • onchaining2, the on-chain data has been added to the local consensus along with the business sub chain.
  • onchained, the on-chain data has been recognized by the global consensus and corresponding hyperblocks have been obtained in the business local chain, in mapSearchOnChain
  • matured, mature, after 4 global consensus cycles (which can be set by MATURATY_TIME), the obtained hyperblock is not discarded by the network, indicating that the hyperblock and related local chains have successfully solidified consensus across the entire network, and the possibility of being forked and discarded again is extremely low.
  • nonexistent, the submitted on-chain request was not found
  • failed, the on-chain request submission failed
  • unknown, an unknown problem has occurred.
Was this article helpful to you? Yes No