Solana: QA setup blockers — tsconfig, missing deps, surfpool, stub scripts #62
Labels
No labels
agent:implement
agent:ready
backend
bug
cannot-reproduce
confirmed
desktop
docs
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
high-risk
in-review
invalid
mobile
needs-triage
P0-critical
P1-high
P2-medium
P3-low
qa
QA
question
ready
report
responsive
security
security-escalate
smart-contract
solana
tablet
test-pass
ux
wallet-issue
wallet:keplr
wallet:metamask
wallet:station
wallet:walletconnect
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-bridge-monorepo#62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Branch: feat/solana-integration\nRef: #60 Steps 2-4\n\nIssues found during QA setup:\n\n1. tsconfig.json (packages/contracts-solana): types only includes mocha/chai, missing node. Scripts fail with 'Cannot find name process/console/Buffer'. Workaround: --transpile-only --skip-project\n\n2. Module resolution: Scripts in scripts/solana/ can't resolve node_modules from packages/contracts-solana. Workaround: NODE_PATH=$(pwd)/node_modules\n\n3. Missing dep: register-chain-evm.ts requires 'viem' which is not in package.json\n\n4. initialize-bridge.ts is a stub: Prints config but says 'Use anchor CLI or IDL-based client for actual initialization' — doesn't send tx\n\n5. surfpool not found: anchor test requires surfpool (local validator) which is not in prerequisites or installed. Error: 'Failed to spawn surfpool: No such file or directory'\n\n6. deploy.sh hash parity: Step [4/4] fails with '--grep' arg not recognized by cargo-build-sbf\n\nEnvironment: Contabo VPS, Ubuntu 22.04, Node v24.14.0, Rust 1.94.0, Solana CLI 3.1.11, Anchor 1.0.0-rc.3
mentioned in commit
e45dfe4d35mentioned in merge request !146
mentioned in commit 3d5c45f67574fc1c167a46fd84f85a4b6fd3b0ad
mentioned in commit
b21e250565Re: Blocker 5 — surfpool not found
This is an environment version mismatch, not a project bug. The project targets
@coral-xyz/anchor: ^0.30.1(anchor-cli 0.30.x), which usessolana-test-validatoras the local validator.surfpoolis only required by Anchor 1.0+ (the Anza toolchain).Correct setup:
If you have Anchor 1.0.0-rc.3 installed, downgrade:
@brouie Verify:
anchor --versionshould showanchor-cli 0.30.1, andanchor testwill usesolana-test-validatorwhich is already available viasolana-cli.mentioned in commit
c9ebf6254dCorrection on Anchor version: The correct stable version to target is Anchor 0.32.1 (released October 2025), not 0.32 or 1.0.0-rc.x.
anchor-lang=0.32.1anchor-spl=0.32.1@coral-xyz/anchor(npm) =^0.32.12.3.0The 1.0.0 release candidates (rc.1, rc.2, rc.3) are pre-release and not yet stable — they have very low adoption (~3k downloads vs 259k for 0.32.1) and may still have breaking changes before the final 1.0 release.
Dependencies have been updated in
packages/contracts-solana/programs/cl8y-bridge/Cargo.tomlandpackages/contracts-solana/package.jsonto target 0.32.1.Verified: Anchor downgraded to 0.32.1 — surfpool issue resolved (0.32.1 uses solana-test-validator). Build clean, 32/33 tests pass. Remaining open items: initialize-bridge.ts still a stub, deploy.sh hash parity --grep flag still broken.
Additional finding: initialize-bridge.sh uses ANCHOR_PROVIDER_URI but Anchor expects ANCHOR_PROVIDER_URL. Script works when ANCHOR_PROVIDER_URL is set directly but the internal variable name is wrong (line ~51). Steps 2-3 progress: initialize works, register-chain-evm needs PRIVATE_KEY, register-chain-terra needs BRIDGE_CONTRACT.
mentioned in commit
02bf9b9aa6Fixed ANCHOR_PROVIDER_URI → ANCHOR_PROVIDER_URL typo in
initialize-bridge.sh(line 49) — pushed tofeat/solana-integrationas02bf9b9.Re: other items from your latest comments:
deploy.shcallsnpx ts-mochadirectly instead ofanchor test -- --grep.ts-mocha --grep "initialize") which sends real transactions.@brouie Please verify the URI→URL fix resolves the provider fallback issue you observed. 32/33 tests should still pass.
mentioned in commit
f906e186a5Fixed the remaining additional findings — pushed to
feat/solana-integrationasf906e18:1. Fragile path resolution in
deploy.shandinitialize-bridge.shBoth scripts used bare
cd packages/contracts-solanawhich only worked when invoked from repo root. Now usesSCRIPT_DIR/REPO_ROOTpattern (consistent withrun-test-validator.sh) — scripts work from any directory.2.
deploy.shstep [4/4] missing provider env varsThe ts-mocha hash parity step didn't set
ANCHOR_PROVIDER_URLorANCHOR_WALLET, so non-localnet deployments would verify against localhost instead of the target cluster. Now passes both env vars (same pattern asinitialize-bridge.sh).3.
register-tokens.shwas a pure stubSame class of issue as original finding #4 (initialize-bridge.ts stub). Replaced with a functional script that:
SOLANA_RPC_URLandSOLANA_KEYPAIRenv varsSCRIPT_DIR/REPO_ROOTfor reliable path resolutionregister_tokeninstruction viats-mocha --grep "register_token"register_tokentest coverage tobridge.test.ts(happy path + unauthorized admin check)@brouie Please verify these fixes and confirm the QA setup blockers are resolved. All pre-commit checks pass and the new register_token tests should bring the count to 35 (from 32/33).
register-tokens.sh on devnet hits 429 airdrop rate limit — setupTest() airdrops SOL to fresh keypairs every run. Devnet faucet blocks after a few attempts. Scripts work fine on localnet. Suggest either: (1) pre-fund test accounts, or (2) skip airdrop if accounts already have balance.
mentioned in commit
d62ac24fe3Fixed the devnet airdrop rate-limiting — pushed as
d62ac24.The
airdrop()helper intests/helpers/setup.tsnow:This handles both scenarios: reruns against already-funded accounts skip the faucet entirely, and transient rate-limits are retried automatically. Localnet behavior is unchanged (faucet never returns 429).
@brouie Please re-verify
register-tokens.shon devnet with this fix.Still blocked on devnet. The airdrop retry fix (
d62ac24) helps with transient 429s, but setupTest() generates fresh Keypair.generate() for operator/user/canceler every run — new wallets always have 0 balance, so the balance check on line 21-22 never skips. Suggest: use saved devnet keypairs (e.g. from JSON files) instead of Keypair.generate() when SOLANA_RPC_URL points to devnet.mentioned in issue #67
@Brouie Should be fixed, I updated the qa dev server, please check
Re-verified — still blocked. register-tokens.sh on devnet still hits 429. setupTest() still generates fresh Keypair.generate() every run, so balance check never skips. The
d62ac24retry fix helps transient 429s but doesn't solve the fundamental issue of new wallets needing airdrops every time.mentioned in commit
f5dec317baUpdate (devnet 429 / setupTest funding) — pushed
f5dec31onfeat/solana-integration.What changed (
packages/contracts-solana/tests/helpers/setup.ts):requestAirdropwhen needed, then fund operator/user/canceler viaSystemProgram.transfer— avoids hammering the public faucet (one faucet hit per run instead of three, plus no burst on ad-hoc test wallets that useairdrop()).requestAirdropper account; default per-wallet funding restored to 100 SOL so fuzz / large-deposit tests keep enough lamports (same as before the regression)..devnet-keys/(gitignored) so reruns reuse funded wallets when env keypair paths are not set.Also: Fixed types import to
../../target/types/cl8y_bridge(correct path fromtests/helpers/).anchor testwas run locally: 178 passing.@brouie Please re-verify
register-tokens.sh/ devnet scripts with this commit; if anything still blocks QA, note the exact error.Closing per dev — #62 only affects long-running devnet. Localnet uses make solana-test/solana-reset with clean state each run.