-
Notifications
You must be signed in to change notification settings - Fork 39
fix: update finalized epoch struct in production, not only in sp1 script #268
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
WalkthroughThis pull request introduces a new type alias Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Prover
participant CPUProver
Caller->>Prover: Request prove_with_base_prover(epoch, batch)
Prover->>Prover: Generate base proof
Prover->>Prover: Generate compressed proof
Prover->>CPUProver: Acquire read lock for proof verification
Prover->>Caller: Return (base proof, compressed proof, CPUProver, verifying key)
sequenceDiagram
participant Caller
participant Prover
participant CPUProver
Caller->>Prover: Request prove_with_recursive_prover(epoch, batch)
Prover->>Prover: Generate recursive proof
Prover->>Prover: Generate compressed proof (with previous epoch check)
Prover->>CPUProver: Acquire read lock for proof verification
Prover->>Caller: Return (recursive proof, compressed proof, CPUProver, verifying key)
Possibly related PRs
Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
crates/da/src/lib.rs
(3 hunks)crates/node_types/prover/src/prover/mod.rs
(6 hunks)
🧰 Additional context used
🪛 GitHub Check: clippy
crates/node_types/prover/src/prover/mod.rs
[failure] 479-479:
unused variable: batch
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: unused dependencies
- GitHub Check: unit-test
- GitHub Check: integration-test
- GitHub Check: build-and-push-image
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
crates/da/src/lib.rs (3)
29-33
: LGTM: Well-structured type alias for CompressedProofThe addition of the
CompressedProof
type alias with conditional compilation based on target architecture follows the established pattern used forGroth16Proof
, providing good consistency in the codebase.
42-42
: LGTM: Added compressed_proof field to FinalizedEpoch structThe new field properly extends the
FinalizedEpoch
struct to store compressed proofs, which aligns with the PR objective of updating the struct in production.
61-61
: LGTM: Updated verify_signature method to handle compressed_proofThe
verify_signature
method now correctly clones thecompressed_proof
field when creating an epoch without a signature, maintaining the integrity of the verification process.crates/node_types/prover/src/prover/mod.rs (2)
447-474
: LGTM: Base prover now generates both standard and compressed proofsThe method signature has been updated to include the compressed proof in the return type, and the implementation now properly generates and logs both proof types.
534-560
: LGTM: prove_epoch correctly updated to handle compressed proofsThe method now properly destructures the tuple to retrieve both the standard and compressed proofs, and correctly includes the compressed proof in the
FinalizedEpoch
struct.
Summary by CodeRabbit