Skip to content

fix(dlv): the policy-digest derivation is an AMM statement, and the docs now say so - #763

Merged
cryptskii merged 2 commits into
mainfrom
docs/non-amm-policy-digest-accuracy
Sep 4, 2026
Merged

fix(dlv): the policy-digest derivation is an AMM statement, and the docs now say so#763
cryptskii merged 2 commits into
mainfrom
docs/non-amm-policy-digest-accuracy

Conversation

@cryptskii

Copy link
Copy Markdown
Collaborator

Summary

Documentation and refusal-message accuracy only. Two commits, cherry-picked unchanged from a parked branch, correcting a claim #760 left too broad: the DLV-policy digest is derived for AMM vaults, and non-AMM vaults still supply 32 caller-chosen but creator-signed bytes. Main currently states the derivation without that caveat.

No behaviour change. No proto field, number or type changes — the proto edits are comments, and the regenerated TypeScript carries those comments through.

What was inaccurate

#760 made DlvSpecV1.policy_digest a derived view of the vault's release and fee policy and refused any other supplied value. That is true for AMM vaults, which have a ReleasePolicy/FeePolicy object to derive from. Non-AMM DLVs have no such object, so their 32 bytes remain caller-supplied — now folded into parameters_hash and therefore creator-signed, but not derived. The changelog entry, the derivation doc comment, the vault field doc and the create/publish refusal messages all described the AMM case as if it were the only case.

Changes

file change
CHANGELOG.md the [Unreleased] entry scopes the contract change to AMM DLVs and names the non-AMM gap as follow-up debt
dsm/src/ccb/mod.rs the derivation's doc says AMM, and states what non-AMM vaults carry instead
dsm/src/vault/limbo_vault.rs the field doc distinguishes the two cases; the create_draft parameter comment does the same
dsm/src/vault/dlv_manager.rs a duplicated #[allow(clippy::too_many_arguments)] removed
dlv_routes.rs, route_routes.rs, vault_rehydration.rs the create, publish and rehydration refusals say "this AMM vault's DLV-policy digest"; the asserting tests move with them, and one test is renamed to match its subject
proto/dsm_app.proto, dsm_app_pb.ts comment corrections and the regeneration that carries them
DevDlvScreen.tsx the developer screen's explanatory line

Not in this PR

The source-map document from the same parked branch. It stays parked unless it is meant to become maintained repository documentation, which is a separate decision. This PR is deliberately kept out of the economic-proof transport work.

Proof

check result
root make lint exit 0
frontend type-check, lint, jest 0, 0, and 143 suites / 1101 tests passed
boards workspace 74 binaries, 3957 passed / 0 failed / 17 ignored (dsm lib 1686/0, dsm_sdk lib 1812/0/7 ignored); node 11 binaries, 276/0; ci/production_safety_checks.sh PASS (pinned 1.98.0, incl. TLA+); scripts/ci_scan.sh PASS — all at branch head 1b82d843 with a clean working tree
test names vs main +1 / −1: the_advertised_policy_digest_is_the_records_never_the_requests renamed to ..._amm_policy_digest...

Remove the duplicate clippy allow on DLVManager::prepare_vault.

Clarify that only AMM DLV policy digests are derived from ReleasePolicy/FeePolicy. Non-AMM DLVs still carry caller-supplied 32-byte digests that are creator-signed, with tighter semantics left as follow-up debt.
@cryptskii
cryptskii merged commit 472fb7a into main Sep 4, 2026
18 checks passed
@cryptskii
cryptskii deleted the docs/non-amm-policy-digest-accuracy branch September 4, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant