Commit Graph

416 Commits

Author SHA1 Message Date
Jeremy Felder
18fdd059da Fix: examples path deps (#363)
Change rust example deps to use paths

Co-authored-by: Leon Hibnik <107353745+LeonHibnik@users.noreply.github.com>
2024-02-08 20:43:12 +00:00
yshekel
382bec4ad3 Mixed-radix NTT algorithm
Co-authored-by: hadaringonyama <hadar@ingonyama.com>
2024-02-08 20:43:12 +00:00
Jeremy Felder
d367a8c1e0 Bump for release 2024-02-08 20:43:12 +00:00
Jeremy Felder
3cbdfe7f07 Add concurrency group to examples workflow (#361) 2024-02-08 16:35:48 +02:00
Jeremy Felder
e77173f266 Fix: examples path deps (#363)
Change rust example deps to use paths

Co-authored-by: Leon Hibnik <107353745+LeonHibnik@users.noreply.github.com>
2024-02-08 16:23:44 +02:00
yshekel
3582df2669 Mixed-radix NTT algorithm
Co-authored-by: hadaringonyama <hadar@ingonyama.com>
2024-02-08 13:52:00 +02:00
ImmanuelSegol
04b1b3dda5 refactor: add a basic example 2024-02-07 20:07:21 -04:00
Jeremy Felder
b6dded89cd Release v1.2.0 (#364)
Release v1.2.0:

- [FEAT] Add Poseidon hash as primitive
- [FEAT] Add Merkle tree using poseidon hash
- [BUG] Fix NTT overflow when using large cosets
v1.2.0
2024-02-07 17:01:09 +02:00
Jeremy Felder
5a138367f8 (chore): bump rust crate versions (#362)
bump rust crate versions
2024-02-07 14:49:54 +02:00
ChickenLover
a3fc01d88d Implement Poseidon and TreeBuilder (#352)
* BW scalar field is now the same as BLS base field

* add poseidon

* add merkle tree builder

* poseidon rust bindings

* implement rust bindings

* add doc comments

* remove global poseidon constants

* add custom constants API and script for generating new constants

* add the rest of the curves for poseidon

* add all the curves for real

* misname bls12-377

* typo

* partial rounds

* minor fixes

* small tweak for big performance boost

* add CHK_INIT_IF_RETURN

---------

Co-authored-by: DmytroTym <dmytrotym1@gmail.com>
2024-02-07 14:49:54 +02:00
DmytroTym
d84cab79fd Changed long to int64 2024-02-07 14:49:54 +02:00
DmytroTym
46d7b88f6e Fixed overflow in large coset NTTs 2024-02-07 14:49:54 +02:00
Jeremy Felder
b20ef93c2d Merge branch 'main' into dev 2024-02-07 14:34:59 +02:00
Jeremy Felder
6b1b735576 (chore): bump rust crate versions (#362)
bump rust crate versions
2024-02-07 14:29:21 +02:00
ChickenLover
b2eecd02af Implement Poseidon and TreeBuilder (#352)
* BW scalar field is now the same as BLS base field

* add poseidon

* add merkle tree builder

* poseidon rust bindings

* implement rust bindings

* add doc comments

* remove global poseidon constants

* add custom constants API and script for generating new constants

* add the rest of the curves for poseidon

* add all the curves for real

* misname bls12-377

* typo

* partial rounds

* minor fixes

* small tweak for big performance boost

* add CHK_INIT_IF_RETURN

---------

Co-authored-by: DmytroTym <dmytrotym1@gmail.com>
2024-02-07 00:31:49 +07:00
DmytroTym
b13d993f5d Fixed overflow in large coset NTTs (#358)
If domain has size 2^17, NTT on size 2^16 coset generated by `-1` fails. This happens due to index in `BatchMulKernel` overflowing, fixed by using `long` instead of `int`.
2024-02-05 18:53:26 +02:00
DmytroTym
4f6b4f7dcf Merge branch 'dev' into coset_overflow_fix 2024-02-05 16:44:06 +02:00
Jeremy Felder
19721cfab6 Add missed bump to dev (#359)
Add missed bump to dev
2024-02-05 15:44:37 +02:00
DmytroTym
3c068ae4e7 Changed long to int64 2024-02-05 14:17:00 +02:00
Jeremy Felder
bfd510b3bb Bump for release 2024-02-05 13:33:00 +02:00
DmytroTym
d2b9ec1908 Fixed overflow in large coset NTTs 2024-02-05 13:14:03 +02:00
Jeremy Felder
77a7613aa2 Release v1.1.0 (#357)
Release v1.1.0:
- Updated examples to use the new API
- [c++] Curve specific functions using macros
- [c++] Consolidate MSM and Batch MSM to single function
- [CI] Add codespell in CI
- [FIX] Windows rust build
- [FIX] G2 on rust bindings
- [FIX] Bw6 using bls12377
v1.1.0
2024-01-31 20:30:44 +02:00
Jeremy Felder
5a96f9937d Bump for release 2024-01-31 16:34:14 +02:00
Stas
aaa3808c81 Update examples for new api (#355)
## Describe the changes

Make sure the examples comply with new API
2024-01-31 08:59:21 +02:00
stas
759b7b26d6 Update examples to use latest API 2024-01-31 08:59:21 +02:00
Leon Hibnik
1874ade68a update readme links (#346)
Update README.md
2024-01-24 12:26:38 +02:00
DmytroTym
96fe5bf283 G2 fix and BW6 scalar field on the Rust side (#341)
* BW scalar field is now the same as BLS base field in Rust

* G2 fixed and added into Rust
2024-01-24 11:51:22 +02:00
Jeremy Felder
f0a0bb5974 Fix/windows build failing (#345)
- Make the curve config's omegas_count conditionally accessed when creating fields
- Remove the extern C function that returns a UDT containing non-POD types and replace it with a default_config function on the Rust bindings side
2024-01-23 10:51:16 +02:00
Jeremy Felder
69af0bef91 [FEAT]: Add codespell to CI and pre-commit hooks (#344)
Add codespell to pre-commit hook/CI and fix typos
2024-01-22 14:27:52 +02:00
Stas
45f6db666b c++ msm uses new API (#338)
## Describe the changes

This PR allows c++ MSM example to compile with new API

## Linked Issues

Resolves #
2024-01-18 11:31:30 -05:00
Stas
4c235bf5f5 Merge branch 'dev' into examples-cpp-msm-new-API 2024-01-18 11:29:54 -05:00
stas
a0f35ea8cd comply with reviewer's comments 2024-01-18 11:13:12 -05:00
yshekel
56fcd2e156 refactor: consolidate msm and batch-msm implementations to one function (#342)
refactor: consolidate msm and batch-msm implementations to one function
    - now batch-msm support parallel BM accumulation in addition to large triangle accumulation
2024-01-18 14:20:34 +02:00
Otsar
c1a32a9879 Update README.md (#339)
Added badge
2024-01-11 18:34:32 +02:00
yshekel
67586e01f8 refactor: generate curve-specific function names with macro (#337)
For exposed functions that are curve-specific, the expected symbol is
based on the curve name.
For example MSMCuda becomes bn254MSMCuda for CURVE=bn254.

currently it is implemented via objcopy by redefining symbols after
compilation.

This PR modifies the function names at preprocessing time instead.
For shared objects, objcopy doesn't work (since it cannot modify the
dynsym section).
2024-01-11 15:04:40 +02:00
Yuval Shekel
9823f87fe2 fix: enable ci for dev branch 2024-01-11 13:49:41 +02:00
Yuval Shekel
5fda751e93 refactor: generate curve-specific function names with macro instead of using objcopy to modify the symbols 2024-01-11 10:54:31 +02:00
stas
0c58fe2b83 c++ msm uses new API 2024-01-09 11:06:10 -05:00
Leon Hibnik
b184befc99 Update readme v1.0.0 (#335)
* Update readme v1.0.0

* update

* update example readme
v1.0.0
2024-01-08 23:48:24 +02:00
DmytroTym
91471fbbc6 New API for Version 1.0.0 (#326) 2024-01-08 20:42:16 +02:00
Jeremy Felder
4cc30474d4 Added conditional PIC for compilation 2024-01-08 18:22:50 +02:00
Jeremy Felder
ad932c6b4a Merge branch 'main' into dev 2024-01-08 17:44:03 +02:00
Jeremy Felder
392fff4e8f fix: remove examples directory from clang formatting 2024-01-08 17:40:40 +02:00
DmytroTym
dc3518c0de Smart pointers and documentation (#333)
* Safer smart pointer that covers host and device

* Fixed MSM test

* Scalars and points in MSM are non-mutable in all cases

* change mont API (#332)

* Some Rust doc comments

---------

Co-authored-by: ChickenLover <Romangg81@gmail.com>
2024-01-08 17:35:27 +02:00
Jeremy Felder
79b86e0edf Added examples for rust and c++ 2024-01-08 17:31:46 +02:00
Jeremy Felder
709009a96a Formatting, fixes tests, and general cleanup 2024-01-08 17:31:46 +02:00
Jeremy Felder
b92bc707d1 Fix main build badge to be on push and not pr 2024-01-08 17:28:11 +02:00
Jeremy Felder
a87f2251da Moved ingo_<curve> output to same directory as original library output allowing rust build script to find it when crate is used as a dependency 2024-01-08 17:28:03 +02:00
ImmanuelSegol
31108ee31d Update READMEs and docs (#303)
---------

Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com>
2024-01-08 17:22:36 +02:00
DmytroTym
5f7b36d427 Rust NTT updates (#305)
* NTT and MSM bugs fixed and functionality extended

* More Rust tests, refactored Rust wrappers

* Reworked MSM and NTT public functions on the Rust side

---------

Co-authored-by: ImmanuelSegol <3ditds@gmail.com>
Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com>
Co-authored-by: BigSky77 <simonjudd2@gmail.com>
Co-authored-by: yanziseeker <153156292+AdventureSeeker987@users.noreply.github.com>
Co-authored-by: BigSky <77446076+bigsky77@users.noreply.github.com>
2024-01-08 17:20:39 +02:00