-
Notifications
You must be signed in to change notification settings - Fork 340
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(sdk): network-v2 #1607
feat(sdk): network-v2 #1607
Conversation
SP1 Performance Test Results Branch: mattstam/network-v2
|
} | ||
|
||
/// Create a new network client with the given private key. | ||
pub fn new(private_key: &str) -> Self { |
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.
this should be the first fn in the impl
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.
fixed
crates/sdk/src/network-v2/client.rs
Outdated
/// Gets the latest nonce for this account's address. | ||
pub async fn get_nonce(&self) -> Result<u64> { | ||
let mut rpc = self.get_rpc().await?; | ||
|
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.
nit: remove space?
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.
fixed
crates/sdk/src/network-v2/client.rs
Outdated
let proof = match status { | ||
ProofStatus::Fulfilled => { | ||
log::info!("Proof request fulfilled"); | ||
let proof_uri = res.proof_uri.as_ref().expect("no proof url"); |
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.
don't use expect in fn that has Result, return err
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.
fixed
crates/sdk/src/network-v2/client.rs
Outdated
let request_body = RequestProofRequestBody { | ||
nonce, | ||
// version: version.to_string(), | ||
version: "sp1-v3.0.0-rc1".to_string(), |
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.
can this be format!("sp1-{}", SP1_VERSION) which is in lib.rs for core/machine
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.
fixed
Adds a new feature to the sdk,
network-v2
, then when on will route requests to the new network RPC.