-
m-relay
<anddn:matrix.org> The Tor network is being rewritten in Rust. Should Monero also consider rewriting it in Rust? Because C++ is too cumbersome and not suitable for the long-term development of Monero.🤔
-
sech1
Oh no, not this again 🙄
-
sech1
Rust is a language that's too overhyped for what it can really achieve, plus it suffers from the supply chain plague
redteamnews.com/threat-intelligence…developers-through-malicious-crates
-
sech1
Good choice for Monero? I say no
-
sech1
The C++ official repo will stay there for the foreseeable future and be the main source of the official binaries. But there is Cuprate project, if you're interested
-
m-relay
<kayabanerve:matrix.org> Tor and Monero both have alternative implementations in Rust under development. I don't believe Tor is deprecating their C and Monero definitely isn't.
-
m-relay
<kayabanerve:matrix.org> > We intend that, in the long run, Arti will replace our C tor implementation completely, not only for clients, but also for relays and directory authorities. This will take several more years of work, but we're confident that it's the right direction forward.
-
m-relay
<kayabanerve:matrix.org> >
-
m-relay
<kayabanerve:matrix.org> > (We won't stop support for the C implementation right away; we expect that it will take some time for people to migrate.)
-
m-relay
<kayabanerve:matrix.org> TIL
-
m-relay
<kayabanerve:matrix.org> Monero also is adopting Rust dependencies with FCMP++ and I personally find it incredibly appropriate.
-
m-relay
<kayabanerve:matrix.org> (sech1 is welcome to rewrite FCMP++ in C++ and have Cuprate adopt C++ dependencies though ;) )
-
sech1
I would rather rewrite it in C with some ASM code for max performance
-
sech1
If it comes to rewrite
-
sech1
Also, C is much easier to bring to other languages
-
sech1
How many lines of code is FCMP++ currently?
-
m-relay
<kayabanerve:matrix.org> Rust can expose a C FFI FWIW
-
m-relay
<kayabanerve:matrix.org> 10-20k, not counting deps?
-
m-relay
<kayabanerve:matrix.org> I can check in a few
-
sech1
A full rewrite is an overkill then
-
sech1
but some performance critical parts - why not
-
m-relay
<kayabanerve:matrix.org> Tbh I'd love a second verifier implementation
-
m-relay
<kayabanerve:matrix.org> You also can probably get it much more concise if you remove the prover and strip 'unnecessary' functionality
-
sech1
If if can be rewritten in parts and interconnect with Rust code with C FFI, I can do it gradually
-
sech1
maybe even make a CCS proposal for it
-
sech1
because it will be a lot of work
-
sech1
10-20k lines of code is at least 3-4 weeks of full time work to get an MVP
-
sech1
minimal viable product
-
m-relay
<kayabanerve:matrix.org> I didn't implement the FCMP. I implemented a framework for proofs over Bulletproof, composable parts for such proofs, and then the FCMP on top, as necessary to satisfy review and ensure we could actively develop it.
-
m-relay
<kayabanerve:matrix.org> You can probably cut a lot of that out and bake in the FCMP specifically though.
-
m-relay
<kayabanerve:matrix.org> It won't be explanatory and may be hell to audit, but it doesn't have to be audited to be correct. Solely corresponding.
-
m-relay
<kayabanerve:matrix.org>
monero-oxide/monero-oxide #29 14k lines, excluding deps, a month ago
-
sech1
Second implementation can be really helpful to find new issues - P2Pool got a lot bug reports and some vulnerabilities fixed when DataHoarder was writing the P2Pool Observer
-
m-relay
<kayabanerve:matrix.org> The external deps are likely just blake2, ed25519 if you want to be minimal however.
-
sech1
blake2 and ed25519 already have good C implementations, perfect
-
DataHoarder
A key part of that was also running the same tests but with different code too (found shuffle stuff) or easier time fuzzing
-
DataHoarder
Not be a 1:1 implementation but try to make it specific to the language, then test very well the consensus parts
-
DataHoarder
-
DataHoarder
This fixes a long term bug where signing messages from Monero GUI watch-only wallet produces a signed message ... signed from the spend key, using the valid spend pub, but using the "zero" private key
-
DataHoarder
(also allows view key signatures to happen on watch-only mode when specified)
-
DataHoarder
on the main address, at least
-
DataHoarder
sign 0,0 --view proof.txt
-
DataHoarder
Error: wallet is watch-only and cannot sign
-
DataHoarder
^ this would work
-
DataHoarder
to repro the issue on Monero GUI do this, on a watch-only wallet: Go Advanced->Sign/verify, Sign Message (sign anything here), ... scroll below and verify it again :)
-
DataHoarder
I had the specific detection from two years ago more or less where checking a signature against spend/view pub commitment, but the signature was generated using the zero private key
git.gammaspectra.live/P2Pool/consen…/monero/address/crypto.go#L151-L154
-
selsta
.merge+ 10115 10114 10113 10112 10110 10104 10103 10098 10097 9939 9901
-
xmr-pr
Added