Skip to content

Comments

Add Solana zero-knowledge proof program with prove/finalize workflow#42

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/add-prove-and-finalize-instructions
Draft

Add Solana zero-knowledge proof program with prove/finalize workflow#42
Copilot wants to merge 3 commits intomasterfrom
copilot/add-prove-and-finalize-instructions

Conversation

Copy link

Copilot AI commented Feb 15, 2026

Adds Solana smart contract for on-chain zero-knowledge proof verification with a two-phase prove/finalize workflow.

Structure

  • solana/programs/zkproof/ - Anchor program with three instructions:

    • initialize - Creates proof account
    • prove - Submits proof data (max 1024 bytes)
    • finalize - Verifies and completes proof
  • solana/README.md - Complete usage documentation with TypeScript examples

  • solana/tests/ - Test suite covering happy path and error cases

Usage

// Initialize proof account
await program.methods.initialize()
  .accounts({ proofAccount, authority, systemProgram })
  .rpc();

// Submit proof data
await program.methods.prove(proofData)
  .accounts({ proofAccount, authority })
  .rpc();

// Verify and finalize
await program.methods.finalize()
  .accounts({ proofAccount, authority })
  .rpc();

Account Structure

pub struct ProofAccount {
    pub authority: Pubkey,    // Access control
    pub verified: bool,       // Verification status
    pub proof_data: Vec<u8>,  // ZK proof bytes
}

Space calculation accounts for discriminator (8) + pubkey (32) + bool (1) + vec metadata (4) + proof data (1024) = 1069 bytes.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 15, 2026 20:42
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
…culation, clarify project relationship

Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Copilot AI changed the title [WIP] Add prove and finalize instructions to README Add Solana zero-knowledge proof program with prove/finalize workflow Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants