Skip to content

Commit aa5a8e5

Browse files
committed
fix: fix remaining CI failures (validator startup, blake3 pin)
Anchor test failures (7 bankrun projects): - Remove [test.validator] and [[test.validator.clone]] sections from bankrun projects. These tests use solana-bankrun (in-process simulation) and don't need a local validator. The validator was cloning the token metadata program from mainnet/devnet, causing >25s startup times that exceeded the timeout. - Affected: create-token, transfer-tokens, nft-minter, nft-operations, pda-mint-authority, spl-token-minter, token-2022/basics Anchor test failures (2 real-validator projects): - Bump startup_wait from 25000ms to 120000ms (2 min) for transfer-hook whitelist and hello-world. These clone from devnet and need more time in CI. Native build failure (escrow): - Fix Cargo.lock to actually pin blake3 to 1.5.5 and constant_time_eq to 0.3.1. Previous commit had a stale Cargo.lock that still resolved to the edition-2024-requiring versions. - Fix escrow test: wrap deserialized pubkey bytes in new PublicKey() since borsh returns raw byte arrays, not PublicKey objects.
1 parent 470954b commit aa5a8e5

10 files changed

Lines changed: 12 additions & 64 deletions

File tree

tokens/create-token/anchor/Anchor.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,3 @@ test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
2222
startup_wait = 25000
2323
shutdown_wait = 2000
2424
upgradeable = false
25-
26-
[test.validator]
27-
bind_address = "0.0.0.0"
28-
url = "https://api.mainnet-beta.solana.com"
29-
ledger = ".anchor/test-ledger"
30-
rpc_port = 8899
31-
32-
[[test.validator.clone]]
33-
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"

tokens/escrow/native/Cargo.lock

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tokens/escrow/native/tests/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, test } from 'node:test';
22
import { AccountLayout } from '@solana/spl-token';
3-
import { Transaction } from '@solana/web3.js';
3+
import { PublicKey, Transaction } from '@solana/web3.js';
44
import { assert } from 'chai';
55
import { start } from 'solana-bankrun';
66
import * as borsh from 'borsh';
@@ -64,9 +64,9 @@ describe('Escrow!', async () => {
6464
const vaultTokenAccount = AccountLayout.decode(vaultInfo.data);
6565

6666
assert(offer.id.toString() === values.id.toString(), 'wrong id');
67-
assert(offer.maker.toBase58() === values.maker.publicKey.toBase58(), 'maker key does not match');
68-
assert(offer.token_mint_a.toBase58() === values.mintAKeypair.publicKey.toBase58(), 'wrong mint A');
69-
assert(offer.token_mint_b.toBase58() === values.mintBKeypair.publicKey.toBase58(), 'wrong mint B');
67+
assert(new PublicKey(offer.maker).toBase58() === values.maker.publicKey.toBase58(), 'maker key does not match');
68+
assert(new PublicKey(offer.token_mint_a).toBase58() === values.mintAKeypair.publicKey.toBase58(), 'wrong mint A');
69+
assert(new PublicKey(offer.token_mint_b).toBase58() === values.mintBKeypair.publicKey.toBase58(), 'wrong mint B');
7070
assert(offer.token_b_wanted_amount.toString() === values.amountB.toString(), 'unexpected amount B');
7171
assert(vaultTokenAccount.amount.toString() === values.amountA.toString(), 'unexpected amount A');
7272
});

tokens/nft-minter/anchor/Anchor.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,3 @@ test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
2323
startup_wait = 25000
2424
shutdown_wait = 2000
2525
upgradeable = false
26-
27-
[test.validator]
28-
bind_address = "0.0.0.0"
29-
url = "https://api.mainnet-beta.solana.com"
30-
ledger = ".anchor/test-ledger"
31-
rpc_port = 8899
32-
33-
[[test.validator.clone]]
34-
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"

tokens/nft-operations/anchor/Anchor.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,3 @@ startup_wait = 25000
2323

2424
[scripts]
2525
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
26-
27-
[test.validator]
28-
url = "https://api.mainnet-beta.solana.com"
29-
30-
[[test.validator.clone]]
31-
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"

tokens/pda-mint-authority/anchor/Anchor.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,3 @@ test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
2222
startup_wait = 25000
2323
shutdown_wait = 2000
2424
upgradeable = false
25-
26-
[test.validator]
27-
bind_address = "0.0.0.0"
28-
url = "https://api.mainnet-beta.solana.com"
29-
ledger = ".anchor/test-ledger"
30-
rpc_port = 8899
31-
32-
[[test.validator.clone]]
33-
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"

tokens/spl-token-minter/anchor/Anchor.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,3 @@ test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
2222
startup_wait = 25000
2323
shutdown_wait = 2000
2424
upgradeable = false
25-
26-
[test.validator]
27-
bind_address = "0.0.0.0"
28-
url = "https://api.mainnet-beta.solana.com"
29-
ledger = ".anchor/test-ledger"
30-
rpc_port = 8899
31-
32-
[[test.validator.clone]]
33-
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"

tokens/token-2022/transfer-hook/hello-world/anchor/Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ wallet = "~/.config/solana/id.json"
1919
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
2020

2121
[test]
22-
startup_wait = 25000
22+
startup_wait = 120000
2323
shutdown_wait = 2000
2424
upgradeable = false
2525

tokens/token-2022/transfer-hook/whitelist/anchor/Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cluster = "Localnet"
1616
wallet = "~/.config/solana/id.json"
1717

1818
[test]
19-
startup_wait = 25000
19+
startup_wait = 120000
2020

2121
[scripts]
2222
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

tokens/transfer-tokens/anchor/Anchor.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,3 @@ test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
2222
startup_wait = 25000
2323
shutdown_wait = 2000
2424
upgradeable = false
25-
26-
[test.validator]
27-
bind_address = "0.0.0.0"
28-
url = "https://api.mainnet-beta.solana.com"
29-
ledger = ".anchor/test-ledger"
30-
rpc_port = 8899
31-
32-
[[test.validator.clone]]
33-
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"

0 commit comments

Comments
 (0)