Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify failed #3289

Open
cxp-13 opened this issue Oct 2, 2024 · 10 comments
Open

verify failed #3289

cxp-13 opened this issue Oct 2, 2024 · 10 comments
Labels

Comments

@cxp-13
Copy link

cxp-13 commented Oct 2, 2024

I deployed to devnet. It has been successfully deployed. https://explorer.solana.com/address/CirTw1apKgQHSveAvpMp3P283Z54XzJWTBy1LHVLz7E9?cluster=devnet
I haven't made any changes to the code.

I closed the previous program ID and rebuilt and deployed a new program ID.
I tried to re verify, but unfortunately.
anchor verify CirTw1apKgQHSveAvpMp3P283Z54XzJWTBy1LHVLz7E9 --skip-build

Error: Binaries don't match

When I tried to verify again, it turned into various error. I have never even seen this pubkey before. I don't know which account it's referring to

Error: AccountNotFound: pubkey=6PnPLX93mScpxXYXwGWswcnSWaJti7S2ToZt88s5m1i7

Caused by:
    AccountNotFound: pubkey=6PnPLX93mScpxXYXwGWswcnSWaJti7S2ToZt88s5m1i7
Error: RPC request error: cluster version query failed: error sending request for url (https://devnet.helius-rpc.com/?api-key=f84a6f24-1feb-4290-bc2f-4fc95cf5e7f0): error trying to connect: tls handshake eof

Caused by:
    RPC request error: cluster version query failed: error sending request for url (https://devnet.helius-rpc.com/?api-key=f84a6f24-1feb-4290-bc2f-4fc95cf5e7f0): error trying to connect: tls handshake eof
@cxp-13 cxp-13 changed the title validation failed verify failed Oct 2, 2024
@cxp-13
Copy link
Author

cxp-13 commented Oct 3, 2024

@cxp-13
Copy link
Author

cxp-13 commented Oct 3, 2024

I also tried the demo project in Solana tutorial(https://github.com/Unboxed-Software/anchor-counter-program.git), executing anchor verify 5a4hTa2GLNmZjvPscYT6kB5Pn7x9HZzaRoJj6grhyKaq

Copying out the build artifacts
Successfully copied 208kB to /home/cxp/solana_learn/anchor-counter-program/target/verifiable/anchor_counter.so
Cleaning up the docker target directory
Removing the docker container
anchor-program
Extracting the IDL
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.48s
     Running unittests src/lib.rs (/home/cxp/solana_learn/anchor-counter-program/target/debug/deps/anchor_counter-339f04b272a7b869)
Writing the IDL file
Writing the .ts file
Build success
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.09s
     Running unittests src/lib.rs (/home/cxp/solana_learn/anchor-counter-program/target/debug/deps/anchor_counter-339f04b272a7b869)
Error: AccountNotFound: pubkey=7CpYT3LFY22JgJ8DMcjaQ4Rx61bdxNTBPgC1NQUDHENd

Caused by:
    AccountNotFound: pubkey=7CpYT3LFY22JgJ8DMcjaQ4Rx61bdxNTBPgC1NQUDHENd

@acheroncrypto
Copy link
Collaborator

To make the builds reproducable, set both Anchor and Solana versions (change it to whatever you used to build and deploy)

[toolchain]
anchor_version = "0.30.1"
solana_version = "1.18.17"

Add --verifiable flag to the build and deploy commands:

anchor build --verifiable && anchor deploy --verifiable

Also worth noting that the Solana explorer currently uses Osec API to manage program verifications. You can find more information here.

@cxp-13
Copy link
Author

cxp-13 commented Oct 3, 2024

To make the builds reproducable, set both Anchor and Solana versions (change it to whatever you used to build and deploy)

[toolchain]
anchor_version = "0.30.1"
solana_version = "1.18.17"

Add --verifiable flag to the build and deploy commands:

anchor build --verifiable && anchor deploy --verifiable

Also worth noting that the Solana explorer currently uses Osec API to manage program verifications. You can find more information here.

I have seen this warehouse, but its description is very confusing and complex. So I prefer to use simple instructions in the anchor.

@cxp-13
Copy link
Author

cxp-13 commented Oct 3, 2024

To make the builds reproducable, set both Anchor and Solana versions (change it to whatever you used to build and deploy)

[toolchain]
anchor_version = "0.30.1"
solana_version = "1.18.17"

Add --verifiable flag to the build and deploy commands:

anchor build --verifiable && anchor deploy --verifiable

Also worth noting that the Solana explorer currently uses Osec API to manage program verifications. You can find more information here.

cxp@CXPfromR9000P:~/solana_learn/anchor-counter-program$ anchor deploy --verifiable
Deploying cluster: https://devnet.helius-rpc.com/?api-key=f84a6f24-1feb-4290-bc2f-4fc95cf5e7f0
Upgrade authority: /home/cxp/.config/solana/id.json
Deploying program "anchor_counter"...
Program path: /home/cxp/solana_learn/anchor-counter-program/target/verifiable/anchor_counter.so...
Program Id: 67r1SCrPYwWKv4pRznqaTt1PhrLZdUMJU4HWyxY57SVw

Deploy success

Although it was successful, the verification was not displayed as successful in the browser.
https://solscan.io/account/67r1SCrPYwWKv4pRznqaTt1PhrLZdUMJU4HWyxY57SVw?cluster=devnet

@cxp-13
Copy link
Author

cxp-13 commented Oct 3, 2024

I don't understand the difference between anchor deploy --verifiable and anchor verify xxxxxxxx. Aren't they a role?

@cxp-13
Copy link
Author

cxp-13 commented Oct 3, 2024

Writing the IDL file
Writing the .ts file
Build success
Deploying cluster: https://devnet.helius-rpc.com/?api-key=f84a6f24-1feb-4290-bc2f-4fc95cf5e7f0
Upgrade authority: /home/cxp/.config/solana/id.json
Deploying program "anchor_counter"...
Program path: /home/cxp/solana_learn/anchor-counter-program/target/verifiable/anchor_counter.so...
============================================================================
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
============================================================================
bone anxiety hole simple relief also second bronze produce chat version pear
============================================================================
To resume a deploy, pass the recovered keypair as the
[BUFFER_SIGNER] to `solana program deploy` or `solana program write-buffer'.
Or to recover the account's lamports, pass it as the
[BUFFER_ACCOUNT_ADDRESS] argument to `solana program close`.
============================================================================
Error: 3 write transactions failed
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.

@cxp-13
Copy link
Author

cxp-13 commented Oct 3, 2024

cxp@CXPfromR9000P:~/solana_learn/anchor-counter-program$ solana --version
anchor --version
solana-cli 1.18.17 (src:b685182a; feat:4215500110, client:SolanaLabs)
anchor-cli 0.30.1

I think the version should be fine

@cxp-13
Copy link
Author

cxp-13 commented Oct 3, 2024

Writing the IDL file
Writing the .ts file
Build success
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.10s
     Running unittests src/lib.rs (/home/cxp/solana_learn/anchor-counter-program/target/debug/deps/anchor_counter-26462201efc3562c)
Error: AccountNotFound: pubkey=8hNhS8XwKd7jhfgRhGorcoju6E1Qx8huxcWojNEES5Cn

Caused by:
    AccountNotFound: pubkey=8hNhS8XwKd7jhfgRhGorcoju6E1Qx8huxcWojNEES5Cn

If entering the programs/anchor-counter folder, executing anchor verify still has this issue.

@cxp-13
Copy link
Author

cxp-13 commented Oct 3, 2024

I want to give up, it's really puzzling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants