Operator: Solana writer fails — column d.transfer_hash does not exist #71
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#71
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?
Operator starts cleanly with Solana watcher + writer initialized, but Solana writer fails every 5s with:
Error processing Solana approvals error=Failed to query pending approvals: error returned from database: column d.transfer_hash does not exist
DB migrations ran successfully but the deposits table appears to be missing the transfer_hash column that the Solana approval query expects. Likely a missing or outdated migration for the Solana deposit schema.
Environment: make start + make deploy on QA server. Operator .env with SOLANA_RPC_URL, SOLANA_PROGRAM_ID, SOLANA_PRIVATE_KEY all set. Database is postgres://operator:operator@localhost:5433/operator.
mentioned in commit
26a5ae94ffFix pushed to
feat/solana-integrationCause: The Solana writer queries
evm_deposits.transfer_hash, but onlysolana_depositshad that column (migration 010), so Postgres failed on the EVM side of the UNION.Change: Migration
011addstransfer_hashonevm_deposits; the EVM watcher stores the V2compute_xchain_hash_idon insert. Optional one-off binarybackfill-evm-transfer-hashes+ README steps for rows already in DB before deploy.@Brouie — could you review on the QA VPS (migrate / deploy branch, run backfill if needed, confirm the writer stops erroring)? Leaving this issue open until you sign off.
Commit:
26a5ae9transfer_hash error fixed (migration 011 worked). But now hitting a similar error: 'column d.dest_chain does not exist' in the same Solana approvals query. Likely needs another column added to evm_deposits or a migration update.
mentioned in commit
b8d990b41cFollow-up fix pushed (
b8d990b)@Brouie — the
dest_chainerror you hit was one of 7 bugs in the Solana writer's SQL. Full list:SELECT query (evm_deposits branch):
d.dest_chain→ column doesn't exist, fixed tod.dest_chain_key(your new error)d.token→ VARCHAR/BYTEA type mismatch in UNION, fixed tod.dest_token_addressd.status = 'confirmed'→ evm_deposits never has that status, fixed to'pending'dest_chain_key LIKE 'solana%'→ BYTEA column with binary V2 chain IDs, fixed todest_chain_type = 'solana'record_approval INSERT:
5.
chain_typecolumn doesn't exist in approvals table6. Missing 6 NOT NULL columns (would error on every insert)
7.
ON CONFLICT (xchain_hash_id)has no unique indexReplaced the broken approvals INSERT with status-based dedup (
evm_deposits.status='processed',solana_deposits.processed=TRUE) — same pattern as the EVM and Terra writers.Pull the branch and redeploy. This should be the last schema/query blocker for the writer loop.
@Brouie ready for your review — both commits are on
feat/solana-integration(26a5ae9migration + hash compute,b8d990bfull writer SQL + dedup fix). Please pull, deploy, and confirm the Solana writer loop runs clean.Verified — operator starts cleanly, no more column errors. Solana watcher + writer both running, processing blocks. Migration 011 working.