Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Refactor consensus code into polkadot/substrate components #67

@rphmeier

Description

@rphmeier

The BFT code just needs a couple of things:

  • Messages in
  • Messages out
  • Sign message with local key
  • Round proposer
  • Round timeouts
  • Proposal generation function
  • Proposal evaluation function

The proposal generation and evaluation functions should encapsulate the behavior of the specific substrate chain. This can be packaged up into its own trait.

We can package this up in a substrate-bft crate.

polkadot-statement-table crate:
The details of the proposal generation/evaluation function are what encapsulates the current statement table logic. This needs

  • Misbehavior type
  • Import of incoming statements
  • Incoming statements to trigger fetch of candidate data for evaluation of availability
  • Signing statements
  • Creation of batches of outgoing messages (to be done on a timer or by some other heuristic)

polkadot-consensus crate:

  • service built on top of the substrate-network
  • maintains connections to authorities
  • combined router for substrate-bft and polkadot-statement-table messages
  • manages local consensus identity and signing of messages
  • collates local parachain candidate
  • fetches and evaluates other candidates as necessary
  • creates full substrate block from statement table and transaction queue
  • accumulates misbehavior to be evaluated on-chain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions