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

Upgrading versions of snarkvm #884

Draft
wants to merge 7 commits into
base: testnet3
Choose a base branch
from

Conversation

Pauan
Copy link
Collaborator

@Pauan Pauan commented May 16, 2024

This upgrades the version of snarkvm to the mainnet-staging branch.

It still uses the testnet, it does not use the mainnet. I will add in mainnet capabilities in a future PR.

Most of the changes are trivial (renaming imports, etc.) but the estimate_execution_fee and estimate_finalize_fee functions required more significant changes, so they should be reviewed more carefully.

Copy link
Collaborator

@iamalwaysuncomfortable iamalwaysuncomfortable left a comment

Choose a reason for hiding this comment

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

Had a few comments, but overall these look good, I'll check on the VerifyingKey issue you flagged

@@ -18,7 +18,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-24
toolchain: nightly-2024-05-14
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this might be able to go to nightly-latest? Opinions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I always lock rustc to a specific version, so that way it's reproducible and consistent for everybody. If it's nightly-latest then it can cause breakage.

Note that the CI matches the version in rust-toolchain.yaml, so that way the CI will match local dev builds.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also note that locking the version when using nightly is standard best practice.

version = "=0.16.12"
version = "0.16.19"
git = "https://github.com/AleoNet/snarkVM.git"
rev = "3ebe60c499285a140ec2171fe8dd06662c325531"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Current Rev is: 140ff26 (I know this changed from under us since this process started)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Absolutely, I will update it before this gets merged.

array.push(&bonded);
array.push(&unbonding);
array.push(&account);
let expected = array![
Copy link
Collaborator

Choose a reason for hiding this comment

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

Much cleaner thank you!

}

/// Returns the verifying key for the bond_public function
///
/// @returns {VerifyingKey} Verifying key for the bond_public function
#[wasm_bindgen(js_name = "isBondPublicVerifier")]
pub fn is_bond_public_verifier(&self) -> bool {
self == &VerifyingKey::from_bytes(&snarkvm_parameters::testnet3::BondPublicVerifier::load_bytes().unwrap())
self == &VerifyingKey::from_bytes(&snarkvm_parameters::testnet::BondPublicVerifier::load_bytes().unwrap())
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a good start, though we'll need to support mainnet soon as well. I'm fine focusing on only testnet for now and adding mainnet support in a future PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I will support mainnet in another PR, that's a much bigger change.

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.

None yet

2 participants