I propose to build an alternative Monero node in Rust. Currently there is only one Monero node (monerod) and it's built in C/C++. Nodes are the backbone of the Monero network: they approve new blocks, relay and check the validity of transactions.
Having just one implementation of monerod leaves the network vulnerable to attacks that target just one implementation, having multiple separate implementations would make the network more resilient to these attacks. Rust specifically guarantees memory-safety and thread-safety — enabling you to eliminate many classes of bugs at compile-time.
Having an alternative implementation should also attract new contributors who can help improve Monero.
In 2019 a Microsoft security engineer reported that 70 percent of all security vulnerabilities in Microsoft products were caused by memory safety issues and in 2020 a team at Google also reported that 70 percent of all "severe security bugs" in Google Chromium were caused by memory safety problems. Rust is designed to be memory safe while aiming "to be as efficient as C++", which will allow the Monero network to be resilient to these forms of bugs.
Arti, the rust Tor implementation, recently released 1.0.0 and they have seen many benefits of rebuilding Tor in Rust to summaries them:
- "At every stage, we've encountered way fewer bugs than during comparable C development."
- "Generally speaking, if our Rust code compiles and passes its tests, it is much likelier to be correct than our C code under the same conditions."
- "Development of comparable features has gone way faster, even considering that we're building most things for the second time."
- "Portability has been far easier than C, though sometimes we're forced to deal with differences between operating systems."
- "We've found that Arti has attracted volunteer contributions in greater volume and with less friction than C Tor."
I am boog900, I have been interested in Monero for a while and recently I started contributing to a couple Monero based community projects, I updated the rust monero crate for the recent hardfork and I also spotted and fixed multiple consensus issues.
I have good knowledge of the Monero codebase and I believe I can complete this in the given time.
I will work for 39 weeks at $45/hour 35 hours a week:
45 * 35 * 39 = $61,400
at $145/XMR = 423 XMR
I have decided to move a portion of milestone 1 and 2 to the final milestone to be paid on completion of the whole proposal.
- build the necessary transaction verification functions in Rust
- Ring signatures (MLSAG, CLSAG),
- Amounts (Borromean ring signatures, Bulletproofs(+))
- build random-x rust lib from the work done here
- build database code to sore blockchain data
- build the network functionality to connect and sync with peers
- parity with C/C++ RPC and commands
- database pruning
- anonymity network support (Tor, I2P)