Skip to main content

CommitteeChainVerifier

CommitteeChainVerifier​

class CommitteeChainVerifier

Verifies the committee chain: the sequence of committees linked by each epoch's certified closing checkpoint, whose end-of-epoch data elects the committee of the next epoch.

Starting from a trusted committee (typically the genesis committee, the operator's trust root), feed it each epoch's closing SignedCheckpointSummary in epoch order via Self::verify_epoch_close; every summary a consumer obtains this way is committee-verified, with no trust in whatever transport delivered it.

The walk is transport-agnostic by design — callers drive their own loop (an in-memory list, a remote-store stream, files on disk) and feed summaries in; this type only holds the verification state.

init(trustedCommittee:)​

convenience init(trustedCommittee: ValidatorCommittee) throws

debugDescription​

var debugDescription: String { get }

A textual representation of this instance, suitable for debugging.

Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the String(reflecting:) initializer. This initializer works with any type, and uses the custom debugDescription property for types that conform to CustomDebugStringConvertible:

struct Point: CustomDebugStringConvertible {
let x: Int, y: Int

var debugDescription: String {
return "(\(x), \(y))"
}
}

let p = Point(x: 21, y: 30)
let s = String(reflecting: p)
print(s)
// Prints "(21, 30)"

The conversion of p to a string in the assignment to s uses the Point type's debugDescription property.

committee()​

func committee() -> ValidatorCommittee

The committee of the epoch whose closing checkpoint must be fed next.

epoch()​

func epoch() -> UInt64

The epoch whose closing checkpoint must be fed next.

verifyEpochClose(summary:)​

func verifyEpochClose(summary: SignedCheckpointSummary) throws

Verify summary as the certified closing checkpoint of the current epoch and advance to the committee it elects for the next epoch.