{"id":29407199,"url":"https://github.com/oxarbitrage/zcash-memo-protocol","last_synced_at":"2026-02-03T22:34:01.183Z","repository":{"id":286687437,"uuid":"947505096","full_name":"oxarbitrage/zcash-memo-protocol","owner":"oxarbitrage","description":"A specification for ZIP-231","archived":false,"fork":false,"pushed_at":"2025-04-22T18:46:59.000Z","size":135,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T04:39:34.122Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TLA","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxarbitrage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-12T19:46:20.000Z","updated_at":"2025-04-22T18:47:02.000Z","dependencies_parsed_at":"2025-07-11T00:44:39.586Z","dependency_job_id":"ed34d37a-881d-4f39-bc9b-9ed58b9f3e4f","html_url":"https://github.com/oxarbitrage/zcash-memo-protocol","commit_stats":null,"previous_names":["oxarbitrage/zcash-memo-protocol"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oxarbitrage/zcash-memo-protocol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fzcash-memo-protocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fzcash-memo-protocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fzcash-memo-protocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fzcash-memo-protocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxarbitrage","download_url":"https://codeload.github.com/oxarbitrage/zcash-memo-protocol/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxarbitrage%2Fzcash-memo-protocol/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29060578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T22:28:58.191Z","status":"ssl_error","status_checked_at":"2026-02-03T22:28:56.515Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-11T00:41:19.737Z","updated_at":"2026-02-03T22:34:01.178Z","avatar_url":"https://github.com/oxarbitrage.png","language":"TLA","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NU7 Memo Bundles Specification\n\nThis repository contains a TLA⁺ specification that models a simplified version of the memo bundles functionality for NU7, as proposed in ZIP‑231. The specification illustrates how memo encryption, decryption, and pruning are performed in Orchard-style transactions.\n\n## Overview\n\nThe specification consists of three primary processes:\n\n- User Process:\n    Encrypts a memo by splitting it into fixed-size chunks, padding and encrypting each chunk with a derived encryption key, and then building a transaction that carries:\n    - The encrypted memo bundle (`v_memo_chunks`)\n    - Associated metadata including the memo key and a salt (used for key derivation)\n\n- Node Process:\n    Validates transactions from the transaction pool, then progressively prunes the memo bundle. Pruning is implemented in a loop where, in each iteration, a memo chunk is replaced with a pruned digest. Once all chunks are pruned, the transaction is updated:\n\n    - `f_all_pruned` is set to TRUE,\n    - The `salt_or_hash` is updated with new random data representing an overall digest.\n    - The `pruned` field is set to a bitfield where each bit is 1.\n\n- Scanner Process:\n    Scans the blockchain for transactions intended for a specific user, decrypts the memo bundle using the stored memo key and salt (or overall hash), and verifies that the decrypted memo is either the original message (if unpruned) or a partially pruned message.\n\n**Note:**\nThe cryptographic functions (e.g., EncryptionKey, EncryptMemo, DecryptMemo) are abstracted for modeling purposes and do not capture the full complexity of the actual protocol.\n\n## Files\n\n**[protocol.tla](protocol.tla)**\n\nContains the main PlusCal specification for the protocol, including the User, Node, and Scanner processes.\n\nA [pdf document](protocol.pdf) is also available.\n\n**[operators.tla](operators.tla)**\n\nContains helper operators for:\n    - Random hash generation and basic arithmetic operations,\n    - Sequence splitting, padding, and manipulation,\n    - Cryptographic abstractions for key derivation, memo encryption, decryption, and high-level memo processing.\n\nA [pdf document](Operators.pdf) is also available.\n\n## How to Run\n\n- Clone the Repository:\n\n```\ngit clone https://github.com/oxarbitrage/zcash-memo-protocol.git\ncd zcash-memo-protocol\n```\n\n- Get the Toolbox and run TLC:\n\n```\nwget https://github.com/tlaplus/tlaplus/releases/latest/download/tla2tools.jar\njava -cp tla2tools.jar tlc2.TLC -config protocol.cfg protocol.tla\n```\n\nAlternatively, you can use the TLA+ Toolbox IDE to open the `protocol.tla` file and run the model checker from there or the [vscode extension](https://marketplace.visualstudio.com/items?itemName=alygin.vscode-tlaplus).\n\n## Properties\n\n- `DecrypedEqOrig`:\n- `DecrypedEqPruned1`:\n- `DecrypedEqPruned2`:\n- `DecrypedEqAllPruned`:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxarbitrage%2Fzcash-memo-protocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxarbitrage%2Fzcash-memo-protocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxarbitrage%2Fzcash-memo-protocol/lists"}