Skip to content

Privacy feature flag and SPP network config #710

Description

@Miracle656

Background

Private payments come from Stellar Private Payments (SPP), which runs on testnet only. Every later issue in this batch needs one switch to hide the feature and one place to read pool and contract IDs.

What to build

  • A privacy feature flag, off by default and forced off on mainnet, on web and mobile.
  • A per-network SPP config: pool IDs, verifier, ASP and public-key-registry contract IDs, and the bootnode URL. Testnet values come from SPP's deployments/testnet/deployments.json; mainnet has no entry.

Key files

  • frontend/wallet/lib/network.ts, frontend/mobile/lib/network.ts
  • frontend/wallet/lib/privacy/config.ts (new), frontend/mobile/lib/privacy/config.ts (new)

Acceptance criteria

  • Flag off by default; it cannot be turned on while the network is mainnet
  • Testnet config matches SPP's deployments.json, with a comment naming the upstream commit
  • Unit tests cover the mainnet lock-out

Drips Wave · Complexity: Easy · 100 points


Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk

Activity

  1. collinsezedike commented on Sep 23, 2026

    @collinsezedike
    Contributor

    @collinsezedike has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Can I help you with this isssue?

    This is a foundational issue that all later private payment work depends on, since every subsequent issue needs the same feature flag and config source. The mainnet lockout is a safety guard, not just a config choice, because private payments simply do not work on mainnet.

    Here's my plan:

    • Add a privacy feature flag, off by default, forced off on mainnet, on web and mobile
    • Create per network SPP config with pool IDs, verifier, ASP and public key registry contract IDs, and bootnode URL
    • Pull testnet values from SPP's deployments/testnet/deployments.json with a comment naming the upstream commit
    • Ensure mainnet has no entry and the flag cannot be turned on while on mainnet
    • Write unit tests covering the mainnet lockout

    Happy to start as soon as I'm assigned

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @collinsezedike to this issue.

  2. CHKM001 commented on Sep 23, 2026

    @CHKM001
    Contributor

    @CHKM001 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    I can get this done for you Chief
    Please assign
    Thank youu

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @CHKM001 to this issue.

  3. drips-wave commented on Sep 23, 2026

    @drips-wave

    Congratulations, @CHKM001! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

    🧑‍💻 @CHKM001: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  4. Miracle656 commented on Sep 24, 2026

    @Miracle656
    OwnerAuthor

    Correction to this batch's ground rules — please read before writing any config.

    The ground rules named the canonical pools with elided addresses (CD2W5LUR…XZ4L, CBMRWHTP…NUVS). Three PRs then hard-coded ids that preserved that prefix and suffix and invented the middle, all of which fail StrKey.isValidContract. The elided values were also wrong to begin with.

    Verified against NethermindEth/stellar-private-payments → deployments/testnet/deployments.json on 2026-09-24, all eleven ids StrKey-validated:

    key id
    pool 0 (XLM, blocklist) CBEDPYMAEPQ6JR7WKWXRM6CFHHJLKA5RHPRRLSD4UZXZRGNMBXOT2GOT
    pool 1 (XLM, blocklist, gvkMode: traceable) CADS665GRBHOMPE7GY5XYTFT2J5JKRZN6ILYMJ5ZO62GU4YPL3PYIN42
    public_key_registry CC6EJCBEULJGHNQQROKLXD6M6IKFW6LN7IHTVUEFQQWZDDLCMNPWXIH4
    verifiers.B CD34JHLNB7AYASRLOTMT6EECBKFMOS356PPP5RPXRO5Y5EA5Y4DIXGTV
    verifiers.B_gvk_T CDBA2ZZSVV5VVE4OL2ORCSG2XDN4CD2UPTZIEO7BI32RKRTPFCUF2FMV
    asp_membership CAUPZISOB4GWTH22MVKA6MRWJMQRTLUMIGUSBFNJEF32Z6WEY3RFOKGC
    asp_non_membership CAFLZKGO3KYKNOBPCVT3APFEWMUBRDBF4EVYK65E6O653WYMX4XH4QYJ
    admin GCBU2YCJGVLRSPPFK3ADYNUEH2W6ZFNNJLX6IHCEZT54VOHZZNYNHXDG

    Two things that change the work:

    1. There is no EURC pool. Both testnet pools are native XLM with the same tokenContractId; the second only adds a global-view-key mode. docs/PRIVACY_COST.md said "XLM and EURC pools" and was wrong — corrected in 6afd2e5. Do not build an asset picker around a second asset that does not exist.
    2. Do not hard-code these. Read them from upstream's deployments.json — vendor the file or fetch it at build time. The table above is for orientation, not for pasting. Anything hard-coded will be checked against StrKey.isValidContract in review.
  5. drips-wave commented on Sep 24, 2026

    @drips-wave

    This issue has been completed by @CHKM001 as part of the Stellar Wave Program's 9th Wave 🥳

    😎 @CHKM001: You earned 100 Points for completing this issue! After the current Wave ends, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

  6. added a commit that references this issue on Sep 24, 2026
    a3e4b3f
  7. Miracle656 commented on Sep 24, 2026

    @Miracle656
    OwnerAuthor

    @CHKM001 — my comment above was badly aimed, and I want to correct it before it reads as criticism of your work. It isn't.

    It was a batch-wide note meant for the other privacy PRs (#752, #756, #762), which invented contract ids and attributed them to upstream. I posted it across the foundation issues without checking that this one was already closed and delivered. Yours had landed hours earlier.

    #780 is the reference implementation for this, not an exception to it. I verified every id in it byte-for-byte against NethermindEth/stellar-private-payments at the commit you cited, including the B → standard / B_gvk_T → traceable mapping and gvkMode on the second pool only. All nine valid, all matching. You also got the two things the rest of the batch missed: the flag is opt-in, and the mainnet lockout runs before the flag is read.

    The "do not hard-code these" line was also just wrong, and I've fixed the ground rules on main (521e7fd). A browser bundle can't fetch deployments.json at runtime, so pinning is the correct answer — what makes it safe is naming the upstream commit and asserting the values in a test, which is exactly what you did. The rules now point at frontend/wallet/lib/privacy/config.ts as the pattern to copy.

    Sorry for the noise on a closed issue. Your 100 points stand and the work was the cleanest in this batch.

  8. added 2 commits that reference this issue on Sep 26, 2026
    f1c86fa
    132e3e5
  9. added a commit that references this issue on Oct 1, 2026
    6b88649
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions