Commit Graph

29 Commits

Author SHA1 Message Date
Justin Traglia 9076280cd2
Add compute_kzg_proof to nodejs bindings (#92) 2023-01-27 15:15:17 +00:00
Justin Traglia 03b90ef63f
Use Bytes48 for commitments/proofs (#86)
* Start to use bytes48 type

* Update java bindings

* Update variable names

* Update csharp bindings

* Update node.js bindings

* Update python bindings

* Fix mistake in python bindings

* Add new functions

* Fix nit in java bindings

* Update variable names in java bindings

* Compare to point at infinity

* Update bytes_to_bls_field doc

* Add todo

* Do key validation

* Remove bytes_to_g1

* Fix bug & add remark

* Fix memcmp mistake

* Fix nit in nodejs bindings

* Fix another nit

* Update nodejs parameter names

* Remove to_proof() and to_commitment()

* Fix bug
2023-01-26 14:53:30 +00:00
Justin Traglia 8907fbcfe2
Expose `compute_kzg_proof` (#80)
* Expose computeKzgProof

* Revert changes to bytes_to/from_bls_field

* Update comments

* Revert changes to bytes_from_bls_field

* Revert change to parameter name

* Add compute_kzg_proof to readme

* Refactor in support of asn's PR

* Clean up a little

* Fix param name doc

* Introduce Bytes32 type

* Update bindings

* Replaces bytes with b to match spec
2023-01-24 18:23:42 +00:00
Justin Traglia 69f6155d75
Bytes-only interface (#62)
* Convert argument types to bytes

* Update java bindings

* Update python bindings

* Update node.js bindings

* Update c# bindings

* Fix java binding compile issues

* Fix incorrect memcpy in nodejs bindings

* Fix bug (called the wrong func)

* Fix issues with java bindings

* Fix issues with node.js bindings

* Remove unnecessary wrapped funcs for c#

* Rename struct member to bytes

* Use goto out for callocs

* Fix nit

* Make un-exported funcs static

* Fix python bindings

* Check commitment length in python bindings

* Update python error message

* Steal good ideas from #37

* Fix tests.py which didn't get copied over

* Convert remaining a[] to *a

* Add missing Py_DECREF

* Bytes only rust (#1)

* Make interface bytes only
* Fix benches
* Avoid newtypes for kzg types
* Fix benches again
* Make fields private
* tidy
* Address review comments

* Fix one small thing in rust bindings

* Use ckzg types where possible

* Remove null terminator from domain bytes in rust

* Update rust binding docs

* Use BYTES_PER_* where applicable

* Add extra check for calloc

Co-authored-by: Pawan Dhananjay <pawandhananjay@gmail.com>
2023-01-16 20:05:23 +00:00
George Kadianakis 158977085c
node bindings: Add some missing memory allocation checks (#64)
* node bindings: Add some memory allocation checks

* fixup! node bindings: Add some memory allocation checks
2023-01-13 08:24:25 -08:00
Justin Traglia c72ea8e1dc
Convert Blob type to struct (#61)
* Convert Blob type to struct

* Rename blob.data to blob.bytes
2023-01-12 10:10:23 -08:00
Justin Traglia 57a9666f93 Check ret of blob_to_kzg_commitment in nodejs bindings 2023-01-10 15:52:24 -06:00
dancoffman 4ccc48cbff
Expose verifyKzgProof 2022-12-13 11:21:43 -08:00
Ramana Kumar 68f1d2dd7e
Rename load_trusted_setup to load_trusted_setup_file 2022-12-10 16:07:40 +00:00
dancoffman 23ab03ec6a
Fix uint type for newer g++ 2022-11-22 12:27:32 -08:00
Ramana Kumar bcc138560a
Update interface for verify_kzg_proof 2022-11-19 09:35:55 +00:00
dancoffman 242ba0adf9
Add ability to parse JSON trusted setup to text format expected by C-KZG 2022-11-17 16:41:09 -08:00
dancoffman c9ac623fe7
Turn CPP exceptions back off to see if that fixes the ELF problem 2022-11-16 16:23:06 -08:00
dancoffman 5bf776f52a
Make C++ exceptions catchable in JS-land 2022-11-16 15:26:05 -08:00
dancoffman 0e474e6ec4
Add test harness for building and running NodeJS tests on Linux 2022-11-08 12:47:19 -08:00
dancoffman fa8eebbc0b
free earlier when both subsequent branches will free. Throw appropriately on verify_kzg_proof failure 2022-11-04 14:12:11 -07:00
dancoffman 062e4e0f30
Simplify, given updated API 2022-11-04 11:56:41 -07:00
dancoffman ac65930b15
Use BYTES_PER_FIELD_ELEMENT 2022-11-04 11:44:57 -07:00
dancoffman 0a99015789
Attempt more consistency. Remove test for verifyKzgProof which is not used in 4844 2022-11-03 19:54:45 -07:00
dancoffman 32011119cd
Actually return the result of verify_kzg_proof 2022-11-03 16:54:52 -07:00
dancoffman 4bfce9ad15
Test verifyKzgProof 2022-11-03 16:27:56 -07:00
dancoffman 1514d5b826
computeAggregateKzgProof + verifyAggregateKzgProof test passes 2022-11-03 16:20:33 -07:00
dancoffman b8151db670
Cleanup 2022-11-03 15:13:49 -07:00
dancoffman 672346f017
Closer to working 2022-11-03 14:39:20 -07:00
dancoffman fcd7fbd9e7
Checkpoint 2022-11-03 12:57:59 -07:00
dancoffman dbf2a1d905
Plausibly working BlobToKzgCommitment 2022-11-02 17:17:17 -07:00
dancoffman da8d5dde42
Try to test VerifyKzgProof (does not work) 2022-11-02 15:50:04 -07:00
dancoffman b169d4ab6e
Remove SWIG 2022-11-02 13:27:00 -07:00
dancoffman 40db00f643
Add napi version 2022-11-02 13:21:41 -07:00