Guest
Lvl 0

0 / 0
EatShh
(Lvl 4)
to
Posted
4
Bulletproof tests are too naive

I'd like to pay attention to core developers and the community that tests covered bulletproof implementation of Monero core are too naive.

First, root functionality of hiding amounts should be trusted. Second, tests give a source of truth and allow the implementation of the Monero core in different languages.

Example of current test: https://github.com/monero-project/monero/blob/v0.17.1.9/tests/unit\_tests/bulletproofs.cpp#L54-L61

So, the code below will pass the test.

bulletproof_PROVE() { return 'blahblah'; }
bulletproof_VERIFY() { return true; }

It would be useful also to have fixtures to test on. Like it is in original cryptonote part.

---

Background: I'm working on JS implementation of Monero core functionality https://github.com/CoinSpace/monerolib

The goal of the project: Light wallet without 12+Mb of WASM to be able send Monero transactions even from a coffee machine.

Original cryptonote part of the code is covered by huge amount of excellent tests: https://github.com/CoinSpace/monerolib/blob/master/test/crypto-util.js Actually that tests helps to catch the bug in elliptic library implementation https://github.com/indutny/elliptic/issues/250

But I've got stuck on bulletproof implementation due to lack of source of truth: is code correct or not.

Some useful links:

       
Post a reply.
16

Have you tried opening an issue on github or #monero-dev on IRC? Might be better channels for these discussions.

0

Nice catch! Low-quality tests is a sure-fire way to codebase regression, rot and production bugs.

Stats
Post Views: 28
Comments: 2

Upvotes: 4
Downvotes: 0

Decay Rate: 1
Current Score: 0
Top Score: 4
Top Post Tips
Top Comment Tips