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:

submitted by /u/mahnunchik
[link] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *