feat: implement ADR-0001 private access mechanism using opaque hashes - #23
Merged
Joaco2603 merged 4 commits intoJul 30, 2026
Merged
Conversation
…ototype - Update ADR 0001 status to Approved and Implemented - Specify commitment construction: SHA256(PMPT_V1 || Prompt_ID || Salt) - Document resource cost evidence (<100 stroops) - Add isolated private_access_prototype contract for feasibility testing - Prototype measures CPU/memory cost and validates replay protection Resolves the ADR approval gate required by Stellar-AgentVerse#20
…verage - Register and purchase private prompts using opaque BytesN<32> hashes - Fix CI: PrivatePromptRegistered now used in event emission test - Add test_cross_user_replay_prevented (replay attack) - Add test_atomicity_fail_burn (rollback on insufficient funds) - Add test_migration_compatibility (legacy + private coexistence) - Add test_register_private_prompt_emits_event (storage/event inspection) - Update integration-test.sh with private prompt Testnet flow (Steps 5-9) - All 42 tests pass, clippy -D warnings clean Closes Stellar-AgentVerse#20
NovusCyber
force-pushed
the
feat/private-access-adr-0001
branch
from
July 29, 2026 23:21
bd3229e to
d6ac5e7
Compare
Joaco2603
force-pushed
the
feat/private-access-adr-0001
branch
from
July 30, 2026 00:15
a72acde to
093777a
Compare
15 tasks
This was referenced Aug 30, 2026
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.
Closes #20
Description
This PR implements the private-access mechanism selected by ADR-0001 in the
PromptMarketplacesmart contract, ensuring that prompt content, plaintext identifiers, and decryption keys remain off-chain and fully protected.Affected Contracts
PromptMarketplaceSecurity Impact & Threat-Model Guarantees
prompt_idandcontent_uriare never exposed on-chain. The newPrivatePromptmodels useBytesN<32>opaque hashes (commitments).PrivatePurchasedata keys) is atomically tied to the cross-contract token burn (sell_forwarded), ensuring no tokens are lost on failure and no access is granted without payment.Migration Behavior
Prompt) and their respective methods (register_prompt,buy_prompt) were intentionally preserved.Backend / Client Changes Required
BytesN<32>hash (commitment) when registering or buying a private prompt.PrivatePromptPurchasedevent before securely delivering the prompt content via their out-of-band channels.Deployment & Configuration Implications
MyTokencontract does not require upgrades since we continue to use its existing forwarded auth methods.PrivatePromptRegisteredandPrivatePromptPurchasedevent topics.