A Solana verifiable build proves that the program running on-chain was compiled from a specific commit of a public repository: anyone can rebuild that commit in the same Docker environment and get the same hash. It does not prove the code is secure, so treat it as the link between your audit and your deployment, not as a replacement for the audit.
| Step | What you do | Command or check |
|---|---|---|
| 1. Public repo | Push the exact commit you will deploy to a public repository | Pin the Solana version and commit Cargo.lock |
| 2. Build | Build inside the official Docker image, not with your local toolchain | solana-verify build |
| 3. Deploy | Deploy the .so file from that build, unchanged | solana program deploy |
| 4. Compare | Check that the on-chain hash matches a fresh build of the commit | solana-verify verify-from-repo |
| 5. Publish | Store the verification data on-chain and request a remote check | solana-verify remote submit-job |
Repeat steps 2 to 5 after every upgrade. An upgrade marks the program as unverified until the new version is verified.
- A verifiable build links the on-chain program to one commit of public source code.
- It proves where the code came from, not that the code is safe. Verified is not audited.
- Build in Docker with solana-verify, deploy that exact file, then verify and publish the result.
- Only the upgrade authority can publish the verification data, so a multisig signs it too.
- Every upgrade needs a new verification, tied to the new commit.
An audit report names a commit. Users interact with bytes on-chain. Without a verifiable build, nobody outside your team can confirm that those two are the same code. Solana program builds are not deterministic across machines, so building on a laptop and comparing hashes usually fails even when nothing is wrong. Verifiable builds fix that by building in a fixed Docker environment.
What a verifiable build proves, and what it does not
- It proves: the on-chain program matches a build of a named repository at a named commit, with the build arguments stored on-chain so anyone can repeat it.
- It does not prove: that the code is secure, that it was audited, or that the repository belongs to the team you think it does. Check the repository and commit yourself.
- It is a point in time: if the program is upgradeable, the code can change later. An upgrade removes the verified status until the new version is verified.
That is why a verifiable build is most useful next to an audit: the report says which commit was reviewed, and the verification shows that commit, or a later reviewed one, is what runs on mainnet. Our guide on how to read a smart contract audit report shows where to find the commit in a report.
How to set one up
You need Docker, Cargo and the solana-verify CLI, and the source must be in a public repository. Private repositories cannot be verified, because the whole point is that anyone can rebuild the code.
cargo install solana-verify --locked # build in the Docker image that matches your Solana version solana-verify build --library-name $PROGRAM_LIB_NAME solana-verify get-executable-hash target/deploy/$PROGRAM_LIB_NAME.so # deploy that exact file, then compare with the on-chain program solana-verify get-program-hash -u $NETWORK_URL $PROGRAM_ID solana-verify verify-from-repo -u $NETWORK_URL --program-id $PROGRAM_ID \ https://github.com/$REPO_PATH --commit-hash $COMMIT_HASH --library-name $PROGRAM_LIB_NAME # after uploading the verification data, request the remote check solana-verify remote submit-job -u $NETWORK_URL --program-id $PROGRAM_ID --uploader $UPLOADER
Set the Solana version in the root Cargo.toml so the tool can pick the right build image. Use the library name, not the package name. Do not rebuild with anchor build or cargo build-sbf after solana-verify build, since that overwrites the file with one that will not match. Add --mount-path when the program lives in a subfolder of the repository.
At the end, verify-from-repo asks whether to upload the verification data on-chain. That data sits in an account derived from your program address and holds the repository URL, the commit and the build arguments. Then remote submit-job asks a public verification service to rebuild and compare. Once it succeeds, explorers such as Solana Explorer, SolanaFM and Solscan show the program as verified. The service re-checks verified programs every 24 hours.
If the upgrade authority is a multisig
Only the upgrade authority can publish the verification data. This stops someone else from attaching a different repository to your program. If the authority sits in a multisig, export the transaction with solana-verify export-pda-tx, have the signers approve it in the multisig, and pass the multisig address as --uploader when you submit the remote job. Do this again after each upgrade. Our guide on moving the upgrade authority to a multisig covers the authority setup itself.
solana-verify build from the exact commit you deployed and compare again.How to check a program you depend on or paid for
- Look it up in an explorer: a verified program shows its repository and commit. Unverified or missing data is a question to ask the team.
- Read the commit: confirm the repository belongs to the team and the commit matches the audit report or a reviewed fix.
- Check the authority: paste the address into the free upgrade authority checker. If one wallet can upgrade, the verified code can be replaced tomorrow.
- Repeat it yourself if it matters: run
solana-verify list-program-pdasfor the program, thenverify-from-repowith the stored arguments. You do not need to trust the remote service.
If a development company is deploying for you, write the verifiable build into the final milestone, next to handing the authority to your multisig. Then the deployment you pay for can be checked by anyone.
Where it fits before launch
A verifiable build is one item in the Solana pre-launch security checklist, after the audit and the fix review and before monitoring. Plan it into your incident response plan too, so an emergency fix is verified once the dust settles. To find a reviewer for the commit you will verify, browse the Solana smart contract audit providers we have checked.
Want to see who can upgrade a program right now? Paste its address into the free upgrade authority checker.
Frequently asked questions
What is a verifiable build on Solana?
A build made in a fixed Docker environment from a specific commit of a public repository, so anyone can rebuild it and get the same hash as the program on-chain. The repository, commit and build arguments are stored on-chain.
Does a verified program mean it is safe?
No. Verification only confirms that the deployed program matches the published source. It says nothing about bugs. Check the audit report for the same commit, and check who holds the upgrade authority.
Why does my local build hash not match the on-chain hash?
Usually a different Rust or Solana toolchain, changed dependencies, a build outside Docker or the wrong commit. Build with solana-verify build from the exact commit you deployed and compare again.
Do I need to verify again after an upgrade?
Yes. An upgrade removes the verified status. Update the on-chain verification data with the new commit, signed by the upgrade authority, and submit a new remote verification job.
Can I verify a program from a private repository?
No. Verification needs public source code, because anyone must be able to rebuild the commit and read what the program does.
Need an audit that ends in a verified deployment?
Tell us what you are launching. We suggest audit providers we checked by hand, with a reason for each. Free for teams.
Get matched →Looking for help with this? Browse Solana smart contract audit providers, or describe your project and get matched for free.
Related reading
- Solana oracle risks: eight checks for protocol teamsSolana oracle risks for protocol teams: stale prices, wrong feed IDs, fake accounts, confidence intervals, exponents, thin sources, update choice and outages.
- Solana audit subsidy programs: how they work and how to applyHow Solana audit subsidy programs work: who decides, what they usually pay, how cohorts and vouchers work, how to prepare a strong application and how to compare quotes before you apply.
- Solana audit readiness checklist: 12 things to prepare before the audit startsWhat to prepare before a Solana audit: a frozen commit, a short spec, invariants, tests that run in one command, agreed scope and a developer on call.