Skip to content

No Transaction Fee Bumping or Sequence Number Retry Logic #5

Description

@Nanle-code

Overview

Stellar transactions fail with txBAD_SEQ when the sequence number is stale (another transaction confirmed between fetching the account and submitting). There is also no fee bump support for transactions that get stuck in the queue during congestion. The current mock submit_transaction does not handle any of this.

Resolution

Implement a submit_with_retry function in soroban.rs: fetch the account's current sequence from Horizon, build the transaction with seq_num + 1, attempt submission. On txBAD_SEQ, re-fetch the account and retry up to 3 times with exponential backoff. On fee-related failure (txINSUFFICIENT_FEE), implement fee bumping using TransactionEnvelope::FeeBump(FeeBumpTransaction) from stellar-xdr — wrap the original inner transaction and apply a multiplied fee. Expose --fee-multiplier as a CLI arg on deploy and invoke. Parse the txResult XDR from Horizon's submission response to extract the exact failure reason (OperationResultCode) rather than treating all failures as generic errors. Track the submitted transaction hash and poll getTransaction on the Soroban RPC with a configurable timeout (default 30s) to confirm inclusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions