Skip to content

fix(indexes): RocksDB UTXO index could miss some results #493

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

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

jansegre
Copy link
Member

@jansegre jansegre commented Oct 3, 2022

Also included in the fix is a small change in the internal implementation of the RocksDB UTXO index for the internal iterator to only yield entries that match the relevant prefix, instead of having to do the filtering from outside the iterator.

Acceptance criteria

  • the RocksDB implementation of UTXO index must correctly return the UTXO when the target amount is smaller than the smallest UTXO and it is the only UTXO for that address

@jansegre jansegre self-assigned this Oct 3, 2022
@jansegre jansegre force-pushed the fix/utxo-index-tweaks branch from 09fb09a to 2ed6f91 Compare October 3, 2022 22:09
@jansegre jansegre changed the title fix(indexes): minor bugs on UTXO index fix(indexes): RocksDB UTXO index could miss some results Oct 6, 2022
@jansegre jansegre marked this pull request as ready for review October 6, 2022 01:51
@jansegre jansegre requested a review from msbrogli as a code owner October 6, 2022 01:51
@jansegre jansegre force-pushed the fix/utxo-index-tweaks branch from 2ed6f91 to 6246632 Compare October 6, 2022 01:51
@codecov
Copy link

codecov bot commented Oct 6, 2022

Codecov Report

Merging #493 (e9d3cd5) into dev (38d4e3e) will increase coverage by 0.00%.
The diff coverage is 89.65%.

@@           Coverage Diff           @@
##              dev     #493   +/-   ##
=======================================
  Coverage   83.50%   83.51%           
=======================================
  Files         179      179           
  Lines       16330    16344   +14     
  Branches     2505     2502    -3     
=======================================
+ Hits        13636    13649   +13     
- Misses       2242     2244    +2     
+ Partials      452      451    -1     
Impacted Files Coverage Δ
hathor/indexes/rocksdb_utxo_index.py 89.15% <89.65%> (+2.28%) ⬆️
hathor/p2p/manager.py 66.88% <0.00%> (-1.34%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jansegre jansegre force-pushed the fix/utxo-index-tweaks branch from 6246632 to c95d9af Compare October 6, 2022 21:00
@jansegre jansegre force-pushed the fix/utxo-index-tweaks branch from c95d9af to e9d3cd5 Compare October 6, 2022 22:55
@jansegre jansegre merged commit 3af02c4 into dev Oct 7, 2022
@jansegre jansegre deleted the fix/utxo-index-tweaks branch October 7, 2022 13:09
@jansegre jansegre mentioned this pull request Oct 11, 2022
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.

3 participants