-
Notifications
You must be signed in to change notification settings - Fork 481
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
Refactor the wallet server/hub database use only leveldb (drop sqlite) and safely handle reorgs #3205
Conversation
e0cd165
to
d64cf54
Compare
d64cf54
to
4e46010
Compare
4e46010
to
f62e057
Compare
f62e057
to
130d071
Compare
d8f4404
to
a0c8201
Compare
9bf81e5
to
1d3f929
Compare
aef956d
to
890caa5
Compare
Hi, I'm looking into the code of the SDK in a general way, and noticed some compilation issues with I noticed that currently I'm not sure how I tested by not installing |
@jackrobison about my previous comment; I'm wondering if there is a particular reason to use plyvel 1.0.5. The errors that I mentioned don't occur if we just set |
@belikor updated plyvel to 1.3.0 |
1f90a85
to
de737af
Compare
-access db through HubDB class, don't use plyvel.DB directly -add channel count and support amount prefixes
88ff64c
to
8167af9
Compare
2ebe73b
to
0939589
Compare
330679a
to
e03f01e
Compare
f9ecabc
to
09af182
Compare
…est_transactions into their own runner -move test_resolve_command to its own runner
17b668e
to
d64a5bc
Compare
fixes #3143, #3142
Handling reorgs in sqlite is very difficult and would require completely refactoring the table structure to properly unwind blocks and unwind the changes to urls. As a result, the sqlite wallet server will have inconsistent results that get worse as reorgs occur.
To fix this, this PR implements the claimtrie in a key/value database (currently leveldb) such that each operation can be unwound.
Refactoring:
History
class used for address histories, integrate it in to theLevelDB
database class.maintain in memory reverse mapping of txids to tx numbers (to save on i/o)New interfaces: