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

feat: info endpoint in evm prover #140

Merged
merged 21 commits into from
Feb 11, 2025
Merged

feat: info endpoint in evm prover #140

merged 21 commits into from
Feb 11, 2025

Conversation

ninabarbakadze
Copy link
Member

@ninabarbakadze ninabarbakadze commented Feb 6, 2025

Overview

Fixes #141
Fixes #79

@ninabarbakadze ninabarbakadze changed the title Nina/evm prover info feat: info endpoint in evm prover Feb 6, 2025
if err != nil {
return nil, nil, fmt.Errorf("failed to decode verifier key %w", err)
}
// Q: Do we still need the fixed size of 32 bytes considering the verifier key is of type []byte?
Copy link
Member Author

Choose a reason for hiding this comment

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

@rootulp you'd probably know

Copy link
Collaborator

Choose a reason for hiding this comment

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

If this code can pass a []byte to groth16.NewClientState then no need to copy the byte slice into a fixed 32 byte array. In other words, let's do what makes Go compiler happy.

If we need to modify types exposed by the groth16 library then I'm fine with both []byte or [32]byte for the verifier key. [32]byte` verifier key is more explicit and probably a better practice but not blocking on it if we're not already changing the type.

@ninabarbakadze ninabarbakadze marked this pull request as ready for review February 7, 2025 20:15
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

LGTM :) thanks

.env.example Show resolved Hide resolved
use sp1_sdk::{include_elf, ProverClient, SP1ProvingKey};

// The ELF file for the Succinct RISC-V zkVM.
const BLEVM_ELF: &[u8] = include_elf!("blevm-mock");
Copy link
Collaborator

Choose a reason for hiding this comment

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

[no change needed] I'm surprised this works b/c blevm-mock is defined in a different directory

Copy link
Member Author

Choose a reason for hiding this comment

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

it works because i compiled it in the build.rs

if err != nil {
return nil, nil, fmt.Errorf("failed to decode verifier key %w", err)
}
// Q: Do we still need the fixed size of 32 bytes considering the verifier key is of type []byte?
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this code can pass a []byte to groth16.NewClientState then no need to copy the byte slice into a fixed 32 byte array. In other words, let's do what makes Go compiler happy.

If we need to modify types exposed by the groth16 library then I'm fine with both []byte or [32]byte for the verifier key. [32]byte` verifier key is more explicit and probably a better practice but not blocking on it if we're not already changing the type.

@ninabarbakadze ninabarbakadze merged commit 0070f43 into main Feb 11, 2025
8 checks passed
@ninabarbakadze ninabarbakadze deleted the nina/evm-prover-info branch February 11, 2025 13:58
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.

Expose the Info endpoint in EVM prover groth16 client on SimApp is created without keys
3 participants