sgns::securecrdt¶
Classes¶
| Name | |
|---|---|
| class | sgns::securecrdt::ISignedCRDTData Interface implemented by every CRDT-backed value that requires a quorum of authorized signers to create/update. |
| class | sgns::securecrdt::SecureCrdt Mandatory wrapper for reading/writing registered SecureCrdt keys. |
| class | sgns::securecrdt::SecureCrdtRegistry Static registry resolving a CRDT key to its SecureCrdtRegistryEntry. |
| struct | sgns::securecrdt::SecureCrdtRegistryEntry Policy entry describing how a registered key pattern is verified and instantiated. |
| struct | sgns::securecrdt::SignerSetSnapshot Snapshot of an authorized signer set and its required signature count, as produced by an injected SignerSetSource. |
Types¶
| Name | |
|---|---|
| using std::function< outcome::result< SignerSetSnapshot >(const std::string &base_key)> | SignerSetSource Injectable callback resolving the current authorized signer set for a given base_key. NOT hard-wired to TrustedPeerRegistry (which does not exist until Phase 10) - tests inject a fixed-list lambda. |
Functions¶
| Name | |
|---|---|
| outcome::result< void > | ValidateQuorumThreshold(uint64_t threshold, size_t signer_set_size) Validates that threshold is at or above the majority-safety floor for a signer set of size signer_set_size (ceil(0.51*signer_set_size), computed via integer arithmetic). |
Types Documentation¶
using SignerSetSource¶
using sgns::securecrdt::SignerSetSource = typedef std::function<outcome::result<SignerSetSnapshot>( const std::string &base_key )>;
Injectable callback resolving the current authorized signer set for a given base_key. NOT hard-wired to TrustedPeerRegistry (which does not exist until Phase 10) - tests inject a fixed-list lambda.
Functions Documentation¶
function ValidateQuorumThreshold¶
inline outcome::result< void > ValidateQuorumThreshold(
uint64_t threshold,
size_t signer_set_size
)
Validates that threshold is at or above the majority-safety floor for a signer set of size signer_set_size (ceil(0.51*signer_set_size), computed via integer arithmetic).
Parameters:
- threshold Configured quorum threshold to validate.
- signer_set_size Construction-time membership size of the registry being built (e.g. genesis_peers.size()).
Return: outcome::success() if threshold >= the majority floor, outcome::failure(SecureCrdt::Error::QUORUM_THRESHOLD_BELOW_FLOOR) otherwise.
Updated on 2026-08-26 at 21:24:47 +0000