Skip to content

Replace monero-wallet-rpc with monero bindings  #114

@binarybaron

Description

@binarybaron

Currently we are dependent on monero-wallet-rpc which causes a few issues:

  1. 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-rpc process on exit #21)
  2. We cannot spawn child processes on iOS (See here)
  3. Sometimes we get blocked by antivirus software because spawning another binary is seen as suspicious
  4. We need to download and verify the monero-wallet-rpc on startup which introduces complexity

We should replace this with native bindings. I see two ways to do this:

  1. 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.h which is the backbone for monero_c
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    crate: swapRelated to the "swap" crateenhancementNew feature or requestrefactoringRelated to refactorings. No new features are added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions