Commit Graph

117 Commits

Author SHA1 Message Date
Nicholas Dudfield
37d9eaaa2b fix(protocol): reset moved validator bitsets 2026-07-13 19:05:22 +07:00
Nicholas Dudfield
f8a8d8bfc0 fix(protocol): own validated bitset storage 2026-07-13 18:56:56 +07:00
Nicholas Dudfield
62050233a5 fix(protocol): require validated validator bitsets 2026-07-13 18:44:13 +07:00
Nicholas Dudfield
f3897836f3 refactor(consensus): share validator bitset helpers 2026-07-13 18:37:47 +07:00
Nicholas Dudfield
c5edcdbbcd docs: mark account incarnation allocation evidence 2026-07-13 10:13:14 +07:00
Nicholas Dudfield
fa71bb62c2 Revert "feat(consensus): consolidate UNL report amendment"
This reverts commit 0cdd7164f4.
2026-07-13 05:56:15 +07:00
Nicholas Dudfield
22d89fb897 Revert "feat(consensus): add UNL report member registry"
This reverts commit ab30826c5c.
2026-07-13 05:56:15 +07:00
Nicholas Dudfield
ab30826c5c feat(consensus): add UNL report member registry 2026-07-11 14:17:47 +07:00
Nicholas Dudfield
0cdd7164f4 feat(consensus): consolidate UNL report amendment 2026-07-11 13:32:11 +07:00
Nicholas Dudfield
56bf9f2eed fix(export): align callback identity and signer authority 2026-07-10 15:50:39 +07:00
Nicholas Dudfield
7f6a29770c fix(consensus): align nUNL vote cap with active view 2026-07-07 18:09:50 +07:00
Nicholas Dudfield
3eaf7b9e3d feat(consensus): record entropy contributors 2026-07-03 19:21:10 +07:00
Nicholas Dudfield
e8d40472e9 feat(consensus): add validator full entropy tier 2026-07-02 21:08:37 +07:00
Nicholas Dudfield
fa876927a9 feat: record consensus entropy denominator 2026-07-02 17:38:40 +07:00
Nicholas Dudfield
63f99ad9d8 feat(consensus): salt tx ordering with entropy 2026-06-29 16:32:16 +07:00
Nicholas Dudfield
be649d5112 fix(export): bound retry window 2026-06-29 14:28:20 +07:00
Nicholas Dudfield
8c48e500e7 fix(consensus): domain-separate participant diagnostics 2026-06-29 11:49:26 +07:00
Nicholas Dudfield
4a12f4c231 fix(hook): harden xport and xpop host paths 2026-06-28 19:41:20 +07:00
Nicholas Dudfield
268db0b6d2 fix(export): enforce shadow ticket reserve 2026-06-28 11:24:06 +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
845798b072 fix(export): replay signatures through witness pseudo 2026-06-27 08:13:23 +07:00
Nicholas Dudfield
72f73ccbad test(hooks): pin export reservation budget 2026-06-26 21:31:34 +07:00
Nicholas Dudfield
d5608c3110 style(export): match CI clang-format wrapping 2026-06-26 20:06:57 +07:00
Nicholas Dudfield
3c108d3a87 fix(protocol): preserve local TER code values
Keep telENV_RPC_FAILED in its original local-error slot and append telSHADOW_TICKET_REQUIRED after it, with a TER regression test pinning both values.
2026-06-26 17:40:46 +07:00
Nicholas Dudfield
b4208459cf fix(consensus): harden export signatures and weak RNG domain
Bound proposal-carried export signature blobs before hashing them during proposal precheck, and apply the same size cap at export signature harvest as defense in depth.

Cap the unverified export-signature cache by distinct tx hash while leaving verified signatures and existing entries ungated, so real exports can still reach quorum.

Domain-separate Hook RNG using the actual strong/weak execution role at draw time, and document the residual commit/reveal withholding bias across all entropy tiers.
2026-06-26 17:08:32 +07:00
Nicholas Dudfield
c8fad50d66 Merge origin/dev into feature-export-rng
# Conflicts:
#	src/xrpld/app/hook/applyHook.h
2026-06-17 11:45:42 +07:00
Nicholas Dudfield
d9b5fc26fc style(rng): apply clang-format 2026-06-17 11:35:05 +07:00
Richard Holland
639ea34377 Fixhookmap (#756) 2026-06-16 17:06:25 +10:00
tequ
78167e09c0 change sfHookOn of ltHookDefinition to soeOptional for HookOnV2 (#755) 2026-06-16 13:58:53 +10:00
tequ
607a7fdf98 Change AMM to Supported::no (#758) 2026-06-16 13:56:58 +10:00
Nicholas Dudfield
c3cc3513c9 docs(rng): refresh tier 2 terminology 2026-06-16 10:05:57 +07:00
Nicholas Dudfield
a0be935227 docs(rng): correct stale tier-2 comments
Codex final-review minors, both comment-only (no behavior change): EntropyTier participant_aligned no longer says "reserved for a future" tier (it is implemented in this stack); and the commit-timeout path comment said "fixed UNL quorum" but the code now uses entropyGateThreshold() (min(quorum, tier2)).
2026-06-16 09:45:08 +07:00
Nicholas Dudfield
c92c0656ec feat(rng): tier 3 consensus-bound fallback entropy
Replace the zero-entropy fallback with a deterministic consensus-bound
digest so every RNG-enabled ledger carries usable entropy:

- sha512Half(HashPrefix::entropyFallback, prevLedgerHash, baseTxSetHash,
  seq) — all inputs are already consensus-agreed at injection time, so
  no new agreement machinery is needed and the digest is identical on
  every node building the same ledger
- new sfEntropyTier (UINT8) on the ttCONSENSUS_ENTROPY pseudo-tx and
  ConsensusEntropy ledger entry: EntropyCount says how many validators
  contributed, EntropyTier says which gate the result passed
  (validator_quorum vs consensus_fallback; participant_aligned reserved)
- the fallback digest derives from the BASE (pre-injection) tx set hash
  to avoid circularity; entropy pseudo-tx dedup is now type-based since
  an explicit-final synthetic set can carry a pseudo-tx whose txID
  implicit nodes cannot re-derive
- unparseable-entropy-set residual now falls back instead of skipping
  injection, so a fresh ConsensusEntropy entry exists every ledger
- CSF Peer mirrors the fallback analog; sims assert deterministic
  non-zero fallback digests across same-LCL peers
- testnet scenarios updated: degraded windows expect labeled fallback
  entropy, never validator-tier

The fallback tier is user-influenceable via tx submission (quiet-ledger
grinding) and is labeled accordingly — hook-facing gating lands with the
min_tier/min_count API change.
2026-06-10 16:32:49 +07:00
Nicholas Dudfield
03c1216661 merge: absorb origin/dev 2026-06-09 09:44:39 +07:00
tequ
cb91b4e88e Restore pre-reserved tem codes (#754) 2026-05-27 07:57:55 +10:00
tequ
b9e0c56def Guard depth 32 (#653) 2026-05-25 11:10:49 +10:00
Nicholas Dudfield
0a77dbf68e Merge remote-tracking branch 'origin/dev' into feature-export-rng 2026-05-19 12:11:18 +08:00
tequ
663ed4edb8 Named Hook (#718) 2026-05-19 12:00:25 +10:00
Nicholas Dudfield
60a9a2c9fb Merge remote-tracking branch 'origin/dev' into feature-export-rng
# Conflicts:
#	include/xrpl/protocol/Feature.h
#	include/xrpl/protocol/detail/features.macro
2026-05-18 09:15:17 +07:00
tequ
5e8d26f67a refactor: Calculate numFeatures automatically (#5324) (#739)
Co-authored-by: Ed Hennis <ed@ripple.com>
2026-04-30 18:17:50 +10:00
Nicholas Dudfield
445d0070d8 Merge remote-tracking branch 'origin/dev' into feature-export-rng
# Conflicts:
#	hook/sfcodes.h
#	include/xrpl/protocol/Feature.h
#	include/xrpl/protocol/detail/sfields.macro
2026-04-30 14:22:06 +07:00
tequ
a6186d7855 IOURewardClaim (#500) 2026-04-30 15:27:51 +10:00
Nicholas Dudfield
8ae541fcc1 Merge remote-tracking branch 'origin/dev' into feature-export-rng
# Conflicts:
#	src/test/app/SetHookTSH_test.cpp
#	src/xrpld/app/tx/detail/InvariantCheck.cpp
#	src/xrpld/app/tx/detail/InvariantCheck.h
2026-04-30 08:14:51 +07:00
tequ
49fd0c33b5 fixIOULockedBalanceInvariant Amendment (#732) 2026-04-29 17:05:18 +10:00
tequ
61138058a6 Delete unused sfHookDefinition (#715) 2026-04-29 16:45:35 +10:00
tequ
8dd17973d0 Add hook header ls_flags.h and tx_flags.h (#717) 2026-04-29 16:41:52 +10:00
tequ
55710c4baf Disallow setting a AMM account as Issuer/Destination/Inform (#709) 2026-04-29 11:00:25 +10:00
tequ
d3d24f781b Merge fixAMMClawbackRounding amendment into featureAMMClawback amendment 2026-04-28 18:23:31 +10:00
yinyiqian1
131d659032 fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
Due to rounding, the LPTokenBalance of the last LP might not match the LP's trustline balance. This was fixed for `AMMWithdraw` in `fixAMMv1_1` by adjusting the LPTokenBalance to be the same as the trustline balance. Since `AMMClawback` is also performing a withdrawal, we need to adjust LPTokenBalance as well in `AMMClawback.`

This change includes:
1. Refactored `verifyAndAdjustLPTokenBalance` function in `AMMUtils`, which both`AMMWithdraw` and `AMMClawback` call to adjust LPTokenBalance.
2. Added the unit test `testLastHolderLPTokenBalance` to test the scenario.
3. Modify the existing unit tests for `fixAMMClawbackRounding`.
2026-04-28 18:23:31 +10:00