E2E: Solana tests fail — placeholder program ID, bridge not initialized, airdrop fails #70
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#70
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?
make solana-test-e2e fails 5/6 (only validator running check passes).
Three root causes:
E2E tests hardcode placeholder program ID CL8YBr1dg3So1ana111111111111111111111111111 instead of actual deployed ID CNWdzCX1a2YHZ3iYn9mrAPWXFZWqC5kJn6mdoCFsfLsC. test_solana_bridge_program_exists fails with AccountNotFound.
Bridge not initialized on docker Solana validator — setup-bridge.sh outputs 'Solana Program: (not set)' and doesn't run any Solana initialization. Bridge PDA Fnuht9t not found.
Airdrop test expects 1 SOL but gets 0 — docker validator faucet may not be configured or test account not funded.
Environment: make start + make deploy on QA server. Anvil + LocalTerra + Solana (v1.18.26) + Postgres all healthy. EVM and Terra deployed and configured. Solana programs deployed (cl8y_bridge + cl8y_faucet).
Pushed follow-up on
feat/solana-integration(local deploy env + QA console hints when EVM/Terra/forge/LocalTerra fails).@brouie could you review when you have a moment? Leaving this issue open until you confirm Solana E2E on QA.
Partial progress after latest pull: 2/6 pass (up from 1/6). Bridge PDA now exists (104 bytes). Remaining 4 fail because test accounts have no SOL on docker validator — deposit_native fails with 'Attempt to debit an account but found no record of a prior credit'. Need airdrop to test keypair on docker Solana validator.
@brouie Could you review when you have a moment?
Pushed fixes on
feat/solana-integration(52636b8) aimed at the remaining Solana E2E failures (test accounts not funded on the Docker validator):solana-test-validatornow binds0.0.0.0inside the container so RPC + faucet/airdrop work through Docker port mapping (host still published on 127.0.0.1 only).make solana-test-e2e/test_solana_flows.rs:SOLANA_RPC_URLsupport, plusairdrop_and_confirm()with retries and balance polling so airdrops are reliable against a slow validator.Please re-run
make solana-test-e2eon QA aftermake start+ deploy/init and confirm whether all six ignored tests pass. Thanks!4/6 E2E pass now (up from 1/6). airdrop + bridge_exists + deposit_flow + validator all pass. 2 remaining: (1) cancel_flow needs SOLANA_OPERATOR_KEYPAIR matching bridge operator C4kB9S... — bridge operator doesn't match ANCHOR_WALLET. (2) evm_to_solana_flow still failing — need details.
Both remaining failures (evm_to_solana + cancel_flow) are same root cause: bridge operator is C4kB9S4idFz1aXdc2dMeeo9H52uVdFkiupCMTKoTxNa3 but ANCHOR_WALLET is ~/.config/solana/id.json (12TChu...). Need either SOLANA_OPERATOR_KEYPAIR set or bridge re-initialized with matching operator.
mentioned in commit
da14cbff8eFixed in commit
da14cbfonfeat/solana-integration. All three root causes addressed:Program ID persistence —
deploy-solananow savesSOLANA_PROGRAM_IDto.deploy/local.env(newwrite_deploy_env_solana()inlib-local-deploy-env.sh). Bothsetup-bridgeandsolana-test-e2eload it automatically, so the placeholder ID is no longer used when a real deploy keypair exists.Bridge initialization —
setup-bridge.shnow callsinitialize-bridge.sh(idempotent) before chain registration, and funds the admin wallet with SOL first. This creates the bridge PDA that was missing.SOL via setup, not faucet —
cl8y_faucetis for test SPL tokens only. SOL is now distributed bysetup-bridge.shviasolana airdropCLI. E2E tests usefund_from_admin()(system transfer from pre-funded admin wallet) instead ofrequest_airdrop.@Brouie — please review when you get a chance. You can test with
make deploy && make solana-test-e2eon QA.mentioned in issue #67
@brouie — pushed fix in commit
a60944eonfeat/solana-integrationaddressing the last 2 failing E2E tests (evm_to_solana_flow + cancel_flow).Root cause:
setupTest()inbridge.test.tsgenerated a random operator keypair on every run. Whensetup-bridge.shinitialized the bridge viats-mocha, the on-chain operator ended up as a random pubkey whose private key was lost after the process exited. The Rust E2E tests then couldn't find a matching local keypair to sign as operator.Fix:
setupTest()now readsSOLANA_OPERATOR_KEYPAIRenv var (keypair file path) when set, andsetup-bridge.sh/initialize-bridge.shpassSOLANA_OPERATOR_KEYPAIR=$SOLANA_KEYPAIRso operator = admin = the known local wallet. Also replacedrequest_airdropwithfund_from_adminincanceler_solana_destination.rsfor consistency.Could you re-run
make deploy && make solana-test-e2eon QA and confirm all 6 pass? Thanks!Pulled
a60944e+f5dec31. Attempted make deploy but LocalTerra container exits immediately (logs show help text instead of startup). EVM + Solana deploy fine but bridge setup incomplete without Terra. Can't verify 6/6 E2E until LocalTerra is fixed. Will retest once resolved.LocalTerra fixed (stale volume — wiped and restarted). Full stack deployed. E2E results: 4/6 pass, 2/6 fail.
Passed: test_solana_bridge_program_exists, test_solana_admin_funded, test_solana_validator_running, test_solana_cancel_flow
Failed:
@brouie Please pull
feat/solana-integration(commite357940) or check out tagreview/brouie-solana-e2e-70, then on QA run:This batch fixes native-token handling in
test_evm_to_solana_flow, runs Solana E2E tests with--test-threads=1to avoid deposit nonce races (Anchor 2006), and tightenssetup-bridge.shmocha grep toregisters a chainonly. Please confirm all six ignored tests pass. Thanks!6/6 E2E ALL PASS after dev fix (dest_token all-zeros for native SOL + --test-threads=1). LocalTerra fix was stale volume — wiped and restarted. Full stack: Anvil x2 + LocalTerra + Solana + Postgres all healthy. Closing.