subsystem-summary-of-scp

Installation
SKILL.md

SCP Subsystem — Technical Summary

Overview

The SCP (Stellar Consensus Protocol) subsystem implements the federated Byzantine agreement protocol used by stellar-core to reach consensus on ledger values. It is a self-contained library with a clean driver interface (SCPDriver) that decouples protocol logic from networking, persistence, and application-specific validation. The protocol operates in two main stages: nomination (proposing and filtering candidate values) and balloting (converging on a single value through prepare/confirm/externalize phases).

Key Files

  • SCP.h / SCP.cpp — Top-level SCP class; entry point for receiving envelopes, nominating values, managing slots.
  • SCPDriver.h / SCPDriver.cpp — Abstract driver interface that the application implements; handles signing, validation, timers, quorum set retrieval, hashing, and event callbacks.
  • Slot.h / Slot.cpp — Per-slot state container; owns NominationProtocol and BallotProtocol instances.
  • NominationProtocol.h / NominationProtocol.cpp — Nomination phase logic: voting for values, federated acceptance, candidate promotion.
  • BallotProtocol.h / BallotProtocol.cpp — Ballot phase logic: prepare/confirm/externalize state machine, ballot bumping, timer management.
  • LocalNode.h / LocalNode.cpp — Represents the local node; owns quorum set, provides quorum slice / v-blocking set checks.
  • QuorumSetUtils.h / QuorumSetUtils.cpp — Quorum set sanity checking and normalization utilities.

Key Classes and Data Structures

Related skills
Installs
1
GitHub Stars
3.3K
First Seen
Apr 29, 2026