Skip to content

Prototype EB production #690

@dnadales

Description

@dnadales

Why

EB production is a prerequisite for voting, certificates, and full RB-EB linkage. Furthermore, since the November Prototype implements:

  • EB data structures and serialization
  • EB diffusion mini-protocols (LeiosFetch and LeiosNotify)
  • EB storage (SQLite backend)
  • Fetch decision logic

... EB production seems like the next logical step in implementing the Leios prototype.

What

  • A modified block forging logic to produce an EB alongside each RB when elected as slot leader. Note that:
    • The EBs are not linked to RBs at this stage, and therefore have no effect on the ledger state.
    • Transactions included in EBs remain in the mempool (only RB inclusion eventually removes them when they impact the ledger state).
  • A passing ThreadNet test in that shows EBs being forged.
  • A passing run of a local testnet test with transaction generation that shows:
    • EBs are being forged.
    • EBs are diffused to other peers.
    • Transaction latency analysis (which will serve as the basis for setting future KPIs once link EBs to RBs and therefore make transaction in the EBs have impact on the ledger state).

How

  • Modify the block forging logic to produce an EB using the transactions of the mempool.
    • The transactions in the EB should be a superset of the transactions in the corresponding RB.
    • EBs should target the maximum size (~12.5 MB as per CIP-164) when sufficient
      transactions are available.
  • Transaction generation and submission could be done using this tx-generator
  • Add trace events (eg TraceEBProduced, TraceEBEmpty, etc).
  • Run the experiments with different mempool sizes, noting that the mempool capacity should be twice the capacity of an EB, however for experimental runs we might not need to adhere to this constraint, and we can start with the Praos mempool capacity.

Definition of Done

  • EB production code integrated into block forging
  • ThreadNet test passes showing EB production
  • Local testnet test passes showing EB diffusion
  • Transaction latency metrics captured

Known Limitations

  • Mempool will fill up over time since EB transactions are not removed
  • Transaction latency will degrade as mempool becomes saturated
  • This is expected and acceptable for this prototype phase

References

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions