Commit Graph

10682 Commits

Author SHA1 Message Date
Nicholas Dudfield
c2bc4fabe8 fix(consensus): filter export signature candidates 2026-06-28 19:02:32 +07:00
Nicholas Dudfield
94ffc86bd9 fix(consensus): cap export sidecar candidates 2026-06-28 18:18:45 +07:00
Nicholas Dudfield
1d158a910b fix(consensus): cap fetched sidecar cardinality 2026-06-28 17:18:14 +07:00
Nicholas Dudfield
62dc85df86 test(export): cover replay witness pre-scan 2026-06-28 15:49:06 +07:00
Nicholas Dudfield
d7a8467705 refactor(consensus): share active export signer filter 2026-06-28 15:44:18 +07:00
Nicholas Dudfield
8cc4574e0f refactor(export): split closed-ledger result assembly 2026-06-28 15:39:37 +07:00
Nicholas Dudfield
cf3a9ef96b fix(consensus): freeze rng commits before reveal 2026-06-28 15:15:17 +07:00
Nicholas Dudfield
806aa56aec fix(consensus): centralize rng admission 2026-06-28 14:52:00 +07:00
Nicholas Dudfield
cb1f932236 refactor(consensus): share sidecar build helpers 2026-06-28 14:20:55 +07:00
Nicholas Dudfield
e01c0cba70 fix(export): require replay parent for historical apply 2026-06-28 13:53:19 +07:00
Nicholas Dudfield
5e27c2fea9 refactor(consensus): centralize sidecar admission checks 2026-06-28 13:43:16 +07:00
Nicholas Dudfield
19ec9ece35 fix(replay): enforce manual replay ledger hash 2026-06-28 13:33:53 +07:00
Nicholas Dudfield
a714eaa621 fix(consensus): bind entropy reveals to proofed commits 2026-06-28 13:32:26 +07:00
Nicholas Dudfield
f0f998d897 test(export): cover stale ImportVL callback rejection 2026-06-28 12:51:32 +07:00
Nicholas Dudfield
1dbda8f6b3 style(export): satisfy clang-format 2026-06-28 12:34:50 +07:00
Nicholas Dudfield
5149f5ae9b refactor(import): make VL ratchet explicit for callbacks 2026-06-28 12:32:58 +07:00
Nicholas Dudfield
46632be87b refactor(rng): reuse named commit quorum threshold 2026-06-28 12:13:39 +07:00
Nicholas Dudfield
6661e7a40a test(export): move reserve setup to failing test 2026-06-28 11:55:29 +07:00
Nicholas Dudfield
46207a3fca test(export): initialize account root before reserve edit 2026-06-28 11:38:48 +07:00
Nicholas Dudfield
268db0b6d2 fix(export): enforce shadow ticket reserve 2026-06-28 11:24:06 +07:00
Nicholas Dudfield
73f3b7a167 fix(consensus): reject miskeyed rng sidecar leaves 2026-06-28 11:24:00 +07:00
Nicholas Dudfield
1b4535cee5 docs(consensus): clarify rng proposal key checks 2026-06-28 10:30:17 +07:00
Nicholas Dudfield
bb6242213b fix(hooks): enforce xport emit budget 2026-06-28 10:16:53 +07:00
Nicholas Dudfield
0aa8e3ca67 fix(consensus): reject non-secp rng proposal proofs 2026-06-28 10:16:29 +07:00
Nicholas Dudfield
516edb8147 fix(hooks): return export wrapper hash from xport 2026-06-28 10:09:00 +07:00
Nicholas Dudfield
1186a3a7c4 style: apply clang-format 2026-06-27 17:38:11 +07:00
Nicholas Dudfield
9d9329ece4 refactor: reuse proof parser and named entropy tiers 2026-06-27 17:32:37 +07:00
Nicholas Dudfield
465131bb3e refactor: name legacy NetworkID transaction boundary 2026-06-27 16:59:20 +07:00
Nicholas Dudfield
1b0c633eda refactor(consensus): trim small duplicated extension constants
Reuse SidecarPeerAlignment::quorumAligned for export sidecar gates, name the shared sidecar convergence timeout, and centralize the RNG commitment tuple.

Also make ExportLimits::maxExportsPerHook the value enforced by xport_reserve, with a static assertion against the hook ABI constant.
2026-06-27 15:24:06 +07:00
Nicholas Dudfield
ceabb893bf docs(consensus): tighten proposal proof wording
Clarify that fetched RNG commit proofs carry the signed proposal fields plus signature, not only the serialized position bytes.
2026-06-27 15:16:35 +07:00
Nicholas Dudfield
d5ca581cea docs(consensus): explain sidecar reconciliation model
Document the common proposal-relay path, why RNG/Export use fixed-denominator quorum over proposal-borne material, and how sidecar SHAMap fetch/proofs act as secondary distribution rather than authority.

This captures the reconciliation cost/benefit in the committed design doc, separate from the reviewer-facing PR description.
2026-06-27 15:13:22 +07:00
Nicholas Dudfield
8a81588b71 fix(consensus): let quorum-aligned entropy conflicts proceed
Use the fixed-denominator entropy threshold as the conflict boundary: once our entropy hash is quorum-aligned, a below-threshold conflicting minority or silent peer cannot force fallback by withholding full observation.

Update the consensus entropy invariant spine and design doc so the no-veto conflict rule is explicit, and flip the regression test to cover the liveness-preserving path.
2026-06-27 15:09:30 +07:00
Nicholas Dudfield
0a9023c334 fix(export): avoid live manifest filtering of accepted witnesses
Materialize ttEXPORT_SIGNATURES from the accepted export sidecar root during live consensus builds, then let apply trust that tx-stream witness membership while still verifying each signature and enforcing quorum.

Direct apply paths remain conservative, and historical replay uses the same witness-membership rule after manifests may have rotated. Update the intent docs and tests for live, direct, and replay modes.
2026-06-27 13:39:58 +07:00
Nicholas Dudfield
c38567792e fix(hooks): separate callback rng streams 2026-06-27 13:06:28 +07:00
Nicholas Dudfield
3cfc79ea59 fix(consensus): bind rng sidecar proofs to round parent 2026-06-27 13:04:08 +07:00
Nicholas Dudfield
eb3a3b888f fix(consensus): allow shared diagnostics in export-only rounds 2026-06-27 12:56:19 +07:00
Nicholas Dudfield
c56cb34d6d fix(consensus): total-order entropy selector inputs 2026-06-27 12:45:21 +07:00
Nicholas Dudfield
306566ccb6 fix(hooks): bound export reservations by emit budget 2026-06-27 12:40:16 +07:00
Nicholas Dudfield
8ddbe0891a docs(consensus): capture sidecar validation boundary 2026-06-27 12:32:10 +07:00
Nicholas Dudfield
deb1b2af0b fix(consensus): validate extension sidecar inputs
Reject malformed RNG sidecar signing keys before PublicKey construction so fetched untrusted leaves cannot trigger an uncatchable LogicError abort. Also re-check proposal signatures at the extension harvest boundary so cluster-relayed invalid proposals cannot populate RNG or export sidecar state.
2026-06-27 12:25:52 +07:00
Nicholas Dudfield
4dcb3f3557 fix(consensus): remove local entropy fallback shortcuts
Encode fallback-vs-nonfallback as a ledger-defining decision, remove the prevProposers/bootstrap and visible-peer impossible-quorum shortcuts, and use proofed commit material for the timeout transition. Update unit/CSF/testnet coverage and document the remaining validation-backstopped timing residual.

Tests: x-run-tests --stop-on-fail ConsensusExtensions; x-run-tests --stop-on-fail ConsensusRng; x-format-changed; git diff --check
2026-06-27 12:08:35 +07:00
Nicholas Dudfield
efcd2a0ab7 fix(export): close replay witness review gaps
Thread the replay parent through ApplyOptions so export replay can rebuild the historical validator view without relying on LedgerMaster visibility for freshly replayed parents.

Harden ttEXPORT_SIGNATURES canonicality before witness indexing, validate witness signer accounts against their pubkeys, reject ambiguous absent NetworkID on low-ID source chains, and lock the consensus phase accessor.

Add focused regression coverage and clarify that destination SignerList/quorum compatibility is an operator/client contract.
2026-06-27 10:53:34 +07:00
Nicholas Dudfield
8ddb0a1134 docs(export): document witness assembly contract
State that clients expanding sfExportSignatureHash must match ExportResultBuilder's canonical signer ordering, empty SigningPubKey, and target-chain signer cap before hashing or submitting.
2026-06-27 10:14:43 +07:00
Nicholas Dudfield
891077daa7 fix(export): harden witness edge checks
Validate ttEXPORT_SIGNATURES witness bindings in preflight, guard standalone witness synthesis against malformed inner transactions, and align ticket-path XPOP quorum with Export's ceiling threshold.

Regenerate the genesis hook sfcodes header and add it to generated-header verification so CI catches future drift.
2026-06-27 10:10:45 +07:00
Nicholas Dudfield
f0224cac1e fix(export): replay witnesses without current manifests
Historical LedgerReplay now treats ttEXPORT_SIGNATURES witnesses as validated-history membership input, while still verifying signatures and threshold. Live build and validation keep the current manifest-backed active-signer check.

Harden witness handling by indexing only canonical same-ledger pseudos, dropping duplicate witnesses as ambiguous, and replacing pre-existing mismatched witnesses with the accepted sidecar witness during onPreBuild.

Document the lean witness-vs-XPOP proof distinction and cover the manifest-rotation replay case with an Export regression test.
2026-06-27 09:38:07 +07:00
Nicholas Dudfield
845798b072 fix(export): replay signatures through witness pseudo 2026-06-27 08:13:23 +07:00
Nicholas Dudfield
9f04dcf582 docs(export): capture replay witness invariant 2026-06-27 06:00:16 +07:00
Nicholas Dudfield
2fbf2e11bc fix(consensus): drop late sidecars after accept 2026-06-27 05:25:31 +07:00
Nicholas Dudfield
bac359fd96 docs(consensus): add entropy intent spine 2026-06-27 05:14:00 +07:00
Nicholas Dudfield
9f24cd0b75 docs(consensus): describe entropy no-veto gate 2026-06-26 22:11:43 +07:00