Skip to content

Lite wallet#35

Draft
akumaigorodski wants to merge 4 commits into
LayerTwo-Labs:masterfrom
akumaigorodski:master
Draft

Lite wallet#35
akumaigorodski wants to merge 4 commits into
LayerTwo-Labs:masterfrom
akumaigorodski:master

Conversation

@akumaigorodski

@akumaigorodski akumaigorodski commented Jun 15, 2026

Copy link
Copy Markdown

Work in progress with an end goal to have a complete lite wallet protocol support outlined in #28

@akumaigorodski akumaigorodski changed the title Implement Merkle functionality Lite wallet Jun 16, 2026
@akumaigorodski akumaigorodski marked this pull request as draft June 16, 2026 13:50
@akumaigorodski akumaigorodski force-pushed the master branch 2 times, most recently from 95e1d8b to 42637d6 Compare June 16, 2026 13:57
Store UTXO creation height in LMDB so lite wallets can request delta
updates. Add utxos_by_address to serve those wallet queries directly and
speed up existing fn get_utxos_by_addresses (now using LMDB range queries).

Route UTXO put/delete/spend/unspend paths through helpers that keep the
primary outpoint index, address index, and STXO table in sync.
- Add AddressTxidKey keyed as address || txid
- Store filled tx, its Merkle proof, block hash/height, and Unix timestamp
- Update txdb with new confirmed txs when blocks connect to the active chain
- Query txdb by address set and minimum block height
- Prune txdb by Unix timestamp every 144 * 7 blocks (~weekly)
- Prune txdb records for disconnected blocks during reorgs
- Make Merkle proof types serializable

General rationale: lite wallet is UTXO-based so strictly speaking it does not need to know tx history, however, it is still nice to show users actual tx history so they can figure out what was going on. However again, storing full tx history is too demanding for a full node so it is capped.
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.

1 participant