Event stream structure
Hyperledger Besu events are streamed to brokers in serialized JSON format.
Events are structured as follows:
{
"uuid":"9bd9efec-b0b7-4656-9856-e18750cc5ff5",
"type":"BlockPropagated",
"timestamp":1573563320223,
"event":{...}
}
Key | Description |
---|---|
uuid | ID of the event |
type | Event type. Possible types are BlockAdded , BlockPropagated , BlockReorged , TransactionAdded , TransactionDropped , TransactionReverted , or SyncStatusChanged |
timestamp | Unix formatted timestamp of the event |
event | Details of the event type . For more information, see BlockAdded , BlockPropagated , BlockReorged , TransactionAdded , TransactionDropped , TransactionReverted , and SyncStatusChanged |
BlockAdded
This event is sent when a block is added to the blockchain.
Key | Description |
---|---|
hash | Block hash |
number | Block number |
nonce | Block PoW nonce challenge. For IBFT 2.0 or Clique, this is the same as the value in the Genesis file |
difficulty | Difficulty level of this block |
gasLimit | Block gas limit |
gasUsed | Total gas used for transactions in this block |
timestamp | Unix timestamp of the block creation |
coinbase | Miner address |
extraData | Block extra data added by the miner or validator (Clique or IBFT 2.0) |
logsBloom | Log bloom filter |
mixHash | Block Proof of Work (PoW) mix hash. For IBFT 2.0 or Clique, this is the same as the value in the Genesis file |
ommersHash | Block uncles' hashes |
parentHash | Parent block's hash |
receiptsRoot | Block receipt root hash |
transactionsRoot | Block transaction root hash |
stateRoot | Block state root hash |
BlockPropagated
This event is sent when a block is created.
Key | Description |
---|---|
hash | Block hash |
number | Block number |
nonce | Block PoW nonce challenge. For IBFT 2.0 or Clique, this is the same as the value in the Genesis file |
difficulty | Difficulty level of this block |
totalDifficulty | Total difficulty of the chain until this block |
gasLimit | Block gas limit |
gasUsed | Total gas used for transactions in this block |
timestamp | Unix timestamp of the block creation |
coinbase | Miner address |
extraData | Block extra data added by the miner or validator (Clique or IBFT 2.0) |
logsBloom | Log bloom filter |
mixHash | Block Proof of Work (PoW) mix hash. For IBFT 2.0 or Clique, this is the same as the value in the Genesis file |
ommersHash | Block uncle's hashes |
parentHash | Parent block's hash |
receiptsRoot | Block receipt root hash |
transactionsRoot | Block transaction root hash |
stateRoot | Block state root hash |
BlockReorged
This event is sent when a block is removed by a chain reorganization.
Key | Description |
---|---|
hash | Block hash |
number | Block number |
nonce | Block PoW nonce challenge. For IBFT 2.0 or Clique, this is the same as the value in the Genesis file |
difficulty | Difficulty level of this block |
gasLimit | Block gas limit |
gasUsed | Total gas used for transactions in this block |
timestamp | Unix timestamp of the block creation |
coinbase | Miner address |
extraData | Block extra data added by the miner or validator (Clique or IBFT 2.0) |
logsBloom | Log bloom filter |
mixHash | Block Proof of Work (PoW) mix hash. For IBFT 2.0 or Clique, this is the same as the value in the Genesis file |
ommersHash | Block uncles' hashes |
parentHash | Parent block's hash |
receiptsRoot | Block receipt root hash |
transactionsRoot | Block transaction root hash |
stateRoot | Block state root hash |
TransactionAdded
This event is sent when a transaction is added to the transaction pool.
Key | Description |
---|---|
nonce | Number of transactions sent by the sender |
gasPrice | Gas price for the transaction, in Wei |
gas | Amount of gas used for the transaction |
value | Ether value transferred, in Wei |
v , r , and s | Transaction signature components |
from | Transaction sender address |
input | Transaction payload |
hash | Transaction hash |
to | Transaction recipient (if present) |
chainId | ID of the chain on which the transaction should be executed |
TransactionDropped
This event is sent when a transaction is dropped from the transaction pool.
Key | Description |
---|---|
nonce | Number of transactions sent by the sender |
gasPrice | Gas price for the transaction, in Wei |
gas | Amount of gas used for the transaction |
value | Ether value transferred, in Wei |
v , r , and s | Transaction signature components |
from | Transaction sender address |
input | Transaction payload |
hash | Transaction hash |
to | Transaction recipient (if present) |
chainId | ID of the chain on which the transaction should be executed |
TransactionReverted
This event is sent for each reverted transaction that contains a revert reason when adding a block to the blockchain.
Key | Description |
---|---|
blockHash | Block hash |
blockNumber | Block number |
transactionHash | Transaction hash |
revertReason | Revert reason |
SyncStatusChanged
This event is indicates the synchronization progress.
Key | Description |
---|---|
startingBlock | Block number when starting the synchronization process |
currentBlock | Current block number during the synchronization process |
highestBlock | Highest known block number of the chain |