Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP1 - Wasabi Improvement Proposal] Refactoring Internals #2359
In the Meta issue, called "Roadmap? How to replace nopara73?" one of the todo is to "refactor internal data structures of Wasabi Wallet. I have been making numerous moves to facilitate this (#2188, #2352, #2194, #2195, #2350, #2319, #2318, #2317, #2259, #2258, #2226, #2216, #2201, #2198, #2197) but lately I've hit a roadblock, thus I believe a more conscious specification is due. Thus this issue.
High Level Roadmap
On a high level, I am planning to do 2 steps. Step 3 is optional and I expect anyone could easily implement enabled features if they wish/feel the need for them.
Benefits of Step 1.
If we make the mempool and transaction serialization and caching wallet independent, then
These benefits are relatively small compared to the work needed, however it enables Step 2.
Benefits of Step 2.
If the mempool and transaction cache are wallet independent, we can implement loading all the wallets instantly at start.
Step 2 has amazing benefits in itself, but it also enables a host of other interesting features, which I am not planning to implement: this is Step 3.
Step 3 is a host of features that Step 1 and 2 enables:
There are numerous more benefits that I don't have on top of my mind.
Design of Step 1
My initial approach to this issue was to implement Step 1 quickly. I did, but the code wasn't as clean as I wanted to, so I decided to break the PR down. I did break it down and the 10th part of the PR has been merged. Now I'm not in a position anymore to break much more things down (although I may still be able to) so I decided to implement the thing finally. I failed to create clean enough code, so my new approach is to specify the design here and work towards it.
Right now I'm thinking about creating 4 classes:
Cross Process Tx Serialization
Finally I specified the design of
The complexity is needed for cross-process compatibility.
I created some drawings to make that logic better understandable:
I would like to refactor our project management system. Problems : https://miro.com/app/board/o9J_kw6ixFo=/ Roadmap: #2359 Sources: https://github.com/nopara73/ForeverAloneProgramming https://gist.github.com/molnard/a2fa16c5a3d5931b78b79ef336cef73a
Might help you: https://github.com/dgarage/NBXplorer/blob/master/docs/Design.md
There is also a sample design: