Installation and usage of the platform

REST API: blockchain debug

Methods of the debug group are provided for debugging the blockchain network:

https://img.shields.io/badge/auth-required-orange.svg

GET /debug​/blocks​/{howMany}

The method displays the size and full hash of the last blocks. The number of blocks is specified when prompted.

Response example:

GET /debug​/info

The method displays general information about the blockchain needed for debugging and testing.

Response example:

POST /debug​/rollback

The method rolls the blockchain back to the specified height, removing all blocks after it. The following parameters are passed in the request:

  • rollbackTo – the height to which the blockchain must be rolled back;

  • returnTransactionsToUtx – return transactions that are contained in the rolled back blocks to the UTX pool:

    • true – return,

    • false – delete.

Examples of a query and a response:

POST /debug​/validate

The method validates transactions by their identifier and measures the time spent in milliseconds. The id of the transaction is passed in the query.

Response example:

GET /debug​/minerInfo

The method returns information about the miner.

Response example:

GET /debug​/historyInfo

The method displays the history of the last block.

Response example:

GET /debug​/configInfo

The method completely outputs the used node configuration file.

Response example:

DELETE /debug​/rollback-to​/{signature}

The method rolls the blockchain up to the block with the specified {signature}.

Response example:

GET /debug​/portfolios​/{address}

The method displays the current balance of the transactions in the UTX pool of the {address} node.

Response example:

POST /debug​/print

The method outputs the current messages of the logger that has a DEBUG logging level.

The answer is output in the "message": "string" format

GET /debug​/state

The method displays the current state of the node.

Response example:

GET /debug​/stateWE​/{height}

The method displays the node’s state at the specified {height}.

Response example: