Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batch proof use less memory #1742

Merged
merged 6 commits into from
Jan 24, 2025
Merged

Conversation

eyusufatik
Copy link
Member

Description

batch proof on testnet would run out of memory. so we have to do a fix.

that fix is this PR.

  1. Read input as it is needed.
  2. Use heap allocator feature of risc0 zk vm. (if not it uses bump allocator with no deallocation, we'd still get out of memory errors even with read-as-needed input)

@auto-assign auto-assign bot requested a review from kpp January 23, 2025 18:15
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 53.62319% with 64 lines in your changes missing coverage. Please review.

Project coverage is 77.1%. Comparing base (ab43fab) to head (7f6427b).
Report is 1 commits behind head on nightly.

Files with missing lines Patch % Lines
...module-system/sov-modules-stf-blueprint/src/lib.rs 0.0% 52 Missing ⚠️
crates/citrea-stf/src/verifier.rs 0.0% 5 Missing ⚠️
crates/bitcoin-da/src/helpers/parsers.rs 71.4% 2 Missing ⚠️
crates/prover-services/src/parallel/mod.rs 71.4% 2 Missing ⚠️
...reign-sdk/full-node/sov-stf-runner/src/mock/mod.rs 0.0% 2 Missing ⚠️
crates/risc0/src/host.rs 92.3% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
crates/batch-prover/src/proving.rs 82.6% <100.0%> (+<0.1%) ⬆️
crates/bitcoin-da/src/helpers/builders/mod.rs 97.9% <100.0%> (+<0.1%) ⬆️
crates/bitcoin-da/src/helpers/mod.rs 88.2% <ø> (-0.7%) ⬇️
crates/light-client-prover/src/da_block_handler.rs 0.0% <ø> (ø)
crates/sovereign-sdk/adapters/mock-zkvm/src/lib.rs 57.6% <100.0%> (+0.2%) ⬆️
...full-node/sov-stf-runner/src/prover_service/mod.rs 66.6% <ø> (ø)
...eign-sdk/rollup-interface/src/state_machine/stf.rs 8.8% <ø> (ø)
...n-sdk/rollup-interface/src/state_machine/zk/mod.rs 49.1% <100.0%> (+29.4%) ⬆️
crates/risc0/src/host.rs 48.0% <92.3%> (+1.8%) ⬆️
crates/bitcoin-da/src/helpers/parsers.rs 90.0% <71.4%> (-0.5%) ⬇️
... and 4 more

... and 5 files with indirect coverage changes

Copy link
Contributor

@kpp kpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

eyusufatik and others added 2 commits January 24, 2025 18:26
@eyusufatik eyusufatik merged commit 556c322 into nightly Jan 24, 2025
14 of 15 checks passed
@eyusufatik eyusufatik deleted the esad/batch-proof-use-less-memory branch January 24, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants