-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add transparent address gap limit handling & general address rotation functionality. #1673
base: main
Are you sure you want to change the base?
Add transparent address gap limit handling & general address rotation functionality. #1673
Conversation
62c1394
to
bd2df86
Compare
bd2df86
to
4b99663
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1673 +/- ##
==========================================
- Coverage 54.17% 54.15% -0.03%
==========================================
Files 176 179 +3
Lines 20469 21175 +706
==========================================
+ Hits 11089 11467 +378
- Misses 9380 9708 +328 ☔ View full report in Codecov by Sentry. |
1386dd1
to
49230de
Compare
…handling-prep Preparatory refactoring for #1673
b39c6c3
to
3ac0396
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK eca51d6
eca51d6
to
813dd24
Compare
force-pushed to fix conflicts with |
Marked as draft at 813dd24 since we intend to make crate releases prior to the merge of this PR. |
813dd24
to
709b9be
Compare
force-pushed to rebase on |
This is a large change that unifies the handling of ephemeral transparent addresses for ZIP 320 support with generalized "gap limit" handling for transparent wallet recovery. The best way to understand this commit is to start from the `transparent_gap_limit_handling` database migration that drives the change in behavior.
Co-authored-by: Jack Grigg <[email protected]>
…resses. The rationale behind this change is that current implementations of UTXO retrieval do not attempt to avoid revealing that multiple addresses belong to the same wallet when using a light wallet server to check for transparent UTXOs. A comprehensive solution to this problem requires changes to the light wallet protocol such that wallets no longer need to submit batches of addresses to the light wallet server, and can instead determine whether outputs exist for their addresses locally. By setting the default gap limit to 10 addresses, we make it possible for wallets that add privacy-preserving UTXO checking in the future (either by connecting to full node indexes directly in a privacy-preserving manner or via changes that take advantage of an updated light wallet protocol) to then start generating new addresses within a range of the industry-standard 20 address gap limit that have not yet been revealed to belong to the wallet.
In the presence of gap-limit addresses, querying for UTXOs based exclusively upon the last height at which such a query was executed is inadequate to fully recover the contents of a wallet; when a transaction is discovered in the past, this may advance the gap limit, and newly exposed addresses may receive outputs immediately following the discovered transaction. We can expect that when a transparent output belonging to the wallet is discovered, that the height at which that transaction was mined was checked in a query that included _all_ of addresses having child indices less than or equal to that of the involved address. Therefore, it's safe to start looking for addresses in the gap as of that point.
…ess exposure height.
Also, this removes the default value for the `addresses.key_scope` column, better reflecting the fact that all address insertion code needs to properly set the key scope.
709b9be
to
cac7d28
Compare
force-pushed to rebase on |
8db439f
to
f9fc8bb
Compare
2d61c05
to
89dcdfc
Compare
Logical changes since last reviews (post-rebase-on-main) are here |
No description provided.