docs: clarify entropy and runtime test APIs

This commit is contained in:
Nicholas Dudfield
2026-06-23 16:42:05 +07:00
parent 8bf1ece0a0
commit ddfb1dbeb6
2 changed files with 30 additions and 3 deletions

View File

@@ -352,6 +352,18 @@ xport(
extern int64_t
xport_cancel(uint32_t ticket_seq);
/*
Consensus entropy APIs.
min_tier is a fail-closed floor:
1 = consensus_fallback, 2 = participant_aligned, 3 = validator_quorum.
min_count is the minimum validator/reveal count the caller accepts.
If the most recent finalized entropy object does not satisfy both floors,
these APIs return TOO_LITTLE_ENTROPY. Open-ledger and simulate execution
are provisional previews over the entropy currently visible to the node;
final ordered ledger execution may see a different entropy object.
*/
extern int64_t
dice(uint32_t sides, uint32_t min_tier, uint32_t min_count);

View File

@@ -152,21 +152,36 @@ public:
std::optional<ConsensusTestConfig>
getConsensusTestConfig() const;
/** Set daemon-wide consensus/export test config. */
/** Set daemon-wide consensus/export test config.
Direct setters are for in-process tests and test harnesses. External
env/RPC mutation is compile-gated; production code should not call
these as a runtime configuration surface.
*/
void
setGlobalConfig(ConsensusTestConfig const& cfg);
void
clearGlobalConfig();
/** Set default peer send fault config. */
/** Set default peer send fault config.
Direct setters are for in-process tests and test harnesses. External
env/RPC mutation is compile-gated; production code should not call
these as a runtime configuration surface.
*/
void
setPeerDefaults(PeerFaultConfig const& cfg);
void
clearPeerDefaults();
/** Set config for one peer key (without the "peer:" prefix). */
/** Set config for one peer key (without the "peer:" prefix).
Direct setters are for in-process tests and test harnesses. External
env/RPC mutation is compile-gated; production code should not call
these as a runtime configuration surface.
*/
void
setPeerConfig(std::string const& peerAddress, PeerFaultConfig const& cfg);