scroll-tech / scroll-tech/ceno
Not able to change stack size in `cargo bench`.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 153
- Forks
- 43
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 4
Description
Consider the deeply nested expressions that might be used in precompiled circuits, we should adjust the stack size. For example, I adjust it to 32M when running weierstrass addition in the rust code. However, I haven't find a good way to adjust the stack size in benches/. I tried:
RUST_MIN_STACK=... cargo bench -p ceno_zkvm --bench weierstrass_addRUSTFLAGS="-C link-args=-Wl,-z,stack-size=33554432" cargo bench --bench weierstrass_add
Neither of them works.
Now I temporarily remove criterion_main! and use a self-defined main function to resolve the issue, while waiting for a better way to do it.
For more details, see the following:
#1072
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the benches/weierstrass_add entry point and the linked issue #1072, then compare the temporary custom main with criterion_main!. Determine how the benchmark can configure the required stack size without removing criterion_main!. Done means cargo bench -p ceno_zkvm --bench weierstrass_add handles the deeply nested case reliably.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100