"feat(#428): enrich /txs response with resolved addresses - #436
Draft
HarunJr wants to merge 1 commit into
Draft
Conversation
The /txs endpoint previously returned raw CBORs as a flat string array.
Wallet SDKs (e.g. Lace) require input addresses to classify transactions
as Sent or Received — without them, all txs appear as Received.
Breaking change: response shape updated from
{ txs: string[] }
to
{ txs: [{ cbor: string, resolvedInputs: [{ txHash, index, address }] }] }
- address_history gains direction + outref columns to track sender vs receiver
- Input addresses resolved at insert time from mempool_ledger before spent UTxOs are cleared — no extra lookups at query time
- ProcessedMempoolDB included in retrieve() so in-flight txs remain visible during block confirmation window
- CORS middleware added so browser-based wallet clients can call node endpoints cross-origin
- CML WASM objects explicitly freed after use to prevent heap leaks under load
- Effect.all concurrency capped at 20 to prevent DB connection pile-ups on large tx histories
- Existing DBs handled via migrate() called in InitDB on startup
HarunJr
force-pushed
the
428-resolve-input-addresses-in-txs
branch
from
April 7, 2026 14:15
73e1464 to
52492d1
Compare
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.
Summary
Closes #428
The
/txsendpoint previously returned raw CBORs as a flat string array. Wallet SDKs like Lace'sMidgardChainHistoryProviderrequire input addresses (HydratedTxIn.address) to classify transactions as Sent or Received — without them, all transactions appear as Received regardless of direction.Breaking Change
Response shape updated from:
{ "txs": ["<cbor_hex>"] }to:
{ "txs": [ { "cbor": "<cbor_hex>", "resolvedInputs": [{ "txHash": "...", "index": 0, "address": "addr_test1..." }] } ] }Changes
address_historygainsdirectionandoutrefcolumns to distinguish senders (input) from receivers (output) per UTxOmempool_ledgerbefore they are cleared no extra lookups needed at query timeProcessedMempoolDBincluded inretrieve()so in-flight transactions remain visible during the block confirmation windowEffect.allconcurrency capped at 20 to prevent DB connection pile-ups on large tx historiesmigrate()called inInitDBon startup no manual intervention neededTest plan
docker compose --profile test run --rm midgard-node-tests)/txs?address=...returnsresolvedInputswith sender address populated for L2 transfersresolvedInputsresolvedInputs: [](no L2 inputs)