Skip to content

fullhistory: index fee-bump transactions by both hashes#862

Merged
tamirms merged 1 commit into
feature/full-historyfrom
fullhistory-feebump-inner-hash
Jul 16, 2026
Merged

fullhistory: index fee-bump transactions by both hashes#862
tamirms merged 1 commit into
feature/full-historyfrom
fullhistory-feebump-inner-hash

Conversation

@tamirms

@tamirms tamirms commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

getTransaction(innerHash) for a fee-bump transaction currently returns not-found from the full-history index: both txhash writers key only the outer (result-pair) hash, while the SQLite path stores lookup entries for both hashes (cmd/stellar-rpc/internal/db/transaction.go), so this is a behavioral regression against the API being replaced.

This change indexes both hashes. The rule lives once in the txhash package (EntryHashes: the transaction hash, plus a fee-bump's inner hash), and the hot writer and the cold .bin writer both derive their entries from it, so the two tiers always index the same hash set. The read path needs no change: the SDK's LedgerTransactionViewByHash resolves either hash since stellar/go-stellar-sdk#5964, so the fetch-and-verify step confirms inner-hash candidates natively.

Depends on

stellar/go-stellar-sdk#5964 (merged), which exposes the inner hash on the extraction walk; go.mod pins its pseudo-version.

Tests

TestTxhashColdWriter_FeeBumpBothHashes covers the cold writer end to end (both prefixes land in the .bin, mapped to the same seq), and the shared-walk byte-identity guard's reference contract now includes inner-hash entries. Hot-side matching is covered by the SDK's own tests; an e2e fee-bump case through the daemon can follow separately.

🤖 Generated with Claude Code

@tamirms
tamirms force-pushed the fullhistory-feebump-inner-hash branch 2 times, most recently from 4bb8c20 to 81a9669 Compare July 16, 2026 15:04
@tamirms
tamirms marked this pull request as ready for review July 16, 2026 15:04
@socket-security

socket-security Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​stellar/​go-stellar-sdk@​v0.6.1-0.20260618191317-308407eca8c6 ⏵ v0.6.1-0.20260716145807-2bfffb159f3675 +1100100100100

View full report

@tamirms
tamirms force-pushed the fullhistory-feebump-inner-hash branch from 81a9669 to b79c5e8 Compare July 16, 2026 15:51
@tamirms
tamirms requested review from a team and chowbao July 16, 2026 16:44
@tamirms
tamirms force-pushed the fullhistory-feebump-inner-hash branch from b79c5e8 to 0b1b982 Compare July 16, 2026 22:01
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
tamirms force-pushed the fullhistory-feebump-inner-hash branch from 0b1b982 to 24fd5c0 Compare July 16, 2026 22:02
@tamirms
tamirms merged commit cb59867 into feature/full-history Jul 16, 2026
8 of 15 checks passed
@tamirms
tamirms deleted the fullhistory-feebump-inner-hash branch July 16, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants