sgns::account::BurnConfig¶
Genesis-seeded, in-memory-cached, quorum-updatable BURN_BASIS_POINTS value. Delegates ALL signature/quorum logic to SecureCrdt/SecureCrdtRegistry – no bespoke signature/quorum logic exists here (mirrors TPR-03 precedent).
#include <BurnConfig.hpp>
Inherits from std::enable_shared_from_this< BurnConfig >
Public Types¶
| Name | |
|---|---|
| using std::function< void(uint64_t)> | RefreshCallback |
Public Functions¶
| Name | |
|---|---|
| BurnConfig(std::shared_ptr< sgns::securecrdt::SecureCrdt > secure_crdt, std::shared_ptr< sgns::crdt::GlobalDB > db, std::shared_ptr< sgns::trustedpeer::TrustedPeerRegistry > trusted_peer_registry, uint64_t quorum_threshold, std::shared_ptr< sgns::GeniusAccount > account, sgns::crdt::HierarchicalKey base_key) | |
| ~BurnConfig() | |
| uint64_t | GetCachedBasisPoints() const Returns the currently-cached, quorum-confirmed basis-points value (relaxed atomic load) – no live CRDT read. |
| void | RegisterRefreshCallback(RefreshCallback cb) Registers a callback invoked whenever the cached basis-points value changes as a result of a fresh quorum-re-derivation. |
| void | Unregister() Unregisters this instance's signer-set-source from SecureCrdtRegistry (test-fixture teardown helper). |
| outcome::result< std::shared_ptr< BurnConfig > > | New(std::shared_ptr< sgns::securecrdt::SecureCrdt > secure_crdt, std::shared_ptr< sgns::crdt::GlobalDB > db, std::shared_ptr< sgns::trustedpeer::TrustedPeerRegistry > trusted_peer_registry, uint64_t quorum_threshold, std::shared_ptr< sgns::GeniusAccount > account, sgns::crdt::HierarchicalKey base_key =sgns::crdt::HierarchicalKey("burn-config")) Constructs a BurnConfig, registers its signer-set-source and CRDT change-callback, and auto-seeds the genesis default exactly once if eligible. |
Public Attributes¶
| Name | |
|---|---|
| constexpr uint64_t | GENESIS_DEFAULT_BASIS_POINTS Known genesis default burn-basis-points value (BURN-03 pre-quorum fallback). |
Public Types Documentation¶
using RefreshCallback¶
Public Functions Documentation¶
function BurnConfig¶
BurnConfig(
std::shared_ptr< sgns::securecrdt::SecureCrdt > secure_crdt,
std::shared_ptr< sgns::crdt::GlobalDB > db,
std::shared_ptr< sgns::trustedpeer::TrustedPeerRegistry > trusted_peer_registry,
uint64_t quorum_threshold,
std::shared_ptr< sgns::GeniusAccount > account,
sgns::crdt::HierarchicalKey base_key
)
function ~BurnConfig¶
function GetCachedBasisPoints¶
Returns the currently-cached, quorum-confirmed basis-points value (relaxed atomic load) – no live CRDT read.
Return: Cached basis-points value.
function RegisterRefreshCallback¶
Registers a callback invoked whenever the cached basis-points value changes as a result of a fresh quorum-re-derivation.
Parameters:
- cb Callback receiving the new basis-points value.
function Unregister¶
Unregisters this instance's signer-set-source from SecureCrdtRegistry (test-fixture teardown helper).
function New¶
static outcome::result< std::shared_ptr< BurnConfig > > New(
std::shared_ptr< sgns::securecrdt::SecureCrdt > secure_crdt,
std::shared_ptr< sgns::crdt::GlobalDB > db,
std::shared_ptr< sgns::trustedpeer::TrustedPeerRegistry > trusted_peer_registry,
uint64_t quorum_threshold,
std::shared_ptr< sgns::GeniusAccount > account,
sgns::crdt::HierarchicalKey base_key =sgns::crdt::HierarchicalKey("burn-config")
)
Constructs a BurnConfig, registers its signer-set-source and CRDT change-callback, and auto-seeds the genesis default exactly once if eligible.
Parameters:
- secure_crdt SecureCrdt wrapper to delegate propose/sign/ quorum operations to.
- db GlobalDB instance (needed directly for RegisterNewElementCallback).
- trusted_peer_registry Signer-set source (D-05).
- quorum_threshold Quorum threshold to enforce.
- account This node's account (genesis auto-seed signing).
- base_key Registered CRDT key this instance owns.
Return: outcome::success(instance) on success, or outcome::failure(SecureCrdt::Error::QUORUM_THRESHOLD_BELOW_FLOOR) if quorum_threshold is below the majority-safety floor for the current trusted-peer set size (D-07) – construction FAILS, no instance is produced.
Public Attributes Documentation¶
variable GENESIS_DEFAULT_BASIS_POINTS¶
Known genesis default burn-basis-points value (BURN-03 pre-quorum fallback).
Updated on 2026-08-07 at 17:48:02 +0000