Repository navigation
Conversation
colll78
force-pushed
the
codex/cip-160-receiving
branch
from
October 7, 2026 03:04
99c4a63 to
cdec8cf
Compare
This was referenced Oct 7, 2026
Align configuration dependencies with Receiving-aware ledger packages
IntersectMBO/cardano-config#31
Closed
Closed
Build and inspect Dijkstra protected payments with Receiving witnesses
IntersectMBO/cardano-cli#1456
Closed
Add activation and independent transaction codec coverage, preserve hidden V1 reference-input checks, and integrate the extracted Receiving formal model with explicit representation boundaries. Fix CI test tooling and share canonical Receiving targets at the V4 bulk translation boundary.
Fix Cabal source distribution validation and record the successful concrete ledger lifecycle check.
colll78
force-pushed
the
codex/cip-160-receiving
branch
from
October 7, 2026 13:50
22860e4 to
4b06e25
Compare
Collaborator
|
I am closing this PR for two reasons:
That being said, if you want to implement this CIP for Euler era next year, then we can talk about creating a plan of how this feature can be added to ledger in small reviewable PRs. Note that BlockPQR and Anastasia Labs will need to have a discussion on who is going to pay for reviewing this work as well, but that will be a problem for Leonard Hegarty and yourself to resolve. |
7 of 8 tasks
This was referenced Oct 7, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement proposed CIP-160 recipient authorization for ordinary protected outputs in Dijkstra, including nested transaction bodies. Each protected Plutus output requires its own Receiving execution, redeemer and budget, even when outputs share a script hash or are byte-identical.
Keys and native scripts require no Plutus redeemer. Pointers use original body-local output indexes; unprotected outputs and protected key/native outputs leave gaps. Parent and child purpose, redeemer, integrity and estimation domains remain separate. Batch fees and execution limits include every invocation. Any failing invocation invalidates ordinary batch effects; an accepted phase-2-invalid transaction applies only top-level collateral effects.
Protection uses payment-header bit
0x08for base/enterprise addresses and survives identity, compact storage, restored state and stake accounting. Historical eras reject protected outputs; proposed Dijkstra admission starts at protocol major 12. Protected pointers, production initial funds and protected collateral returns are rejected. V4 addsReceiving ScriptHash IntegerandReceivingScript Integer TxOut, both with Data tag 7 and no implicit datum argument. Existing V1–V3 and pre-existing V4 constructor encodings remain unchanged. Legacy contexts reject visible protection they cannot represent. Builders and estimators preserve containing-body identity and original output indexes.Per-output execution is our implementation decision, supported by CIP-160's rule and lehins's resolved-TxOut comment. Raw indexes, Data formats and activation remain proposals; upstream approval of every detail is not implied. Companions: CIP-160/CIP-19, Plutus V4, and formal specification.
Complete Dijkstra genesis JSON accepts the proposed 369-parameter initial V4 model, preserving strict lengths and historical V1–V3 counts. Conformance recovers committee pool IDs from retained snapshots independently ranked by stake and pool ID, validating weights, honored keys and proof-of-possession with runtime
Globals. Companion model fixes preserve hard-fork versions, registered zero-stake pools and unique semantic pool IDs across multiple delegators.Evidence
After: concrete tests cover duplicate and identical outputs, independent redeemers/budgets, missing or incorrect redeemers, body isolation, validator failure, both validity mismatches, collateral-only effects and Receiving-to-Spending lifecycle behavior.
4b06e253incorporates upstream snapshot/forecasting changes. Its linear rebase preserves the exact validated source tree. The strict eight-target GHC 9.6.7 build and owning conformance test rebuild pass. Scoped runtime checks pass 442 examples, zero failures, two inherited formal properties pending, including Receiving, contexts, protected addresses, NES roundtrip, epoch/SNAP, forecasting, queries and purpose APIs. Three new Foreign regressions check set-versus-mark pool projection, both mark cache refreshes, and live-key genesis committee/cache seeding. Genesis seeding is not full injection or node startup. SQL changes are compile-covered only. Remote CI for this rebased commit remains pending; all five ledger checks passed at the preceding published6e56634bcheckpoint.77d85ec1dcheckpoint. The new scoped checks do not establish a full latest-head conformance pass.e6a3b4bmatrix jobs pass, including unmodified startup. Separate Hydra DNS Windows, empty-Leios-database fixture and tracer issues remain below. These node results do not validate the merged ledger graph.Conformance compares translated state and acceptance/rejection, not exact failure payloads or concrete UPLC execution. Foreign contexts/evaluator, Coin-only values, fees/integrity and size callbacks retain documented abstractions.
Performance measurements are also pre-merge checkpoints. Four synthetic ordinary Shelley–Alonzo transactions produce byte-identical states against their baseline; the paired whole-process envelope measures +0.222% median CPU and +19,200 bytes allocation, not replay or pure throughput. Isolated enterprise decoding costs +8.66–10.21% CPU and +152 B/address; instance decoding adds 40 B/address. API extraction measures 29.146–129.120 µs for 101–401 Plutus outputs including preparation, without paired baseline, allocation or end-to-end claims. Benchmark smoke success does not establish performance neutrality.
Checklist
hie.yamlchecks.Merge Danger
Door: one-way after activation
The address bit, purpose tag and V4 Data shapes become protocol formats. This PR does not authorize activation or changes to a deployed language.
Blast Radius: ledger
The reviewed upstream merge changes forecasting and snapshot caches: NES removes stored pool distribution and changes CBOR arity 7→6; Mark adds the key-age parameter and changes arity 3→4, reconstructing its caches on decode. Old on-disk NES/Mark formats require replay. Consumer adapters must replace removed state interfaces and handle the new snapshot API before fresh graph/runtime validation. Earlier consumer proofs do not cover this state-format boundary.
CLI/node ancestry gates remain enabled and fail on proposal fork pins; the matching formal artifact must become an upstream
master-artifactsancestor. DNS workflow approval remains external. Public DNSdf28303repairs the Windows partial-function failures, but consumers still pin the older source; exact Windows Hydra validation after pin refresh remains pending. The empty-Leios-database fixture passes a real historical-tools red/green check (55 immutable blocks reduced to exactly two); current NixOS validation remains pending. A test-only tracer change preserves the delivery deadline and moves cumulative log validation outside it; fresh-graph and remote validation remain pending.A recorded-seed CSJ download-bound counterexample still reproduces locally with an identical trace: accepted-prefix loss during new-dynamo reset after catch-up. Baseline dependency-graph reproduction and the intended cumulative-bound guarantee remain unresolved; random CI success does not dispose of it. No protocol/property was weakened. The musl loader diagnostic is independently nonfatal, but full current musl compilation remains pending.
Broader scheduled activation, snapshot restoration, rollback, Leios and Receiving-specific binding runtime coverage remain incomplete. This is not a final merge-readiness claim.