Lite wallet#35
Draft
akumaigorodski wants to merge 4 commits into
Draft
Conversation
95e1d8b to
42637d6
Compare
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.
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.
Work in progress with an end goal to have a complete lite wallet protocol support outlined in #28