security: cross-chain retry may mask permanent insufficient funds error
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start in pkg/crosschain/transfer.go:164-182 and inspect isRetryableImportError and its retryablePatterns. Determine how transient UTXO visibility errors can be separated from permanent insufficient-funds errors, then define the retry bounds and logging behavior; done means permanent balance errors fail without repeated retries while transient cases remain retryable.
Written by the indexing model from the issue text.
Description
Description
The isRetryableImportError function in pkg/crosschain/transfer.go uses string matching to classify errors as retryable. The pattern "insufficient funds" could match both transient UTXO propagation issues and permanent balance insufficiency.
Current behavior
retryablePatterns := []string{
"not found",
"no utxos",
"insufficient funds", // May occur if UTXOs haven't propagated
"missing utxo",
}
If a user truly has insufficient funds, the CLI retries multiple times before failing, wasting time.
Suggested improvements
- Check for specific SDK error types instead of string matching
- Add max retry duration in addition to max attempts
- Log each retry attempt so users understand what's happening
- Consider distinguishing between "no UTXOs at all" (permanent) vs "UTXOs not yet visible" (transient)
Files affected
pkg/crosschain/transfer.go:164-182
Severity
Minor - causes delayed error reporting, not incorrect behavior
Source
Production readiness audit (2026-02-09)
- Dominant language
- Go
- Stars
- 1
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ava-labs/platform-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ava-labs/platform-cli#35 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ava-labs/platform-cli#24 ·
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
ava-labs/platform-cli#25 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
ava-labs/platform-cli#22 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ava-labs/platform-cli#12 ·
All issues in ava-labs/platform-cli
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100