forked from comit-network/xmr-btc-swap
-
Notifications
You must be signed in to change notification settings - Fork 46
Replace monero-wallet-rpc with monero bindings #114
Copy link
Copy link
Closed
Labels
crate: swapRelated to the "swap" crateRelated to the "swap" crateenhancementNew feature or requestNew feature or requestrefactoringRelated to refactorings. No new features are added.Related to refactorings. No new features are added.
Description
Currently we are dependent on monero-wallet-rpc which causes a few issues:
- We need to spawn a new process for interacting with the wallets. This means we need to manage the process including killing it when we exit which is not always easy (see Kill
monero-wallet-rpcprocess on exit #21) - We cannot spawn child processes on iOS (See here)
- Sometimes we get blocked by antivirus software because spawning another binary is seen as suspicious
- We need to download and verify the
monero-wallet-rpcon startup which introduces complexity
We should replace this with native bindings. I see two ways to do this:
- Use the Rust FFI bindings to
monero_c. @sneurlax is working on in this PR- A proof of concept already works but we need to work sure this works reliably.
- We will be able to safely implement other wallet functionality as this is already implemented in
wallet2.hwhich is the backbone for monero_c
- Use the re-implementation of the monero cryptography and wallet scanner developed by @serai. See here.
- This would be cool as we would be able to use pure Rust but this is not a plug and play solution. We would have to implement mechanism for caching scanned blocks and for efficently downloading blocks.
- This will also make it a lot harder to subsequently integrate wallet functionality into the GUI
I prefer option 1 for now. Once serai's implementation has been audited we can consider switching.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
crate: swapRelated to the "swap" crateRelated to the "swap" crateenhancementNew feature or requestNew feature or requestrefactoringRelated to refactorings. No new features are added.Related to refactorings. No new features are added.