Add program verification step - #145
Open
fedgiac wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
just verifyrecipe that registers a deployed program's build on-chain, so block explorers show it as verified.We already build reproducibly with
just build-verified, but that only reproduces the artifact locally, so explorers never mark the program verified.This adds the missing step: write the on-chain verification record and queue a remote rebuild that attests the deployed bytecode matches our public source.
How it works
Read more about verification and why we need it here: https://solana.com/docs/programs/verified-builds#how-does-it-work
This PR adds the missing verification steps, specifically 6. verifying against repositories and 7. verify against public api.
Note that this is an authenticated process: it needs the upgrade authority to register that.
Also, this is an interactive process, it requires you to confirm with
yon a prompt.Minor notes
(Unrelated.) I dropped the explicit
--rpc-urlsince this is already handled in the test cli natively.Testing
I ran the command and it seems to work.
Output
See that it's now verified: https://verify.osec.io/status/FYp8R5K4B3B1Kfr7QuWzMz4TwoT7wptjYtxgCrY5sRXb
It's verified on Solscan: https://solscan.io/account/FYp8R5K4B3B1Kfr7QuWzMz4TwoT7wptjYtxgCrY5sRXb
I'd love to verify on the official Solana Explorer but, since a while, the Solana Explorer realized that inside the fleshy shell of my being lurks the soul of a bot. Maybe I should just ask Claude to check. The humans among you may be able to see whether it's verified there:
https://explorer.solana.com/address/FYp8R5K4B3B1Kfr7QuWzMz4TwoT7wptjYtxgCrY5sRXb
Worth noting that this didn't "just work", I got a few failures in between:
Network error, unclear reason.
This apparently left some artifacts, and so running the command again would fail with a hard-to-debug error.
I removed the leftover artifact to try a full test run again. Annoyingly, `solana-verify close` doesn't seem to take a `--keypair` argument, it uses the default keypair.