• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

KarpelesLab / libwallet / 27023772732
22%

Build:
DEFAULT BRANCH: master
Ran 05 Jun 2026 03:26PM UTC
Jobs 1
Files 129
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Jun 2026 03:24PM UTC coverage: 22.499% (+0.01%) from 22.486%
27023772732

push

github

MagicalTux
fix SPL transfer "Program failed to complete" + simulate CU limit + bump 0.4.55

A user trying to send 1.315764 USDT on 0.4.53 got back:

  Transaction simulation failed: Error processing Instruction 1:
  Program failed to complete

The mainnet trace was reproducible: ATA derivation correct, sender
ATA holds 1.315764 USDT, recipient address valid, mint healthy.
Replayed the exact tx in standalone Go against mainnet and watched
the program log — the ATA CreateIdempotent (instruction 1 once a
ComputeBudget SetLimit is prepended) consumed 15,018 CUs.

Root cause: `solanaDefaultCULimit = 1_000`, set in 0.4.x for a
basic SOL transfer (~200 CUs). 0.4.53 added the SPL path that
ALWAYS prepends an idempotent ATA Create (~15k CUs end-to-end —
allocate, init mint state, init owner). Any caller who opted into
priority (PriorityLevel set or ComputeUnitPrice non-zero) ended
up with cuLimit=1000 from `resolveSolanaPriority`, the program
hit the 1k ceiling mid-flight, and the RPC reported "Program
failed to complete" with no further detail.

Fix in two layers:

- Conservative SPL default (safety net). 30,000 CUs covers
  TransferChecked + ATA CreateIdempotent + Token-2022 fee
  instruction overhead with ~2x margin. Picked when simulation
  isn't available.

- Simulation-driven sizing (primary path). Before signing, build
  a draft message with a 200k cap, call simulateTransaction with
  sigVerify=false, read unitsConsumed, set the on-wire CB limit
  to that plus a 10%-or-+1000 headroom (the larger). Caps at
  Solana's per-tx 1.4M CU max; never lowers a caller-pinned
  limit. On RPC failure falls back to the conservative default.
  Same pattern Phantom and Solflare use.

For the user's exact tx: simulation says 15,273 CUs; we set the
CB limit to 16,800 instead of the broken 1,000. Verified live
against mainnet from a standalone test that constructs the same
bytes.

Tests pin the headroom math across boundary cases (tiny tx where
additive +1000 dominates, the user's e... (continued)

24 of 107 new or added lines in 3 files covered. (22.43%)

4310 of 19156 relevant lines covered (22.5%)

98.68 hits per line

Uncovered Changes

Lines Coverage ∆ File
55
26.67
wlttx/solana_simulate.go
24
28.18
-0.88% wlttx/solana.go
4
39.24
1.4% wlttx/solana_priority.go
Jobs
ID Job ID Ran Files Coverage
1 27023772732.1 05 Jun 2026 03:26PM UTC 129
22.5
GitHub Action Run
Source Files on build 27023772732
  • Tree
  • List 129
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27023772732
  • c037d7c4 on github
  • Prev Build on master (#27018188820)
  • Next Build on master (#27096383372)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc