1 unstable release
Uses new Rust 2024
| 0.1.0 | Sep 24, 2025 |
|---|
#7 in #justification
85 downloads per month
Used in 4 crates
54KB
1K
SLoC
rust-f3
======== Rust F3 implementation.
Rust-F3 structure and architecture.
Rough diagram
flowchart TD
subgraph s1["F3 instance"]
n1["Certificates<br>* verification<br>* creation<br><br>"]
n2["Manifest"]
n4["Cert Xchange<br>*client<br>*server"]
n6["Manifest Xchange"]
n7["Consensus<br>* state machine"]
end
n1 <--> n4
n6 --> n2
n7 <--> n1
n7 --> n8["EC instance"]
n4 <--> n9("Network")
n6 <--> n9
n2 --> n4
n2 --> n7
GPBFT consensus primitives and logic.
Pretty much all the other modules of the fast-finality gadget depend on this one. It defines:
- Participation primitives and logic
- Common interfaces and APIs, such as:
- Consensus message validator
- Signature verifier
- Telemetry metrics
- etc
- Consensus statemachine.
Manifest
F3 configuration
Dynamic manifest
- allows changing f3 configuration at runtime
- updates sent via libp2p
Certificate exchange and verification
A crucial part of fast-finality that allows for quick finalization of chain prefixes.
Client
This is the first step needed to be able to follow F3 consensus without active participation.
- Allows for requesting finality certificates
- Implements certificate verification logic
Server
A libp2p certificate exchange server.
- fetches requested powertables from storage
- fetches requested certs from storage
- marshals that into CBOR
- sends the response over the network
f3 server
Where it all comes together
- runs the consensus instance + libp2p exchange
- runs the certificate exchange client/server via libp2p
- manifest provider - f3 config updates via libp2p
FAQ
- What is a finality certificate?
- A certificate that proves that a given chain prefix is final. It must be signed by a super-majority of a power table.
lib.rs:
GPBFT consensus protocol implementation.
This module provides the core structures and logic for the GPBFT consensus protocol, including:
- Chain and tipset structures for blockchain state representation
- Power table management for validator voting power tracking
- Consensus phases and payload structures
- Justification and verification mechanisms
- Network types such as
ActorId,StoragePower, andPubKey
Key components:
ECChain: Represents a chain of tipsetsPowerTable: Manages validator voting powerPayload: Contains consensus round informationJustification: Holds votes and signatures for consensus decisions
This module enables:
- Building and validating blockchain structures
- Managing validator power and keys
- Progressing through consensus phases
- Creating and verifying consensus decisions
It provides the foundational types and logic for implementing GPBFT consensus in a blockchain network.
Dependencies
~9MB
~171K SLoC