Returns a consensus block.

Changed on
get/consensus/blocks/{height}

Request

  • Base URL: https://nexus.oasis.io/v1
  • URL: https://nexus.oasis.io/v1/consensus/blocks/{height}
  • Auth: none declared

Path parameters

heightinteger required

The block height of the block to return.

Response

A JSON object containing a consensus block.

heightinteger required

The block height.

hashstring required

The block header hash.

timestampstring date-time required

The second-granular consensus time.

num_transactionsinteger required

Number of transactions in the block.

gas_limitinteger required

The gas limit for the block. A gas limit 0 means that the max block gas was unlimited. Blocks from Cobalt, Damask, and early Eden had no gas limit as their sizes were only restricted by byte size until an upgrade during Eden introduced a gas limit.

size_limitinteger

The size limit for the block in bytes.

epochinteger required

The epoch number of the epoch in which the block was produced.

state_rootstring required

The Merkle root of the state tree after applying the block.

sizeinteger

The size of the block in bytes. This field is missing for blocks pre Oasis-Core 24.3.

gas_usedinteger

Total gas used by the transactions in the block. This field is missing for blocks pre Oasis-Core 24.3.

Example response

{
  "height": 8048956,
  "hash": "0a29ac21fa69bb9e43e5cb25d10826ff3946f1ce977e82f99a2614206a50765c",
  "timestamp": "2022-03-01T00:00:00Z",
  "num_transactions": 17,
  "gas_limit": 30000,
  "epoch": 13402,
  "state_root": "8e39bf193f8a954ab8f8d7cb6388c591fd0785ea060bbd8e3752e266b54499d3",
  "proposer": {
    "entity_id": "`TqUyj5Q+9vZtqu10yw6Zw7HEX3Ywe0JQA9vHyzY47TU=`",
    "entity_address": "`oasis1qzzd6khm3acqskpxlk9vd5044cmmcce78y5l6000`",
    "entity_metadata": "An entity with all fields:\n\n    {\n      \"v\": 1,\n      \"serial\": 1,\n      \"name\": \"Entity display name\",\n      \"url\": \"https://example.org/entity\",\n      \"email\": \"entity@example.org\",\n      \"keybase\": \"keybase_handle\",\n      \"twitter\": \"twitter_handle\"\n    }\n"
  },
  "signers": [
    {
      "entity_id": "`TqUyj5Q+9vZtqu10yw6Zw7HEX3Ywe0JQA9vHyzY47TU=`",
      "entity_address": "`oasis1qzzd6khm3acqskpxlk9vd5044cmmcce78y5l6000`",
      "entity_metadata": "An entity with all fields:\n\n    {\n      \"v\": 1,\n      \"serial\": 1,\n      \"name\": \"Entity display name\",\n      \"url\": \"https://example.org/entity\",\n      \"email\": \"entity@example.org\",\n      \"keybase\": \"keybase_handle\",\n      \"twitter\": \"twitter_handle\"\n    }\n"
    }
  ],
  "gas_used": 123456
}

Changes

    • breaking

      the response's property type changed from no type to integer, and format from no format to uint64 for status

    • breaking

      the response's property type changed from no type to integer, and format from no format to uint64 for status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      removed from the response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • breaking

      the response's property type changed from integer to no type, and format from uint64 to no format for status

    • breaking

      the response's property type changed from integer to no type, and format from uint64 to no format for status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status