f3

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Overview

Package f3 is a thin wrapper around github.com/filecoin-project/go-f3 that follows the F3 (Filecoin Finality Fast-forward) finality-certificate stream.

Given an initial PowerTable (from the network manifest) and a sequence of FinalityCertificates, this package verifies the aggregate BLS signature of each certificate against >=2/3 of voting power and walks the power table forward by applying each cert's power diff. It exposes the resulting terminal power table and the chain of finalized TipSetKeys to chain/header and chain/trustedroot.

The package itself contains no BLS code: it relies on go-f3/blssig.VerifierWithKeyOnG1 (pure-Go gnark + kyber).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseManifest

func ParseManifest(jsonBytes []byte) (*manifest.Manifest, error)

Manifest loads the network manifest from a JSON byte slice. JSON is the same shape Lotus ships in build/buildconstants/f3manifest_*.json.

func Verifier

func Verifier() gpbft.Verifier

Verifier returns a pure-Go BLS verifier suitable for go-f3's certs.ValidateFinalityCertificates.

go-f3's blssig.VerifierWithKeyOnG1 is implemented against go-f3/internal/gnark (Consensys gnark-crypto) and kyber's BDN scheme; no CGo, no filecoin-ffi.

func VerifyCertChain

func VerifyCertChain(
	network gpbft.NetworkName,
	initialPower gpbft.PowerEntries,
	firstInstance uint64,
	certsList []*certs.FinalityCertificate,
) (uint64, *gpbft.ECChain, gpbft.PowerEntries, error)

VerifyCertChain validates a list of consecutive finality certificates, starting at `firstInstance`, against the initial power table. It returns:

  • nextInstance: the GPBFT instance immediately after the last validated cert
  • finalChain: the EC chain finalized by the last cert (head-most tipset key is the new "F3 finalized" tip)
  • newPowerTable: the power table to use validating the next cert

Lantern keeps (finalChain.Head(), newPowerTable, nextInstance) as the F3 witness inside the TrustedRoot.

func VerifySingleCert

func VerifySingleCert(
	network gpbft.NetworkName,
	prevPower gpbft.PowerEntries,
	expectedInstance uint64,
	cert *certs.FinalityCertificate,
) (gpbft.PowerEntries, error)

VerifySingleCert validates a single new cert against the current power table and current instance counter. Mirrors VerifyCertChain for the steady-state follower path.

Types

This section is empty.

Directories

Path Synopsis
Package anchor handles persistent F3 trust anchors.
Package anchor handles persistent F3 trust anchors.
Package certexch implements Lantern's F3 cert-exchange responder.
Package certexch implements Lantern's F3 cert-exchange responder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL