Skip to content
Egor Lysenko edited this page Feb 23, 2022 · 3 revisions

Event

An event (or an event block) is a vertex in the DAG, which stores the structure of consensus messages. Each event has a number of links to past events (parents). The links are the graph edges.

In this wiki, we may use event and event block interchangeably. Do not confuse event block and block - those are different terms.

Each event is a signed consensus message by a validator sent to the network, which states that: I have observed and have validated the following past events (and their parents), which are included as parents of this event. I originate the transactions list belonging to this event.

A combination of such messages are used to compute the final order of transactions, which is exactly the same on all the nodes, regardless of network delays, clock drifts, and malicious validators. This is done by the aBFT consensus algorithm.

Event structure

  • event.Epoch - epoch number (see epoch). Not less than 1.
  • event.Seq - sequence number. Equal to self-parent’s seq + 1, if no self-parent, then 1.
  • event.Frame - frame number (see consensus). Not less than 1.
  • event.Creator - ID of validator which created event.
  • event.PrevEpochHash - hash of finalized state of previous epoch.
  • event.Parents - list of parents (graph edges). May be empty. If Seq > 1, then first element is self-parent.
  • event.GasPowerLeft - amount of not spent validator's gas power for each gas power window, after connection of this event (see gas_power).
  • event.GasPowerUsed - amount of spent validator's gas power in this event (see gas_power).
  • event.Lamport - Lamport timestamp. If parents list is not empty, then Lamport timestamp of an event v, denoted by LS(v) is max{LS(u) | u is a parent of v} + 1. Otherwise, LS(v) is 1
  • event.CreationTime - UnixNano timestamp. Specified by the creator of event. Cannot be lower than creation time of self-parent (if self-parent exists). CAN be too-far-in-future, or too-far-in-past.
  • event.MedianTime - UnixNano timestamp. Weighted median of highest observed events (their CreationTime) from each validator. Events from the cheater validators aren’t counted. This timestamp is used to protect against "too-far-in-future" and "too-far-in-past".
  • event.PayloadHash - hash of event.Transactions, event.MPs, event.BVs, event.EVs.
  • event.Transactions - list of originated transactions.
  • event.MPs - list of misbehaviour proofs.
  • event.BVs - list of LLR block votes.
  • event.EVs - list of LLR epoch votes.
  • event.Sig - ECDSA256 secp256k1 validator's signature in the R/S format (64 bytes).

Graph example