I just created an Anchor project with anchor init
and tried to run anchor test
but it didn't work. I always get the error:
Unable to get latest blockhash. Test validator does not look started. Check .anchor/test-ledger/test-ledger-log.txt for errors. Consider increasing [test.startup_wait] in Anchor.toml.
If I try using solana-test-validator
I get the error Error: failed to start validator: Failed to create ledger at test-ledger: blockstore error
I increased the startup_wait
value in Anchor.toml file but it didn't work as well:
[test]
startup_wait = 100000
My log file shows the following:
INFO [0m solana_test_validator[0m[38;5;8m][0m solana-validator 1.15.2 (src:94dd3726; feat:1211687720, client:SolanaLabs)
INFO [0m solana_test_validator[0m[38;5;8m][0m Starting validator with: ArgsOs {
inner: [
"solana-test-validator",
],
}
WARN [0m solana_perf[0m[38;5;8m][0m CUDA is disabled
INFO [0m solana_perf[0m[38;5;8m][0m AVX detected
INFO [0m solana_perf[0m[38;5;8m][0m AVX2 detected
INFO [0m solana_faucet::faucet[0m[38;5;8m][0m Faucet started. Listening on: 0.0.0.0:9900
INFO [0m solana_faucet::faucet[0m[38;5;8m][0m Faucet account address: GbS4pJsmhizfuvYJhm8sMSQ3xRHDHbUWCTNkkXygVC1Q
INFO [0m solana_ledger::blockstore[0m[38;5;8m][0m Maximum open file descriptors: 1000000
INFO [0m solana_ledger::blockstore[0m[38;5;8m][0m Opening database at "test-ledger/rocksdb"
INFO [0m solana_ledger::blockstore[0m[38;5;8m][0m "test-ledger/rocksdb" open took 108ms
INFO [0m solana_metrics::metrics[0m[38;5;8m][0m metrics disabled: SOLANA_METRICS_CONFIG: environment variable not found
INFO [0m solana_metrics::metrics[0m[38;5;8m][0m datapoint: shred_insert_is_full total_time_ms=0i slot=0i last_index=3i num_repaired=0i num_recovered=0i
INFO [0m solana_runtime::hardened_unpack[0m[38;5;8m][0m Extracting "test-ledger/genesis.tar.bz2"...
The versions I'm using are:
anchor-cli 0.26.0
solana-test-validator 1.15.2
rustc 1.67.0
Any suggestion?