Skip to content

Poll fee bumps by the inner transaction hash, and check the ledger before rebuilding a transaction - #3169

Open
tamirms wants to merge 2 commits into
mainfrom
fee-bump-inner-hash
Open

tamirms wants to merge 2 commits into
mainfrom
fee-bump-inner-hash

Conversation

@tamirms

@tamirms tamirms commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Any fee-bump transaction of an inner transaction can get it into the ledger, not only the one you submitted. So the fee-bump guide's examples (JavaScript, Python, Go and Java) now poll the inner transaction hash, which Stellar RPC's getTransaction and Horizon's GET /transactions/:transaction_hash both find in any fee bump. The replace-by-fee section explains why. The Java example used to say that a fee-bump transaction can't be found by its inner hash; both APIs do find it.

The Horizon error-handling page now says to poll a fee-bump transaction by its inner hash. It also adds a "Before Rebuilding a Transaction" section: before you rebuild a transaction with a new sequence number, compare the source account's sequence number with the original transaction's, and look the original up by hash. The submission and sequence-number sections link to it.

🤖 Generated with Claude Code

Any fee-bump transaction of an inner transaction can get it into the
ledger, so the fee-bump guide's examples now poll the inner transaction
hash, which Stellar RPC and Horizon both find in any fee bump. The
replace-by-fee section says so.

The Horizon error-handling page says to poll a fee bump by its inner
hash, and adds a section on checking the ledger before rebuilding a
transaction with a new sequence number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
stellar-docs 🟢 Ready View Preview Nov 20, 2026, 1:36 PM

@kaankacar

Copy link
Copy Markdown
Contributor

/triage

A transaction found by hash with successful false used its sequence number but none of its operations took effect, so it can be rebuilt. A sequence number can also be passed by a bump-sequence operation or a minSeqNum precondition, not only by a transaction with that number.
@stellar-doxie

stellar-doxie Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

🤖 Automated message from Doxie.

Reviewing because @kaankacar asked with /triage.

Verified: RPC and Horizon both find a fee bump by its inner hash, on testnet and in source. I pushed one fix: step 3 of "Before Rebuilding a Transaction" now allows a rebuild when the original failed (successful: false).

Not run: the JavaScript, Python, Go, and Java examples (this lane runs no PR code). I read the hash calls against SDK sources.

Ready to merge.

What I checked
  • RPC indexes both hashes of a fee bump: stellar/stellar-rpc@v30.0.1 cmd/stellar-rpc/internal/rpcv1/sqlitedb/transaction.go:87-92 and cmd/stellar-rpc/internal/rpcv2/ingest/txhash.go:80-85 (also in v23.0.0 internal/db/transaction.go:103-107).
  • Horizon looks up either hash: stellar/stellar-horizon main (release v30.0.1) internal/db2/history/transaction.go:18-23 (transaction_hash OR inner_transaction_hash).
  • Live, testnet: fee bump e7b66901… has inner hash 5e2d1bf3…. getTransaction on that inner hash returns SUCCESS, feeBump: true (RPC 30.0.1). Horizon /transactions/5e2d1bf3… returns it too.
  • SDK hash calls exist: py-stellar-base@17.0.1 base_transaction_envelope.py:39 hash_hex; java-stellar-sdk@6.0.0 AbstractTransaction.java:89 hashHex; go-stellar-sdk main txnbuild/transaction.go:269 HashHex(network); JS Transaction.hash() returns a Buffer.
  • My fix (d9b4fee): the old step 3 said "If you find it, it was applied, so don't rebuild it." A found transaction can have failed, with none of its operations applied. A bump-sequence operation or a minSeqNum precondition can also pass a sequence number without using it.
  • Preview at 09e91d6: both pages return 200, the new paragraph renders, and #before-rebuilding-a-transaction resolves. The getTransaction and retrieve-a-transaction link targets return 200.
  • Preview at d9b4fee: the new step 3 wording renders.
  • Checks at d9b4fee: all green (checks, Mintlify Deployment, CodeQL, Socket). No Copilot review.
  • Sweep: searched for outer-hash polling, feeBump*.hash, "inner hash" and every fee-bump builder (buildFeeBumpTransaction, build_fee_bump_transaction, NewFeeBumpTransaction, FeeBumpTransaction.createWith*) in docs/, snippets/, openapi/, and openrpc/. The only other copy is fees-resource-limits-metering.mdx, which submits through Horizon and never polls a hash. No other copy of the old claim.
  • Necessity: if another party's fee bump lands the inner transaction, a reader who polls the outer hash sees NOT_FOUND. They can then rebuild and pay twice.
  • Versions: checked against stellar-rpc 30.0.1, Horizon 30.0.1, Python SDK 17.0.1, and Java SDK 6.0.0 (the page pins 6.0.0). The PR cites no versions.

@stellar-doxie stellar-doxie Bot added the bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge label Nov 20, 2026

This branch was successfully deployed

1 active deployment
staging — d9b4fee5 Deployed Nov 20, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants