Relays Data API: include `block_number` and `num_tx`

The Flashbots relay will add two new fields to the Data-API entries:

  1. block_number (uint64, string): much requested by the community for ease of use of the data.
  2. num_tx (uint64 string) - number of transactions included, allows for more comprehensive data analysis and visualisations

Example payload from Sepolia:

[
    {
        // previous fields
        "slot": "829403",
        "parent_hash": "0x985d53dece2acadab4e38d14656e586b16c6d6af47f0b4237831857f0eb6e287",
        "block_hash": "0x493c2f4aac3e7a33b513e5b6202e2f37bfae6604f1f9ed33af4b590de211a102",
        "builder_pubkey": "0x845bd072b7cd566f02faeb0a4033ce9399e42839ced64e8b2adcfc859ed1e8e1a5a293336a49feac6d9a5edb779be53a",
        "proposer_pubkey": "0xab6b47627cf76d9552c723818db5ebee7734542436b50ffe15b3a96e8e7a6b54f9a0965de78405e16e309193f147108d",
        "proposer_fee_recipient": "0x1268ad189526ac0b386faf06effc46779c340ee6",
        "gas_limit": "30000000",
        "gas_used": "218576",
        "value": "942436999118000",

        // new fields
        "num_tx": "8",
        "block_number": "2081196"
    }
]

Notes:

We call on all relays to implement this change as well. We already have the data, and it will increase usability and allow for more interesting explorations and visualizations by the community. :star:

3 Likes

The new fields are now rolled out on our mainnet relay: