sea-orm integration + rust-lightning persitence layer - #95
Conversation
60ab584 to
8aceb21
Compare
|
@dcorral could you please rebase this PR? |
8aceb21 to
f71fb32
Compare
|
@zoedberg done! |
84b0895 to
b67a1ff
Compare
zoedberg
left a comment
There was a problem hiding this comment.
Thanks! In addition to the requested changes please
- commit the
src/database/entities/prelude.rsfile that gets generated by sea-orm-cli - add the migration cargo lock file to the
.gitignorefile and remove the file - do not make changes to
src/database/entities/mod.rssince its autogenerated by sea-orm-cli - I know you took inspiration from rgb-lib when creating aliases like ChannelPeerActMod, but I saw this is not the best/recommended approach so please drop the aliases (see rgb-multisig-hub to see what is the best way to use the DB utility objects)
- as requested in the rust-lightning PR, please keep only essential comments
P.S this is not a final review, will do another one after these requests have been addressed
8bdceb4 to
a92fa60
Compare
f956780 to
4c7960b
Compare
|
Hi every one, what's the status of this PR? |
|
I agree the changes in this PR are important and would like to understand if this has been paused intentionally. From what I see, the feedback I provided before hasn't been addressed yet, and there are also some merge conflicts. @dcorral please let us know |
|
Yes I needed to postpone the work on this PR, anyway I believe I'll have some time starting next week to address the requested changes and push this work forward. |
4c7960b to
f9b9f02
Compare
f9b9f02 to
2e31b86
Compare
e30737f to
4613b16
Compare
* Add remote external signer logic * Update deps * Fix clippy * Review fixes * Fix review comments * Fix clippy
zoedberg
left a comment
There was a problem hiding this comment.
It seems we are almost done, please rebase this on the updated master tip. If it's ok for you in the next iteration if I find something that needs to be addressed I will do it on top of your commit
4613b16 to
b64cd7f
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #95 +/- ##
==========================================
+ Coverage 87.78% 88.24% +0.46%
==========================================
Files 13 18 +5
Lines 7613 8227 +614
==========================================
+ Hits 6683 7260 +577
- Misses 930 967 +37
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6e98c77 to
f7bb4cf
Compare
f7bb4cf to
a85e97b
Compare
Summary
Replaces file-based persistence with SQLite database using sea-orm ORM.
Changes
New database tables:
mnemonic- encrypted mnemonic storagekv_store- LDK persistence (channel manager, payments, swaps, network graph, scorer)config- configuration key/value pairs (indexer_url, proxy_url, etc.)revoked_token- revoked auth token IDschannel_peer- channel peer pubkey/address mappingMigrated to database:
Architecture:
DatabaseConnectionviaArcSeaOrmKvStoreimplements rust-lightning'sKVStoreSynctraitrust-lightning submodule (
961313c→b061470):KVStoreSynctrait across 8 filesrgb_utils/mod.rs: replaced file I/O (read_rgb_transfer_info,write_rgb_transfer_info,parse_rgb_payment_info,get_rgb_channel_info_path) with KVStore namespace-based read/write operations usingRGB_PRIMARY_NS+ secondary namespaces (channel_info,payment_info_inbound,payment_info_outbound,transfer_info, etc.)ChannelContext,ChannelManager,OutboundPayments,KeysManager: addedrgb_kv_store: Arc<dyn KVStoreSync + Send + Sync>field, threaded through constructors and deserializationcolor_commitment,color_htlc,color_closing: now take&dyn KVStoreSyncinstead of reading files directlyis_channel_rgb,get_rgb_channel_info,rename_rgb_files,filter_first_hops,is_payment_rgb: switched from path-based lookups to KVStore readsIMPORTANT!
This PR depends on RGB-Tools/rust-lightning#17 and .submodule must be updated to point to the right RGB-Tools fork before merging