-
Notifications
You must be signed in to change notification settings - Fork 199
Description
Overview
SUI transaction broadcasts are intermittently failing with object version mismatch errors. The error indicates that the object version used in the transaction has already been consumed by the time we attempt to broadcast, suggesting a race condition or stale data from the dry-run phase.
Error message:
Error checking transaction input objects: Object ID 0xed36d4227c1d487c0238c88ebd4e3a7ea296784ecdc90f6f8375944896c46bae Version 0x2b2953b5 Digest 7dhXPbpipJaBdddmCHmoGHQoH6Q3rpcpLSTfEuQqGG2u is not available for consumption, current version: 0x2b296f31
This is happening in SuiChainAdapter.ts:423 during executeTransactionBlock. Retrying the transaction typically works, which suggests the issue is timing-related rather than a fundamental problem with the transaction itself.
References and additional details
Code locations:
- Error occurs in
SuiChainAdapter.ts:423duringbroadcastTransaction - Call stack shows flow from
useTradeExecution.tsx:586→tradeExecution.ts:642→TradeExecution.execSuiTransaction
Related Jam session: (see towards end)
https://jam.dev/c/c06d62bd-631b-4025-bd1b-c2a12faf0324
Reproduction:
- Occurs intermittently when executing SUI swaps
- More likely to happen during high network activity or when there's a delay between dry-run and broadcast
- Retrying the transaction usually succeeds
Hypothesis:
The issue appears to be related to the timing between when we perform dry-run simulations and when we actually broadcast the transaction. The object version changes between these two operations, causing the broadcast to fail.
Potential solutions to investigate:
- Implement retry logic with exponential backoff for this specific error type
- Throttle or debounce dry-run calls to reduce the likelihood of version drift
- Refresh the transaction build immediately before broadcasting if a certain time threshold has passed since the dry-run
- Investigate if we can detect version changes and automatically rebuild the transaction with fresh object references
Acceptance Criteria
- Find root cause
- Fix it
- ???
- PROFIT
Need By Date
Not specified - QA/release blocker
Estimated effort
Metadata
Metadata
Assignees
Labels
Type
Projects
Status