Skip to content

Unable to verify program. Local build works remote build results in a different hash #222

@Woody4618

Description

@Woody4618

Hello,
i am trying to verify TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb.
https://github.com/solana-program/token-2022/releases/tag/program%40v9.0.1

I can verify it locally
96650d6511e8da6f9ec2888cc7ba2764073e31152d84998e4071d054762873bd

but the remote build results in a different hash:
0efb0df034912c9147af345e4b05a37e2f39d71dd10c16cd3de873c81257fff8

I can not figure out why. Can you please help me debug?

Reproduction:

This works:

solana-verify verify-from-repo \
  -um \
  --commit-hash a1d9915ba3d11e43ffab2bddac6a8e7d7d1fd49c \
  --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb \
  --library-name spl_token_2022 \
  https://github.com/solana-program/token-2022 \
  -- --no-default-features

On Chain Hash: 96650d6511e8da6f9ec2888cc7ba2764073e31152d84998e4071d054762873bd
Executable Hash: 96650d6511e8da6f9ec2888cc7ba2764073e31152d84998e4071d054762873bd

Remote job with same parametersdoes not work:

solana-verify verify-from-repo --remote \
  -um \
  --commit-hash a1d9915ba3d11e43ffab2bddac6a8e7d7d1fd49c \
  --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb \
  --library-name spl_token_2022 \
  https://github.com/solana-program/token-2022 \
  -- --no-default-features

Result:

Commit hash from remote: a1d9915ba3d11e43ffab2bddac6a8e7d7d1fd49c
Skipping prompt: false
Cloning repo into: /tmp/solana-verify/2cfef6c3-5175-4c94-bd46-04396546c780/token-2022
Checked out commit hash: a1d9915ba3d11e43ffab2bddac6a8e7d7d1fd49c
Build path: "/tmp/solana-verify/2cfef6c3-5175-4c94-bd46-04396546c780/token-2022/"
Verifying program: spl_token_2022
Skipping local build and writing verify data on chain
Do you want to upload the program verification to the Solana Blockchain? (y/n) n
Exiting without uploading the program.
Sending verify command to remote machine with uploader: 5vJwnLeyjV8uNJSp1zn7VLW8GwiQbcsQbGaVSwRmkE4r

Please note that if the desired uploader is not the provided keypair, you will need to run `solana-verify remote submit-job --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb --uploader <uploader-address>.

Verification request sent with request id: e65635ca-9e3c-4fe1-bcbe-f2629493063d
Verification in progress... ⏳
[00:00:00]    ✅ Process completed. (Done in 0 seconds)                                        Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb has not been verified. ❌
The provided GitHub build does not match the on-chain hash.
On Chain Hash: 96650d6511e8da6f9ec2888cc7ba2764073e31152d84998e4071d054762873bd
Executable Hash: 0efb0df034912c9147af345e4b05a37e2f39d71dd10c16cd3de873c81257fff8
Repo URL: https://github.com/solana-program/token-2022/tree/a1d9915ba3d11e43ffab2bddac6a8e7d7d1fd49c
Check the verification status at: https://verify.osec.io/status/TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Job url: https://verify.osec.io/job/e65635ca-9e3c-4fe1-bcbe-f2629493063d

{"is_verified":false,"message":"On chain program not verified","on_chain_hash":"96650d6511e8da6f9ec2888cc7ba2764073e31152d84998e4071d054762873bd","executable_hash":"0efb0df034912c9147af345e4b05a37e2f39d71dd10c16cd3de873c81257fff8","repo_url":"https://github.com/solana-program/token-2022/tree/a1d9915ba3d11e43ffab2bddac6a8e7d7d1fd49c","commit":"a1d9915ba3d11e43ffab2bddac6a8e7d7d1fd49c","last_verified_at":"2025-06-11T21:20:01.284655","is_frozen":false,"is_closed":false}

Build locally without flag:

This results in a different hash than the remote build (0efb0df034912c9147af345e4b05a37e2f39d71dd10c16cd3de873c81257fff8)
so i guess its not the problem that the remote build just ommits the flag.

solana-verify build --library-name spl_token_2022

Verify locally: 
solana-verify get-executable-hash target/deploy/spl_token_2022.so
Hash: 32f44e2ac93843dd4c8e96d18a72f4ce31f768ae0b71038d822b4301d76d4338

Build locally with correct flag result in correct hash:

solana-verify build --library-name spl_token_2022 -- --no-default-features

Verify locally: 
solana-verify get-executable-hash target/deploy/spl_token_2022.so
Hash: 96650d6511e8da6f9ec2888cc7ba2764073e31152d84998e4071d054762873bd

This is the on chain PDA which looks correct to me:

solana-verify get-program-pda --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb -um
----------------------------------------------------------------
Address: HHxi92iQUUH7VhUiyfJ4mEQ8v5S8VgGPxtDnC4f5CY73
----------------------------------------------------------------
Program Id: TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Signer: 5vJwnLeyjV8uNJSp1zn7VLW8GwiQbcsQbGaVSwRmkE4r
Git Url: https://github.com/solana-program/token-2022
Commit: a1d9915ba3d11e43ffab2bddac6a8e7d7d1fd49c
Deployed Slot: 346170941
Args: ["--library-name", "spl_token_2022", "--", "--no-default-features"]
Version: 0.4.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions