solana: Query: Deploying hello world to solana-test-validator on M1 fails
Problem
I’m running Solana master with the example Hello World program and on OSX x86 things run as expected. I can deploy the hello world program to the test validator. However, when doing the exact same on M1, it fails at the “Finalize transaction” step:
$ solana program deploy dist/program/helloworld.so
===================================================================
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
===================================================================
spring kick mail one box meat august educate car ghost orient woman
===================================================================
To resume a deploy, pass the recovered keypair as
the [PROGRAM_ADDRESS_SIGNER] argument to `solana deploy` or
as the [BUFFER_SIGNER] to `solana program deploy` or `solana write-buffer'.
Or to recover the account's lamports, pass it as the
[BUFFER_ACCOUNT_ADDRESS] argument to `solana program close`.
===================================================================
Error: Deploying program failed: unable to confirm transaction. This can happen in situations such as transaction expiration and insufficient fee-payer funds
I was hoping if anybody would have a hint where I should look to try and resolve this.
This is what I did to get my environment started:
- Set up BPF SDK
$ git clone https://github.com/solana-labs/solana
$ export PROJECT_ROOT=`pwd`/solana
$ cd $PROJECT_ROOT/sdk/cargo-build-bpf
$ cargo install --path .
$ cd $PROJECT_ROOT
$ ln -s $PROJECT_ROOT/sdk ~/.cargo/bin/sdk
- Build the CLI and run configure
$ cd $PROJECT_ROOT/cli
$ cargo build
$ cd $PROJECT_ROOT/keygen
$ cargo build
$ $PROJECT_ROOT/target/debug/solana config set --url localhost
$ $PROJECT_ROOT/target/debug/solana-keygen new
- Run the test validator
$ cd $PROJECT_ROOT/validator
$ ./solana-test-validator
- Build hello world
Edit the
example-helloworld/src/program-rust/Cargo.tomlto match $PROJECT_ROOT deps, and then:
$ git clone https://github.com/solana-labs/example-helloworld
$ cd example-helloworld
$ npm install
$ npm run build:program-rust
Everything compiles ok and seems to run fine except for the “Finalize transaction” part which fails on M1. In the validator.log I see no errors, only a warning:
WARN solana_core::window_service] Window does not seem to be receiving data. Ensure port configuration is correct...
I do not see this warning when running on OSX x86.
Any hints where I should look to try and fix this?
Proposed Solution
None - just a query.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 20
- Comments: 37 (8 by maintainers)
pretty sad the fastest blockchain doesn’t work on the fastest laptops 😦
From perusing the discord, I’ve figured out what was up (as alluded to in other threads):
--logto the test-validator command and watching the deploy, you’ll see the following--no-bpf-jitto the test-validator command and then you’ll be good to go.Similar issue, I’m on a Mac with an M1 Chip. I’ve tried different demos and all of them have the same issue when I try to deploy my program. Basically it just gets stuck at
[0/1] Finalizing transaction...validator.logshas this being called repeatedly:solana_rpc::send_transaction_service] Retrying transaction:when I grep using my transaction id.I’ve tried building + deploying with my terminal running Rosetta and run into the same problem regardless, so not sure if this is related.
This is a network issue and you’re probably facing this now because the Solana network is down. Check at status.solana.com and try again later. If it still happens, switch your network.
I build Solana tool suite from source and add
--no-bpf-jitflag tosolana-test-validator. Now at least I can deploy the example program to local validator.Before that, I can’t even run
solana-test-validator. Using the Solana CLI which is built from source, the CLI works but then it’s stuck when deploying the program.I resume the failed deployment but it still stuck and finally reach maximum retries.
https://github.com/solana-labs/solana/pull/21215 should help to run test validator without explicit
--no-bpf-jitflag.Similar issue even am facing while requesting airdrop
Error: unable to confirm transaction. This can happen in situations such as transaction expiration and insufficient fee-payer funds
thanks mate, I think you’re exactly right - plus looks like the devnet issue is resolved now, too
@Qumeric, make sure 1) You’re connected to the right cluster and 2) That you’ve got enough SOL in your account
I found my issue: I had installed almost everything under Rosetta. Checking my rustup toolchain via
rustup toolchain listI discovered I had somehow managed to install rust for arm64 instead of x86. After reinstalling everything, I’ve confirmed my default toolchain is nowstable-x86_64-apple-darwinand everything is now building 😃😌if I scp the binary to the rpi I can deploy it from there without issues. Networking is fine otherwise. It appears some issue with the tooling crossing the architectures (?) but I don’t know how to debug this further.
So, I think might be a network error. I switched to a different network and since the devnet wallet is currently drained, I tried using testnet and it totally worked. Btw, I tried using testnet earlier when was stuck at the deployment but it wouldn’t work. Changing the network connection is what got it working for me.
did you manage to solve this problem? also facing the same even when trying to do a devnet airdrop
@gxxcastillo okay but that isn’t really fixing the issue it’s avoiding it. I’m getting the same issue on M1 - funny thing is, it was deploying perfectly earlier - but I can’t confirm if this was the x86 version.
I get the feeling this occurs when part of your toolchain is x86 and some is arm, but can’t confirm yet. I’ll keep digging.