#bls-signatures #signature-verification #bls12-381 #filecoin #f3 #finality #prevent

filecoin-f3-blssig

BLS signature handling for the F3 fast finality protocol

1 unstable release

Uses new Rust 2024

0.1.0 Sep 24, 2025

#6 in #f3


Used in filecoin-f3-lightclient

MIT/Apache

62KB
1K SLoC

rust-f3

main codecov

======== Rust F3 implementation.

Rust-F3 structure and architecture.

FIP-0086

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.

  1. fetches requested powertables from storage
  2. fetches requested certs from storage
  3. marshals that into CBOR
  4. 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

  1. 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:

BLS signature implementation using BDN aggregation scheme.

This module implements the BLS signature scheme used in the Filecoin F3 protocol. It uses the BLS12_381 curve with G1 for public keys and G2 for signatures. The BDN (Boneh-Drijvers-Neven) scheme is used for signature and public key aggregation to prevent rogue public-key attacks.

Dependencies

~11MB
~200K SLoC