Entros_docs
Reference

Programs reference

The three Anchor programs that make up Entros, with their instructions and accounts.

Entros is built around three on-chain programs and one voter-weight plugin. All programs are built with Anchor 0.32.1 and deployed to Solana devnet.

Framework roadmap. The protocol's three on-chain programs are written in Anchor today, prioritizing developer ergonomics and IDL-driven SDK integration. As on-chain volume scales toward mainnet, the CU-pressured paths (mint_anchor, update_anchor, verify_proof) are slated for selective migration to Pinocchio, the lower-overhead Solana program framework maintained by Anza. The admin-and-governance program (entros-registry) stays on Anchor. This hybrid approach mirrors the architecture used by Jupiter Perps and other Solana projects optimizing hot paths post-mainnet.

entros-anchor

GZYwTp2ozeuRA5Gof9vs4ya961aANcJBdUzB7LN6q4b2

Owns the Anchor identity state. Holds per-wallet IdentityState PDAs and Token-2022 NonTransferable mints.

Instructions

InstructionPurpose
mint_anchorInitialize a new Anchor on first verification. Validates a ZK proof from the verifier program. Charges the protocol fee.
update_anchorRe-verification path. Validates a fresh proof against the current commitment, advances the score, overwrites current_commitment.
reset_identity_stateRecovery path. Zeroes the score and clears the fingerprint commitment after a 7-day cooldown. Charges the fee.
authorize_new_walletFirst step of wallet migration. Old + new wallets co-sign to record the successor and delegate the identity token.
migrate_identitySecond step of wallet migration. The authorized new wallet completes the move; the old mint is closed.

Accounts

AccountSeedsPurpose
IdentityState["identity", user]Score, fingerprint commitments, verification metadata
Mint["mint", user]Token-2022 NonTransferable mint for the identity NFT
MintAuthority["mint_authority"]Program-owned authority for all mints

entros-verifier

4F97jNoxQzT2qRbkWpW3ztC3Nz2TtKj3rnKG8ExgnrfV

Verifies Groth16 proofs of the Hamming-distance circuit. Invoked by the Anchor program during mint_anchor and update_anchor.

Instructions

InstructionPurpose
create_challengeRecords a client-supplied nonce for replay defense
verify_proofValidates a Groth16 proof against the on-chain verification key. Stores a VerificationResult.
close_challengeReleases rent on a consumed challenge
close_verification_resultReleases rent on a consumed verification result

Accounts

AccountSeedsPurpose
Challenge["challenge", challenger, nonce]Per-challenge replay record
VerificationResult["verification", verifier, nonce]Proof outcome record

Public inputs

The Groth16 circuit takes four public inputs:

InputMeaning
commitment_newPoseidon commitment of the new behavioral fingerprint
commitment_prevCommitment of the previous fingerprint
thresholdMaximum allowed Hamming distance (default 96 of 256 bits)
min_distanceMinimum required distance, for anti-replay (default 3)

entros-registry

6VBs3zr9KrfFPGd6j7aGBPQWwZa5tajVfA7HN6MMV9VW

Protocol-level configuration, validator stake, and treasury. Configures the protocol fee, the verification expiry windows, and the staking parameters for the Anonymity Ring.

Instructions

InstructionPurpose
initialize_protocolOne-time setup of the protocol config
update_protocol_configAuthority-only updates to fee, expiry, score caps
set_validator_pubkeyAuthority-only write of the validator pubkey used for the mint-receipt binding (entros-anchor 6015–6021). Reallocs the protocol config to the post-binding layout the first time it runs.
migrate_adminEmergency administrative migration of the protocol authority
register_validatorStake to join the Anonymity Ring (gated until ring decentralizes)
compute_trust_scoreRead-only preview of what a score would be given a verification history
unstake_validatorExit the validator set after the unbonding period
withdraw_treasuryAuthority-only treasury withdrawal

Configurable fields

FieldTypePurpose
min_stakeu64Minimum SOL stake to validate
challenge_expiryi64Seconds before an unconsumed challenge is invalid
max_trust_scoreu16Cap on the score (default 65535)
base_trust_incrementu16Per-verification increment baseline
verification_feeu64Lamports charged per verification (default 5_000_000 = 0.005 SOL)

entros-voter-weight

99nwXzcugse3x8kxE9v6mxZiq8T9gHDoznaaG6qcw534

Realms voter-weight plugin. Reads the voter's Entros Anchor and produces weight 1 (eligible) or 0 (rejected) given a configured threshold and recency window.

See the Realms integration guide for wire-up.

Instructions

InstructionPurpose
create_registrarInitialize a per-realm registrar with min_trust_score and max_verification_age
update_registrarUpdate the registrar's threshold and recency configuration
close_registrarClose a registrar and recover rent
create_voter_weight_recordInitialize a voter's weight record
update_voter_weight_recordRecompute the voter's weight against their Entros Anchor
close_voter_weight_recordClose a voter weight record
create_max_voter_weight_recordInitialize the realm-wide maximum-weight record
update_max_voter_weight_recordRecompute the maximum-weight record

Where to look next

  • PDAs—every seed and derivation
  • Costs—fees and compute-unit usage
  • Errors—error codes from each program

On this page