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

Add Docs for Risc0 adapter #641

Closed
wants to merge 4 commits into from
Closed

Conversation

citizen-stig
Copy link
Member

Description

Adds docs to Risc0 adapter

Linked Issues

Testing

No testing

Docs

Added docs

pub struct Risc0Host<'a> {
env: RefCell<ExecutorEnvBuilder<'a>>,
elf: &'a [u8],
}

impl<'a> Risc0Host<'a> {
/// Create a new host fo a given reference to an ELF file
Copy link
Member

Choose a reason for hiding this comment

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

nit: It's not obvious what it means that a host is "for a given reference to an ELF file". Maybe "Create a host to prove the provided ELF file?"

@@ -57,6 +59,7 @@ impl<'prover> Zkvm for Risc0Host<'prover> {
}
}

/// Making verification of Risc0 proofs
Copy link
Member

Choose a reason for hiding this comment

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

nit: This english isn't quite right. Maybe "Verifies Risc0 proofs"?

@@ -9,12 +9,14 @@ use sov_rollup_interface::zk::{Zkvm, ZkvmHost};

use crate::Risc0MethodId;

/// Allows to run prover code and send data to ZkVM
Copy link
Member

Choose a reason for hiding this comment

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

nit: This comment is a little terse. How about...

"The 'host' of a Risc0 zkVM. Generates a SNARK by running the target code on a virtual RISC-V CPU. The host is responsible for sending the "witness" data to the zkVM guest."

Copy link
Member

@neysofu neysofu left a comment

Choose a reason for hiding this comment

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

Just a nitpick: doc comments should always have a period at the end of sentences. It really adds to the perceived quality of the text when looking at docs on docs.rs.

@citizen-stig
Copy link
Member Author

Closed in favour of #934

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.

3 participants