* feat: add serde impls to Blob and Bytes48
* remove duplicate serde file
* cargo fmt
* serialize and deserialize with prefix
* cargo fmt
* use different trusted setup based on minimal spec
* add Bytes32 serde impls
* Replace g1 points with g1 lagrange points
* Swap out validate_kzg_g1 with blst funcs
* Update minimal preset too
* Fix java & nodejs bindings
* Put variables in smaller scope
* Update some comments
* Remove FFTSettings (#2)
* Fix issue when expanding roots of unity
* Fix formatting
* Revert back to using intermediate array
* Add missing c_kzg_free
* Fix some nits
* Replace free_kzg_settings with free_trusted_setup
* Add parens to NUM_ELEMENTS
Co-authored-by: George Kadianakis <desnacked@riseup.net>
* Move memcpy to the end
* Revert "Move memcpy to the end"
This reverts commit 5331c7feadc92e4b5dd5d4e7512e4be563d7f386.
* Add comment about free_trusted_setup
* Move check before alloc
* Add remark
* Delete unnecessary blank line
* Fix asn's nits
* Update comment for roots_of_unity in header
Co-authored-by: Gottfried Herold <GottfriedHerold@users.noreply.github.com>
* Fix formatting
* Update comment about max_scale
Co-authored-by: Gottfried Herold <GottfriedHerold@users.noreply.github.com>
---------
Co-authored-by: Suphanat Chunhapanya <haxx.pop@gmail.com>
Co-authored-by: George Kadianakis <desnacked@riseup.net>
Co-authored-by: Gottfried Herold <GottfriedHerold@users.noreply.github.com>
* modify directory structure to isolate the generated bindings
* add a lib.rs file
* move deref impls to the extension file
* remove unused types from generated bindings
* cleanup new lines to reduce diff noise
* reorder definitions to reduce diff noise
* move sync and send impls to the extension file
* generate bindings
* blacklist used bindings; create snapshots dir to ensure freshness in the future
* fix typo. Ty @pawanjay176
* run cargo build after merge
* custom impl for KZGCommitment and KZGProof
* final touches
* Update Compute*KZGProof in rust bindings
* Remove the boxing from the blobs
and implement get_blobs() a bit less promiscuously
* Improve pattern matching style
* Run `cargo fmt`
* Remove a println
* No need to clone commitments
* Allow bad input values in rust tests
* Clean up a little
* Re-enable feature checks & consolidate
* Use more pattern matching
* Consolidate imports
* Split some long lines into shorter ones
* Clean up test loops
* Simplify get_output() for some funcs
* Update rust bindings
* Remove old test vectors
* Add #[must_use] in C_KZG_RET to avoid future missing retval checks
* Replace expect with unwrap
* Fix generate_random_commitment()
* Turn some camels to snakes
* Capitalize some consts
* Improve a bench loop
* Kill a useless extern
---------
Co-authored-by: George Kadianakis <desnacked@riseup.net>
* 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
* Add length check to verify_aggregate_kzg_proof in rust bindings
* Generate incorrect blob later
* Remove leftover parenthesis
* Move result var after check
* working build
* Move bindings.rs to root directory
* tidy build script
* Add initial rust safe bindings
* import fewer c stuff in bindings
* remove unnecessary blst definitions in bindings
* remove bindgen build dependency
* improve interface
* Remove more stuff from bindings
* Add a simple test
* Update error type
* Update verify_kzg_proof interface
* Return array instead of vec
* link with no-pie
* impl Send and Sync for KzgSettings; change mut pointers to const
* Remove no-pie linking
* Make FIELD_ELEMENTS_PER_BLOB a compile time variable
* Add load_trusted_setup method
* Cleanup
* Add failure case to bytes_to_bls_field
* Fix conditional compilation and ensure canonical blobs in test
* Add test vectors
* Remove blobk_commitment test case
* Change function signature
* Copy and delete instead of rename in build script
* Make consts public
* Add error conditions for invalid trusted setup
* Lowercase renamings
* Make blob public
* Add benchmarks
* Run test vectors only for mainnet spec
* Add README
* clippy
* Add rust CI checks
* actually add CI checks
* Fix CI
* Fix workflow again