docs: expand §4.4 mutation semantics with contract-level detail#68
Conversation
…tail Rewrite §4.4 into per-operation subsections (register/update/ transfer_controller/deactivate) faithful to the did-stellar-registry implementation. Each now documents authorization, preconditions, what is changed vs preserved, the emitted event, errors, and includes an illustrative contract excerpt plus before/after DidRecord examples. Document three contract behaviors the prior prose omitted: - update pins the controller and ignores next_record.controller - register overwrites caller-supplied bookkeeping fields - VersionOverflow guards version at u32::MAX Add a per-operation error matrix (§4.4.5). Trim §4.6 flows of the lines now covered by §4.4 and point them to the contract-side semantics.
Plan expiredYour subscription has expired. Please renew your subscription to continue using CI/CD integration and other features. |
📝 WalkthroughWalkthroughThe DID Stellar v0.1 spec's §4.4 Mutation Semantics section is rewritten with a normative shared mutation pipeline, cross-operation invariants for bookkeeping fields and version monotonicity, and detailed per-operation rules. §4.6 gains a client-side lifecycle introduction and a rewritten deactivation flow with explicit steps. ChangesDID Stellar Spec: Mutation Semantics & Operation Flows
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Summary
Rewrites §4.4 Mutation Semantics of
did-stellar-v0.1.mdfrom terse bullet points into per-operation subsections faithful to thedid-stellar-registrycontract, and trims the now-redundant client-flow lines in §4.6.What changed
register,update,transfer_controller,deactivate). Each documents authorization, preconditions, what changes vs. what is preserved, the emitted event, error codes, plus an illustrative contract excerpt (fromsrc/contract.rs) and before/afterDidRecordexamples.read → prepare → sign → submit → retryflow; removed duplication now covered by §4.4 and added cross-references.Contract behaviors now documented (previously omitted)
updatepins the current controller and ignoresnext_record.controller— ownership changes go only throughtransfer_controller.registeroverwrites caller-supplied bookkeeping fields (version,created_ledger,updated_ledger,deactivated).VersionOverflow(code 19) guardsversionatu32::MAXinstead of wrapping.