Skip to content

Commit

Permalink
feat: Forward ports (#182)
Browse files Browse the repository at this point in the history
* feat(cli): allow template version and fix CI (#1012)

* chore: cleanup zkvm/lib

* hm

* clenaup zkvm

* ignore

* fix: use correct value for blowup

* fix: verifier dos

* better build

* get docker url

* feat(cli): build --docker accepts an optional image tag (#1022)

* hm

* hm

* cycle limit

* add memory error

* hm

* hm

* chore(contracts): remove mock verifier and interface autogen (#1045)

* feat(cli): use GH token during installation to avoid rate limiting (#1031)

* fix: improve resiliency to recursion depth

* fix: Fix `SphinxVerifier.sol` export

* chore: simplify clippy allows

* refactor: Refactor MultiChip & dependents to use 'Sync' trait

- Replaced `Field` trait with `Sync` in various modules for the `Poseidon2WideChip` implementation and friends, thereby updating associated dependencies.
- In the `fri_fold` module, updated functions and methods to support the new interface and constraints with revised struct and replaced `Field` trait with `Sync`,

* chore: Update package names and enhance macOS compatibility

- Renamed package from `sp1-recursion-gnark-cli` to `sphinx-recursion-gnark-cli`
- Updated dependency from `sp1-recursion-gnark-ffi` to `sphinx-recursion-gnark-ffi`
- Included macOS-specific linking for CoreFoundation and Security frameworks in gnark-ffi package

* fix: Enhance error handling across gnark-ffi package

- Enhanced error handling across three critical go files in recursion/gnark-ffi, ensuring each function returns an error along with its intended output if any error occurs.
- Improved `randomPolynomial` function to return an error along with the polynomial and added necessary error checks.
- Improved safety by adding error handling for `SetString` and `SetRandom` operations, the program will now terminate in case of any error.
- Added error handling for critical function calls, such as `os.MkdirAll` and `vk.ExportSolidity` in build.go.
- Strengthened guard against unexpected panic conditions in `prove.go` by enabling error handling for `ReadFrom` methods for the R1CS, proving key, and verifier key.

* ci: Refine workflow and prepare for future testing

- Added a step in the GitHub workflow to install the `sphinx-recursion-gnark-cli` for integration testing.
- Prepared for future testing capabilities by adding a note for `test-plonk-bn254`, pending CLI readiness.

* build: Enhance cross-platform compatibility for Go build command

- Introduced cross-platform support for the Go build command in the gnark-ffi's build.rs script.
- Enhanced detection of the current operating system to set the appropriate GOOS environment variable.

* refactor: Refactor MultiChip methods with generic type parameters

- Replaced static type `F` with generic type parameter `T` across multiple methods in `MultiChip` struct,
- this should lead to better compatibility with upstream.

* chore: repair test_permutation_challenges

* chore: recompile tests and examples

---------

Co-authored-by: Matt Stam <[email protected]>
Co-authored-by: John Guibas <[email protected]>
Co-authored-by: Zach Langley <[email protected]>
Co-authored-by: wwared <[email protected]>
  • Loading branch information
5 people authored Oct 4, 2024
1 parent 75d6e85 commit b392e25
Show file tree
Hide file tree
Showing 210 changed files with 10,282 additions and 14,575 deletions.
4 changes: 2 additions & 2 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ limited = { max-threads = 4 }
very-limited = { max-threads = 1 }

[[profile.ci.overrides]]
filter = '(test(syscall::precompiles) | test(stark::machine) | test(test_verifier_export) | package(sphinx-recursion-program) | package(sphinx-recursion-circuit))'
filter = '(test(syscall::precompiles) | test(stark::machine) | package(sphinx-recursion-program) | package(sphinx-recursion-circuit))'
test-group = 'limited'

[[profile.ci.overrides]]
filter = '(test(test_e2e))'
filter = '(test(test_e2e) | test(test_verifier_export))'
slow-timeout = { period = "1500s", terminate-after = 4 }
test-group = 'very-limited'
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ jobs:
perf: false
- name: Install deps
run: sudo apt update && sudo apt install cmake -y
- name: Install `sphinx-recursion-gnark-cli` CLI
run: |
cargo install --locked --force --path .
working-directory: ${{ github.workspace }}/recursion/gnark-cli
# TODO: run test-plonk-bn254 once the CLI is ready,
# which relies on an updated witness/constraints.json in the PR
- name: Install `cargo prove` CLI
run: |
cargo install --locked --force --path ./cli
Expand Down
150 changes: 120 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ serde_with = "3.9.0"
serial_test = "3.1.1"
sha2 = "0.10.8"
size = "0.4.1"
stacker = "0.1.0"
strum = "0.26.3"
strum_macros = "0.26.4"
syn = "1.0"
Expand Down Expand Up @@ -133,6 +134,7 @@ alloy-primitives = "0.7.7"
alloy-sol-types = "0.7.7"
downloader = { version = "0.2", default-features = false }
ethers = { version = "2", default-features = false }
sysinfo = "0.31.2"

[profile.dev-ci]
inherits = "dev"
Expand Down
Loading

0 comments on commit b392e25

Please sign in to comment.