Skip to content

[Draft] RUES Node Events

Matteo Ferretti edited this page Jul 16, 2024 · 3 revisions

This document outlines the events generated by a Rusk Node, which are not initiated by contract, in accordance with the RUES specifications.

These events are categorized based on the component of the target.

Blocks

Target's element: block hash in hex format (see Content-Location on the events below)

on/blocks/accepted

Emitted when a block is accepted.

List of headers

Name Description
Content-Location e.g. /on/blocks:488a0419e03013a48823f017be790d01d39557478670c9a173099a06da3d739e/accepted
Content-Type application/json
Content-Length The length of the payload in octets (8-bit bytes).

Payload example

{
  "block": {
    "header": {
      "gasLimit": 5000000000,
      "hash": "488a0419e03013a48823f017be790d01d39557478670c9a173099a06da3d739e",
      "height": 1963,
      "iteration": 0,
      "prevBlockHash": "619e835b9bded6fc4ed39fd5dd9cedf9a61b3e9c54ee1b15b8067766b3215e52",
      "seed": "afa035b209e5f12080f671dcad2cee56679e6d8689e91776abb4487dc4e72cc1b21c0c044869a7ab87a60ed050e9fb6c",
      "stateHash": "ccdc3b146fd05ddb872fe3531253bc9f327ee55063e812c7c09b5166be6978d7",
      "timestamp": 1720792561,
      "txRoot": "0000000000000000000000000000000000000000000000000000000000000000",
      "version": 0
      "label": "final"
    },
    "transactions": []
  }
}

on/blocks/statechange

Emitted when a block's state change (e.g. become confirmed, finalized, or reverted).

List of headers

Name Description
Content-Location e.g. /on/blocks:488a0419e03013a48823f017be790d01d39557478670c9a173099a06da3d739e/statechange
Content-Type application/json
Content-Length The length of the payload in octets (8-bit bytes).

Payload example

{
  "state": "confirmed"
}

Transactions

Target's element: transaction hash in hex format (see Content-Location on the events below)

on/transactions/included

Emitted when a transaction is included in mempool.

List of headers

Name Description
Content-Location e.g. /on/transactions:fe2ffdcdd27be82fc850bc269ff87fb8e72cf0cd4368e49fe947afeb48167f08/included
Content-Type application/json
Content-Length The length of the payload in octets (8-bit bytes).

Payload example

  // TDB

on/transactions/removed

Emitted when a transaction is removed from mempool.

List of headers

Name Description
Content-Location e.g. /on/transactions:fe2ffdcdd27be82fc850bc269ff87fb8e72cf0cd4368e49fe947afeb48167f08/removed
Content-Type application/json
Content-Length The length of the payload in octets (8-bit bytes).

Payload example

  // TDB
Clone this wiki locally