* fix: Use `target_pointer_size` conditional compilation
There are some parts of the code where is needed to de/serialze
`usize`s. These, have sizes that vary depending on the target
achitecture the code is compiled for.
Hence, this adapts the de/serialization to the specific pointer size for
which the crate is being compiled to.
* change: Support WASM-compatibility and polish Cargo.toml
In order to support Wasm-compat and to simplify and improve `Cargo.toml`
readability, the follwing changes have been made:
- All the deps that can use `parallel` feature, do so. As `rayon`
supports non-threaded targets with a fallback option. See: https://docs.rs/rayon-core/1.12.1/rayon_core/index.html#global-fallback-when-threading-is-unsupported
- `ark-grumpking` has been brought to `0.5.0-alpha.0` as `0.4.0` appears
to not be in `crates.io` anymore. See: https://crates.io/crates/ark-grumpkin/versions
- By default, the crate uses `"ark-circom/default"` which selects the
`wasmer/sys` feature such that it knows where wasmer is
suposed to be run`.
- Added a `wasm` feature which forces `ark-circom/wasm` to be used
instead. Which internally selects the `wasmer/js` backend to be used
such that in-browser execution is possible.
- Added `getrandom` with `js` feature as dependency when `wasm32-unknown-unknown` target is selected such
that compilation of the crate for testing or simply building is possible. Notice that with `wasi` and other wasm targets,
this is not the case as they're automatically supported.
For more info, please check: https://docs.rs/getrandom/latest/getrandom/#webassembly-support
* feat: Support WASM-compatibility tests in CI
Add support for both testing the build of `sonobe/folding-schemes` for
WASM-targets and also, it's build as a dependency for a WASM-crate.
This includes a build job for the three main supported rust-WASM targets
and the same but for a thrid crate creted on-the-fly which uses
`sonobe/folding-schemes` as a dependency.
* chore: Add README docs about WASM-compat & feats
* ci: don't run WASM-compat job if PR is draft
* chore: depend on `arnaucube/circom-compat` fork.
Since https://github.com/arnaucube/circom-compat/pull/2 was merged, we
can already switch to it as we were depending before.
* chore: minimal build/test instructions
* fix: CI typos
* fix: Update CI to use correct feature sets
* fix: `ark-grumpkin` versioning issues
As mentioned in
https://github.com/privacy-scaling-explorations/sonobe/issues/146
there's a big issue that involves some dependencies of the crate.
As a temporary fix, this forces the workspace to rely on a
"non-existing" version of `ark-grumpkin` which is immediately patched at
workspace-level for a custom version that @arnaucube owns with some
cherry-picked commits.
While this allows the CI to pass and crate to build, a better solution
is needed.
* fix: Clippy CI avoiding --all-targets
* fix: use `wasm` feat only with folding-schemes
- Adds the logic to support multi-instances folding in HyperNova's
AugmentedFCircuit & IVC.
- Adds also methods to generate new LCCCS & CCCS instances that don't
depend on the main folding chain, to be folded in in the next step
- Updates CycleFold circuit & methods to work other folding schemes than
Nova, adapting it to fold multiple points per circuit (instead of
2-to-1 as till now)
- Handle multi-instances folding in the FoldingScheme trait
interface, which expects 'None' in Nova, and 'Some' in HyperNova &
other multi-folding schemes.
* feat: add noname as a frontend to sonobe
fix: remove extra `rng` usage
Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>
* Update README.md
Co-authored-by: arnaucube <root@arnaucube.com>
* chore: move ark-noname to dev dependencies in solidity-verifiers cargo
---------
Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>
Co-authored-by: arnaucube <root@arnaucube.com>
* Initialize the README.md with a sketch of the structure
* add warning and draft diagram
* add authors & years to schemes, add a pre-sketch of the 'development' section
* Readme: add link to Carlos talk on folding schemes
* readme: sketch sections: offchain & onchain decider, add todo for references
* readme: add example of FCircuit & folding
* Readme: add lib pipeline diagram, add decider code example
* add cyclefold-nova-diagram.png, decider-onchain-flow-diagram.png
* polish cli descriptions
* small update in the Warning box
* add sonobe naming
* add folding-main-idea-diagram.png
* missing sonobe renaming
* migrate part of the README.md to sonobe-docs
* rm imgs/, load them from sonobe-docs
* tiny update
* chore: start update README
* add acknolwedgments links and text, small polishing of the overall text
* extend folding introduction & sonobe overview
* img text alignment
* chore: update readme
* chore: typos, bits of reformulation, centering images
* chore: remove btc example since can not be used as is
* rm .vscode dir
* readme: merge the duplicated sections into a single one adapting the texts
* add Docs badge with link, update acknowledgments
* add ci & license badges
* fix cli link, add solc mention in solidity-verifiers/readme
* small polishing
* fix img alignment
* rm badges, the reasoning is:
- The License badge is not needed since there are already many links to
the license both in the readme and in the GitHub UI
- The CI checks badge, already appears in the GitHub UI in the last
commit preview at the main repo page. Furthermore, after some months
of inactivity, the badge would be 'gray' as 'inactive'.
- The only badge that I was trying to get there is the 'docs' badge, to
make it very clear that the docs page exists, but it was a bit to hard
visually to have a single badge there, and furthermore the docs link
already appears in the readme twice, and also in the GitHub UI
right-panel.
---------
Co-authored-by: dmpierre <pdaixmoreux@gmail.com>