Repository navigation
feat(dpp)!: dashpay profile shielded address field - #4768
Conversation
Add the optional 43-byte `shieldedAddress` property to the DashPay v2 `profile` document type at position 7 (11-byte diversifier followed by the 32-byte diversified transmission key of a raw Orchard receiving address). Consensus enforces only the byte length; clients validate the Orchard decoding before paying. Follows the transparent payment address fields from #4380 and the raw address format in dashpay/dips#188. Split out of #4616, which keeps the wallet tip accounts, persistence, FFI and example-app flows and will be rebased on top of this change. Protocol 13 to 14 upgrade tests assert the field appears with the transition, a schema boundary test covers 0/42/43/44-byte values and a non-byte value on both protocol versions, and the deterministic pins (contract create/update fees, document deletion/replacement fees, the replacement tests' expected profile strings, the PV14 genesis root hash) are recomputed for the larger contract. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 35 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🕓 Queued for automated review — 9th in line, estimated start in ~25 min (commit c8157f3)
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v4.2-dev #4768 +/- ##
============================================
- Coverage 84.54% 82.73% -1.82%
============================================
Files 2832 2832
Lines 382305 390229 +7924
============================================
- Hits 323235 322854 -381
- Misses 59070 67375 +8305
🚀 New features to boost your workflow:
|
…nnect genesis contract The app-connect system contract registered at a v14 genesis is one more sibling under the contracts subtree, so every byte-billed contract-tree read grows: delete 1721520 -> 1770160, replace 1450220 -> 1498860, DPNS domain create 6021500 -> 6175580. Same cause as the DashPay v2 bump in dashpay#4768. Verified against pristine v4.2-dev, where all three pins still pass. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…nnect genesis contract The app-connect system contract registered at a v14 genesis is one more sibling under the contracts subtree, so every byte-billed contract-tree read grows: delete 1721520 -> 1770160, replace 1450220 -> 1498860, DPNS domain create 6021500 -> 6175580. Same cause as the DashPay v2 bump in #4768. Verified against pristine v4.2-dev, where all three pins still pass. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Brings the branch up to date with v5.1-dev (1ebcedb). The DashPay contract field (dashpay#4768) and the DPNS resolver fix (dashpay#4769) are now in the base, so the branch's byte-identical copies of those files drop out of the diff. Conflict resolution: - Room: v5.1-dev already ships versions 12-14, so the profile payment address migration becomes MIGRATION_14_15 (database version 15, schema 15.json exported by Room); the migration tests walk 14->15 and 10->15. - SwiftData: v5.1-dev replaced the development V4/V5 chain with App Store release snapshots (dashpay#4818, dashpay#4910) and published schema 3.0.0. Instead of the branch's hand-registered V4 freeze and V5, DashSchemaV3 is now bound to its generated release snapshot (DashSchemaSnapshotV3) and a new live DashSchemaV4 adds PersistentDashpayPaymentAddresses, with V2->V3->V4 and V1->V3->V4 lightweight stages. The DashSchemaV4 freeze files and the dash-v5.store fixture are dropped; the model is added to schema-models.json and SCHEMA_RELEASES.md describes the new routes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Issue being fixed or feature implemented
Split out of #4616. That PR bundles the DashPay contract field, the wallet's dedicated tip accounts, persistence migrations, FFI, and the Swift/Kotlin example flows. This PR carries only the contract change so it can land first; the wallet and mobile work stays in #4616 and will be rebased on top of it.
Adds an optional
shieldedAddressproperty to the DashPayprofiledocument so a user can publish a reusable Orchard receiving address and get paid by username. Follows the transparentcorePaymentAddress/platformPaymentAddressfields from #4380 and the 43-byte raw address format in dashpay/dips#188.What was done?
profile.shieldedAddresson DashPay contract v2 (protocol version 14) at position 7: a 43-byte array, the 11-byte diversifier followed by the 32-byte diversified transmission key. Consensus enforces only the byte length; clients validate that the bytes decode as an Orchard address before paying. No data trigger, since unlike the transparent fields there is no type byte to check.transition_to_version_14and present after it, in both the in-place transition test and the full upgrade walk.shielded_profile_schema_testsin drive-abci: lengths 0, 42, 43 and 44 bytes validate only at protocol 14 with exactly 43 bytes; a non-byte value is rejected; a legacydisplayName-only profile stays valid on both versions.dashpay-contractv2 andSYSTEM_DATA_CONTRACT_VERSIONS_V3list the new field.How Has This Been Tested?
Local, targeted (CI runs the full suites):
cargo test -p dashpay-contractcargo test -p drive --test deterministic_root_hash: 2 passedcargo test -p drive-abci --lib -- check_tx::v0::tests::data_contract document:: protocol_change shielded_profile_schema_tests dashpay: 209 passed (12 check-tx, 177 batch document, 20 protocol upgrade including the new boundary test)cargo fmt --checkon the touched cratesBreaking Changes
Changes the protocol 14 DashPay v2 contract bytes and the matching deterministic fee and root-hash baselines. Protocol 14 is unreleased; this must not be applied as an unversioned change to an activated contract. Historical (protocol 13 and earlier) roots are unchanged.
Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code