Comments (6)
from bulletproofjs.
Hi!
I tried merging @shamatar's JS Bulletproof creation and @solidblu1992's smart contracts since @shamatar's proof verification on-chain does not work as it costs too much gas for some reason and @solidblu1992's does not have a way to create proofs in JavaScript so his implementation cannot be used in a web or mobile apps. Being able to merge both would actually result in an usable implementation of Confidential transactions.
Sadly, it doesn't work on this specific line in BulletproofVerifiy.sol:
v.Y2 = ecMath.MultiExp(bp[0].V, v.vpz, 0, 0);
The code reverts as this requirement fails in ECMath.sol:
require(P.length == 2*s.length);
where bp[0].V = P and v.vpz = s here.
I'm pretty sure that I serialize the parameters correctly following @solidblu1992's guideline. The code to test this can be found on this repo. Checking the file test/bulletproofs.js.
Any ideas? Would be nice to actually have a working prototype instead of just PoCs for Confidential transactions.
from bulletproofjs.
Hello @darioAnongba
I'm working on a draft of serialization format + relayers fee for transaction, I hope that we can start a work of merging tomorrow. Let me finish with a work and I'll get back to you with this problem :)
The main problem we will have to solve is whether using a block hash as a source of random number to save 50% of gas on verification is acceptable and secure.
Sincerely, Alex
from bulletproofjs.
Hi, ok I understand.
Let me know if I can be of any help.
Also concerning the debugging with ganache-cli, going down to 32 bits still reverts. It works with 16 bits costing 4291783 gas. Also, I coulnd't figure out what the N parameter was and what to set as you don't use it to generate or verify proofs on-chain. I kept it at 6.
Cheers,
Dario
from bulletproofjs.
from bulletproofjs.
Oh I see.
So I tested with M = 16, N = 4 and it cost 4171917 gas to verify 4 Pedersen commitments.
from bulletproofjs.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bulletproofjs.