package
0.3.10
Repository: https://github.com/ssvlabs/ssv-spec.git
Documentation: pkg.go.dev

# README

QBFT

Introduction

This is a spec implementation for the QBFT protocol, following formal verification spec / github repo.

Important note on message processing

The spec only deals with message process logic but it's also very important the way controller.ProcessMsg is called. Message queueing and retry are important as there is no guarantee as to when a message is delivered. Examples:

  • A proposal message can be delivered after its respective prepare
  • A next round message can be delivered before the timer hits timeout
  • A late commit message can decide the instance even if it started the next round
  • A message can fail to process because it's "too early" or "too late"

Because of the above, there is a need to order and queue messages based on their round and type so to not lose message and make the protocol round change.

TODO

  • Support 4,7,10,13 committee sizes
  • Message encoding and validation spec tests
  • proposal/ prepare/ commit spec tests
  • round change spec tests
  • [//] Unified test suite, compatible with the formal verification spec
  • [//] Align according to spec and Roberto's comments
  • Remove round check from upon commit as it can be for any round?
  • Use data hashes instead of full data in msgs to save space in justifications

# Packages

No description provided by the author

# Functions

No description provided by the author
CreateCommit* Commit( signCommit( UnsignedCommit( |current.blockchain|, current.round, signHash(hashBlockForCommitSeal(proposedBlock), current.id), digest(proposedBlock)), current.id ) ); */.
CreatePrepare* Prepare( signPrepare( UnsignedPrepare( |current.blockchain|, newRound, digest(m.proposedBlock)), current.id ) ); */.
CreateProposal* Proposal( signProposal( UnsignedProposal( |current.blockchain|, newRound, digest(block)), current.id), block, extractSignedRoundChanges(roundChanges), extractSignedPrepares(prepares)); */.
CreateRoundChange* RoundChange( signRoundChange( UnsignedRoundChange( |current.blockchain|, newRound, digestOptionalBlock(current.lastPreparedBlock), current.lastPreparedRound), current.id), current.lastPreparedBlock, getRoundChangeJustification(current) ) */.
HashDataRoot hashes input data to root.
HasPartialQuorum returns true if a unique set of signers has partial quorum.
HasQuorum returns true if a unique set of signers has quorum.
IsDecidedMsg returns true if signed commit has all quorum sigs.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RoundRobinProposer returns the proposer for the round.
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
FirstRound value is the first round in any QBFT instance start.
NoRound represents a nil/ zero round.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

stop processing instances after 8*2+120*6 = 14.2 min (~ 2 epochs).

# Structs

No description provided by the author
Controller is a QBFT coordinator responsible for starting and following the entire life cycle of multiple QBFT InstanceContainer.
Instance is a single QBFT instance that starts with a Start call (including a value).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
Network is the interface for networking across QBFT components.
Timer is an interface for a round timer, calling the UponRoundTimeout when times out.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author