ingest: expose fee-bump inner hashes on the view extractors#5964
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes fee-bump inner transaction hashes through view-based ingestion APIs.
Changes:
- Extracts outer and inner hashes in one processing walk.
- Supports fee-bump lookup by either hash.
- Adds fee-bump fixtures and lookup/extraction tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
ingest/transaction_view.go |
Resolves fee-bumps by outer or inner hash. |
ingest/transaction_view_test.go |
Adds fee-bump result fixtures and tests. |
ingest/ledger_close_meta_view_nav.go |
Extracts both hashes from result views. |
ingest/extract.go |
Exposes the inner hash in ledger events. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tamirms
force-pushed
the
feebump-inner-hash-extract
branch
from
July 16, 2026 10:13
1821f3e to
c98f3db
Compare
A fee-bump transaction is resolvable by two hashes: its own (result-pair) hash and the inner transaction's. ExtractLedgerEvents now carries the inner hash (read from the same TransactionResultPair the walk already visits, so no extra pass), and LedgerTransactionViewByHash matches either hash, pairing the envelope by the outer hash as before. This lets a tx-hash index built from the extraction walk resolve fee-bumps by inner hash, matching the classic reader path's behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tamirms
force-pushed
the
feebump-inner-hash-extract
branch
from
July 16, 2026 10:27
c98f3db to
3f629ee
Compare
chowbao
approved these changes
Jul 16, 2026
tamirms
added a commit
to stellar/stellar-rpc
that referenced
this pull request
Jul 16, 2026
The v1 RPC stores getTransaction lookup entries for both a fee-bump's hashes (outer and inner); full-history indexed only the outer, so getTransaction(innerHash) regressed to not-found. Both txhash writers now emit one entry per hash — two for a fee-bump — using the inner hash the SDK's extraction walk exposes from the result pair it already visits. The read path needs no change: LedgerTransactionViewByHash resolves either hash since the same SDK change. Requires the go-stellar-sdk fee-bump inner-hash extractors (stellar/go-stellar-sdk#5964), pinned by the go.mod bump. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tamirms
added a commit
to stellar/stellar-rpc
that referenced
this pull request
Jul 16, 2026
The v1 RPC stores getTransaction lookup entries for both a fee-bump's hashes (outer and inner); full-history indexed only the outer, so getTransaction(innerHash) regressed to not-found. Both txhash writers now emit one entry per hash — two for a fee-bump — using the inner hash the SDK's extraction walk exposes from the result pair it already visits. The read path needs no change: LedgerTransactionViewByHash resolves either hash since the same SDK change. Requires the go-stellar-sdk fee-bump inner-hash extractors (stellar/go-stellar-sdk#5964), pinned by the go.mod bump. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tamirms
added a commit
to stellar/stellar-rpc
that referenced
this pull request
Jul 16, 2026
The v1 RPC stores getTransaction lookup entries for both a fee-bump's hashes (outer and inner); full-history indexed only the outer, so getTransaction(innerHash) regressed to not-found. Both txhash writers now emit one entry per hash — two for a fee-bump — using the inner hash the SDK's extraction walk exposes from the result pair it already visits. The read path needs no change: LedgerTransactionViewByHash resolves either hash since the same SDK change. Requires the go-stellar-sdk fee-bump inner-hash extractors (stellar/go-stellar-sdk#5964), pinned by the go.mod bump. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tamirms
added a commit
to stellar/stellar-rpc
that referenced
this pull request
Jul 16, 2026
The v1 RPC stores getTransaction lookup entries for both a fee-bump's hashes (outer and inner); full-history indexed only the outer, so getTransaction(innerHash) regressed to not-found. Both txhash writers now emit one entry per hash — two for a fee-bump — using the inner hash the SDK's extraction walk exposes from the result pair it already visits. The read path needs no change: LedgerTransactionViewByHash resolves either hash since the same SDK change. Requires the go-stellar-sdk fee-bump inner-hash extractors (stellar/go-stellar-sdk#5964), pinned by the go.mod bump. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tamirms
added a commit
to stellar/stellar-rpc
that referenced
this pull request
Jul 16, 2026
The v1 RPC stores getTransaction lookup entries for both a fee-bump's hashes (outer and inner); full-history indexed only the outer, so getTransaction(innerHash) regressed to not-found. Both txhash writers now emit one entry per hash — two for a fee-bump — using the inner hash the SDK's extraction walk exposes from the result pair it already visits. The read path needs no change: LedgerTransactionViewByHash resolves either hash since the same SDK change. Requires the go-stellar-sdk fee-bump inner-hash extractors (stellar/go-stellar-sdk#5964), pinned by the go.mod bump. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ExtractLedgerEventsnow reports a fee-bump transaction's inner hash alongside its transaction hash: newInnerHash [32]byteandFeeBump boolfields onLedgerTransactionEvents. Both hashes are values with identical lifetimes (the aliasing convention stays reserved for the variable-length event payloads), andInnerHashis meaningful iffFeeBump.LedgerTransactionViewByHashresolves a fee-bump by either of its hashes, still pairing the envelope by the outer hash.Why
A transaction hash index built from the extraction walk needs both hashes to resolve fee-bumps the way the classic reader path does (the parsed
LedgerTransactionalready exposes the inner hash via its result pair). The first consumer is the full-historygetTransactionindex in stellar/stellar-rpc: it indexes from this walk, and indexing only the outer hash regressed inner-hash lookups relative to the SQLite path, which stores both hashes.Performance
Both hashes come from the one TxProcessing walk; the inner hash is read from the result pair the walk already visits and stored inline in the output element, so there is no extra pass and no allocation. Benchmarks on the real pubnet ledger fixture (M1 Max, benchstat, n=10) against main:
ExtractLedgerEvents/view: -1.3% sec/op, allocations identical to mainLedgerTransactionViewByHashview variants: -1.7% to -3.0% sec/opTests
The fee-bump fixture now carries a real
txFEE_BUMP_INNER_SUCCESSresult with its inner result pair, and new tests cover extraction (inner hash present for fee-bumps, nil otherwise) and by-hash lookup through both hashes, including the reversed-TxSet envelope pairing case.🤖 Generated with Claude Code