feat(anonbeta1): Arcium RNS co-signed settlement flow#4
Open
FwazB wants to merge 4 commits into
Open
Conversation
- beacon_bind circuit: SHA3-256 commitment of rns_dest_hash + region_code computed inside Arcium MPC, returns encrypted u128 to owner - anonbeta1 program: register_beacon, heartbeat (plain), plus 3 new Arcium instructions (init_comp_def, register_beacon_private, callback) - PrivateBeaconRegistry PDA for encrypted beacon state - Deployed to devnet: anon7uu8UtVoFgS8GCSfw2RqyphJhkN3xEjgPwznYDe - MXE initialized, comp def registered on-chain (cluster offset 456) - Circuit uploaded to Supabase storage bucket
- 2% fee to treasury on beacon registration (same as ble-revshare) - SOL native: system_program transfer to treasury wallet - SPL token: spl_token transfer via optional mint/token accounts - Added anchor-spl dependency, TREASURY_WALLET + FEE_BPS constants - Upgraded on devnet: anon7uu8UtVoFgS8GCSfw2RqyphJhkN3xEjgPwznYDe
…ind for v2 Frontier scope decision: anonbeta1 ships as a plain Anchor registry program backing the explorer "Active Beacons" metric. Encrypted relay accounting (private counts, reward calculation, operator stats) moves to v2 of the same program — same vanity program ID, expand in place. What stays in anonbeta1: - register_beacon: writes BeaconRegistry PDA with rns_dest_hash + region_code - heartbeat: bumps last_heartbeat + heartbeat_count, emits BeaconHeartbeat - BeaconRegistry account, BeaconRegistered + BeaconHeartbeat events - 4 errors (InvalidRnsHash, InvalidRegionCode, OperatorMismatch, HeartbeatOverflow) - Single dep: anchor-lang 0.32.1 - Vanity program ID anon7uu8UtVoFgS8GCSfw2RqyphJhkN3xEjgPwznYDe (already deployed) What archives to archive/anonbeta1-arcium-bind/ for v2 revival: - register_beacon_private + beacon_bind_callback + init_beacon_bind_comp_def (3 live files moved via git mv, history preserved) - PrivateBeaconRegistry account, BeaconBindCompleted event - Arcium/fee errors, treasury constants, beacon_bind circuit snapshot - README documenting revival path What stays elsewhere: - programs/ble-revshare/ untouched (v2 payment seed) - encrypted-ixs/ keeps payment_v3 circuit (ble-revshare dependency) Anchor.toml + ble-revshare/lib.rs declare_id! sync to new ble_revshare keypair i1cAa6iWmL8GRdZisyX2sgJ43jdemdUZh2QbstxTJ2C — accepted side-effect of arcium build's ID sync. Original 7xeQNUggKc2e5q6AQxsFBLBkXGg2p54kSx11zVainMks deploy on devnet is orphaned (keypair not available locally); ble-revshare is deferred to v2 anyway, so the orphan is harmless. arcium build passes clean. anchor build of anonbeta1 alone is plain Anchor.
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.
Summary
Reworks
anonbeta1around the mobile/RNS architecture:execute_cosigned_transferCosignedSettlementreceipt prevents settlement replayArcium / Privacy
beacon_bindfor private operator-to-RNS transport bindingrelay_incrementfor optional encrypted private relay statsCleanup
ble-revsharemodel programpayment_v3circuit and scripts/testsregister_beacon/heartbeatpatharcium buildthe canonical build and verification pathSecurity Notes
[b"settlement", sender, settlement_id]Verification
Result: passes. The build still prints the known non-fatal Arcium client stack-offset warning, but exits 0.