dsrvlabs / czg-keremony

JavaScript-based client to participate in Ethereum KZG Ceremony
https://dsrv.com
MIT License
13 stars 4 forks source link

Add generate randomness #9

Closed kim201212 closed 1 year ago

kim201212 commented 1 year ago

close #15

rootwarp commented 1 year ago

In my env. error occurs.

rootwarp@LT-026 ~/g/d/dsrv-kzg-ceremony random > ./index.js ceremony a002479f-782b-48a5-b3b9-fa18c87446f1
Starting ceremony...
Decoding...
Update Power of Tau...
updatePowerOfTau 7177057640311544215210810364117382200091468669765550551577723128495801892862n
/Users/rootwarp/git/dsrv/dsrv-kzg-ceremony/node_modules/@noble/curves/lib/abstract/weierstrass.js:113
            throw new Error('Expected valid bigint: 0 < bigint < curve.n');
                  ^

Error: Expected valid bigint: 0 < bigint < curve.n
    at assertGE (/Users/rootwarp/git/dsrv/dsrv-kzg-ceremony/node_modules/@noble/curves/lib/abstract/weierstrass.js:113:19)
    at Point.multiply (/Users/rootwarp/git/dsrv/dsrv-kzg-ceremony/node_modules/@noble/curves/lib/abstract/weierstrass.js:404:13)
    at Object.contribute (/Users/rootwarp/git/dsrv/dsrv-kzg-ceremony/contribution/contribution.js:42:46)
    at Command.<anonymous> (/Users/rootwarp/git/dsrv/dsrv-kzg-ceremony/index.js:85:43)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v19.6.0

As I debug the code,

contribute.contribute(contributions, rand) function takes just single value of rand argument, not array type. did you check this?

659f691

kim201212 commented 1 year ago

@rootwarp

https://github.com/dsrvlabs/dsrv-kzg-ceremony/pull/9/commits/494b8d6110769e4d475eae627880dfed1c0ea5b9

I fixed it at the above commit and tested it. 🙏

rootwarp commented 1 year ago

@rootwarp

494b8d6

I fixed it at the above commit and tested it. 🙏

@kim201212 Branch seems conflicted. can you check this?

rootwarp commented 1 year ago

@kim201212 As I remember this code already merged. This should be close.

kim201212 commented 1 year ago

It already merged, Close