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(sdk): network-v2 #1607

Merged
merged 18 commits into from
Oct 8, 2024
Merged

feat(sdk): network-v2 #1607

merged 18 commits into from
Oct 8, 2024

Conversation

mattstam
Copy link
Contributor

@mattstam mattstam commented Oct 5, 2024

Adds a new feature to the sdk, network-v2, then when on will route requests to the new network RPC.

Copy link

github-actions bot commented Oct 5, 2024

SP1 Performance Test Results

Branch: mattstam/network-v2
Commit: 4e567588
Author: mattstam

program cycles execute (mHz) core (kHZ) compress (KHz) time success
fibonacci 11291 0.18 5.79 0.16 1m11s
ssz-withdrawals 2757356 17.43 64.55 17.42 2m38s
tendermint 12593597 6.61 166.93 63.98 3m19s

@mattstam mattstam marked this pull request as ready for review October 7, 2024 20:16
}

/// Create a new network client with the given private key.
pub fn new(private_key: &str) -> Self {
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

/// Gets the latest nonce for this account's address.
pub async fn get_nonce(&self) -> Result<u64> {
let mut rpc = self.get_rpc().await?;

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove space?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

let proof = match status {
ProofStatus::Fulfilled => {
log::info!("Proof request fulfilled");
let proof_uri = res.proof_uri.as_ref().expect("no proof url");
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

let request_body = RequestProofRequestBody {
nonce,
// version: version.to_string(),
version: "sp1-v3.0.0-rc1".to_string(),
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@mattstam mattstam changed the title feat: network v2 feat(sdk): network v2 Oct 8, 2024
@mattstam mattstam changed the title feat(sdk): network v2 feat(sdk): network-v2 Oct 8, 2024
@mattstam mattstam merged commit d706145 into dev Oct 8, 2024
25 checks passed
@mattstam mattstam deleted the mattstam/network-v2 branch October 8, 2024 17:42
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.

2 participants