Solana program, using Swiftness to verify Cairo proofs on the Solana blockchain.
Use the Solana CLI to create a new account.
solana-keygen new
Start Local Validator and set it as default endpoint
solana-test-validator
solana config set -u localhost
Build the program, this will generate a new program id.
cargo build-sbf
Update the program id in src/lib.rs
, this has to be done only once.
solana address -k target/deploy/swiftness_solana-keypair.json
Proceed to deploy the program.
After setting up, new changes can be made to the program by rebuilding and redeploying.
cargo build-sbf && solana program deploy target/deploy/swiftness_solana.so
Run client to send and verify an example proof
cargo run --example client
To only verify already uploaded proofs, run the validate example, but update the address of the proof data account.
cargo run --example validate
Run the tests, requires more stack space than default.
RUST_MIN_STACK=4096000 cargo test