Skip to content

Extend block API to return additional data

We are looking at having more data available for the block explorer UI, in relevance to ticket block_explorer_ui#466 (closed)

In particular API endpoint https://api.syncad.com/hafbe-api/block-numbers?page=1&page-size=100&direction=desc

Sample info needed about above ticket/block

  1. "producer": "anyx",
  2. "block_id": "009861db9d52bc844c93f48954b74f993c4d5f78",
  3. "previous": "009861dad328e0f2dbc489df44bfad76b1b52a97",
  4. "timestamp": "2017-03-08T06:18:45",
  5. Operations[] : Contain Operation ID and Transaction ID so we indicate the number of operations and transactions in Block
  6. As per our discussion, we need to check if we can add the following to the block
    1. Block Size: The size of the block in bytes (or kilobytes, megabytes, etc.)
    2. Number of Confirmations: How many blocks have been mined after this block. Higher confirmations provide more confidence that the block is immutable.
    3. Reward: The block reward received by the witness for creating the block
    4. RC Used: Resource Credits
  7. Note: If any of the above can be added to the blocks, we need to update other APIs to return the added data so we can reflect them on block explorer. Example: If block size can be retrieved then we need to update other API that returns block information so we can display data example https://api.syncad.com/hafah-api/blocks/9986523?include-virtual=false