refactor(anonbeta1): registry-only baseline; archive Arcium bind for v2#2
refactor(anonbeta1): registry-only baseline; archive Arcium bind for v2#2FwazB wants to merge 3 commits into
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
|
gm no need to registration fee anymore on beacons:
|
…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.
|
Handoff note on M4gic's review comment:
|
|
GM, every account can now act as a beacon by default based on his connectivity, so there’s no longer a need for a dedicated Registry PDA. Instead, confidential transfers should flow directly through the MXEs, with the second signer public key serving as the beacon reference within the smart contract for revenue share. This keeps the architecture leaner and removes unnecessary registry overhead. The immediate priority should be tightening the confidential transfer flow and making the beacon signature a required secondary signer in the transaction model. From there, we can fully concentrate on the offline-first direction of the program: minimize on-chain coordination, In short: No Registry PDA |
|
Summary
Resets
anonbeta1to the minimal Frontier/devnet registry baseline and archives the earlier Arcium beacon binding work for later revival.What stays live:
register_beacon: writes theBeaconRegistryPDA with operator, RNS destination hash, region code, and timestamp metadataheartbeat: updateslast_heartbeatandheartbeat_countBeaconRegisteredandBeaconHeartbeateventsanchor-langonlyanon7uu8UtVoFgS8GCSfw2RqyphJhkN3xEjgPwznYDeWhat is removed from the live program:
beacon_bindregistration pathanonbeta1What is preserved for v2:
archive/anonbeta1-arcium-bind/ble-revshareandencrypted-ixsmaterial for later payment/revshare workHandoff Notes
Do not merge as part of this handoff unless the team explicitly wants the minimal registry-only baseline on
main.PR #3 is stacked on top of this work and adds the v2.A private relay counter. If the team accepts the private counter direction, review/merge PR #3 instead of merging this PR separately.
M4gic's review note is incorporated directionally: beacon registration fees are removed here. Follow-up design questions remain around replacing heartbeat with a last-cosign timestamp and exposing operator stats without leaking private relay counts.