Skip to content

On-chain Program

Prova runs on its own Anchor program with native Ed25519 verification — not on a generic attestation service. Four instructions, four events, and a deliberately minimal account model.

Deployment

Program ID (Devnet): G11dBAzLQaADtHHM2AZNz3ThCDnkY5nhX3Ujddu1CMM1
PDA seed:            "prova_agent" + operator_pubkey
Framework:           Anchor 0.31 · Solana CLI 2.1
License:             Apache 2.0 (open source)

Account model

One PDA per operator. Attestations themselves are not stored as accounts — they are emitted as events anchored in the transaction (see Core Concepts → Storage model).

#[account]
pub struct AgentAccount {
    pub operator: Pubkey,          // accountable wallet
    pub agent_id: [u8; 32],        // agent identity (pubkey bytes)
    pub policy_root: [u8; 32],     // Merkle root of the operator's policy
    pub attestation_count: u64,    // lifetime counter
    pub created_at: i64,
    pub revoked: bool,             // kill switch flag
    pub bump: u8,
}

Instructions

InstructionArgumentsEffect
register_agentagent_id: [u8;32], policy_root: [u8;32]Initializes the agent PDA. Operator signs and pays rent.
record_attestationsattestations: Vec<AttestationInput>Seals 1–100 attestations. Requires an Ed25519 verification instruction in the same transaction (checked via the instructions sysvar). Emits one AttestationIssued per entry.
revoke_agentSets revoked = true. Irreversible; a revoked agent can no longer attest.
update_policy_rootnew_root: [u8;32]Rotates the policy Merkle root. Emits PolicyRootUpdated.

Ed25519 verification

Signatures are verified by the Solana runtime itself: the client prepends an instruction to the native Ed25519 program, and record_attestations inspects the instructions sysvar to confirm the signature over each action_hash was verified in the same transaction. This is cheaper and safer than in-program signature math.

Events

EventEmitted on
AgentRegisteredregister_agent
AttestationIssuedeach entry of record_attestations
AgentRevokedEventrevoke_agent
PolicyRootUpdatedupdate_policy_root

Errors

ErrorCause
AgentRevokedThe agent was revoked and tried to attest.
UnauthorizedOperatorThe signer is not the operator that owns the PDA.
InvalidSignatureMissing or mismatched Ed25519 verification for an action_hash.
EmptyBatchrecord_attestations called with zero entries.
BatchLimitExceededMore than 100 attestations in one call.
InvalidPolicyRootMalformed policy root.

The program source lives in packages/program of the public repo (github.com/Eras256/Prova) — audits and PRs welcome.