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

[Feature] Update snarkvm dependencies to 0.6.0 #1071

Closed
damirka opened this issue Jun 28, 2021 · 1 comment
Closed

[Feature] Update snarkvm dependencies to 0.6.0 #1071

damirka opened this issue Jun 28, 2021 · 1 comment
Labels
dependencies Pull requests that update a dependency file, feature A new feature.

Comments

@damirka
Copy link
Contributor

damirka commented Jun 28, 2021

🚀 Feature

Update leo-state to follow updates in 0.6.0 snarkvm packages.

Motivation

CIs for 3 PRs have failed:

See failed CIs:

Logs are:

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error[E0599]: no function or associated item named `read` found for struct `snarkvm_fields::fp_256::Fp256<snarkvm_curves::edwards_bls12::fr::FrParameters>` in the current scope
  --> state/src/local_data_commitment/local_data_commitment.rs:70:93
   |
70 |     let local_data_leaf_randomness = <LocalDataCommitment as CommitmentScheme>::Randomness::read(&leaf_randomness[..])?;
   |                                                                                             ^^^^ function or associated item not found in `snarkvm_fields::fp_256::Fp256<snarkvm_curves::edwards_bls12::fr::FrParameters>`
   |
   = help: items from traits can only be used if the trait is in scope
   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
           `use snarkvm_utilities::bytes::FromBytes;`

error[E0599]: no function or associated item named `read` found for struct `CommitmentMerklePath<PedersenCompressedCommitment<snarkvm_curves::templates::twisted_edwards_extended::GroupProjective<snarkvm_curves::edwards_bls12::parameters::EdwardsParameters>, LocalDataCommitmentWindow>, BoweHopwoodPedersenCompressedCRH<snarkvm_curves::templates::twisted_edwards_extended::GroupProjective<snarkvm_curves::edwards_bls12::parameters::EdwardsParameters>, LocalDataCRHWindow>>` in the current scope
  --> state/src/local_data_commitment/local_data_commitment.rs:78:93
   |
78 |     let local_data_merkle_path = CommitmentMerklePath::<LocalDataCommitment, LocalDataCRH>::read(&path[..])?;
   |                                                                                             ^^^^ function or associated item not found in `CommitmentMerklePath<PedersenCompressedCommitment<snarkvm_curves::templates::twisted_edwards_extended::GroupProjective<snarkvm_curves::edwards_bls12::parameters::EdwardsParameters>, LocalDataCommitmentWindow>, BoweHopwoodPedersenCompressedCRH<snarkvm_curves::templates::twisted_edwards_extended::GroupProjective<snarkvm_curves::edwards_bls12::parameters::EdwardsParameters>, LocalDataCRHWindow>>`
   |
   = help: items from traits can only be used if the trait is in scope
   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
           `use snarkvm_utilities::bytes::FromBytes;`

error[E0599]: no function or associated item named `read` found for struct `snarkvm_fields::fp_256::Fp256<snarkvm_curves::bls12_377::fr::FrParameters>` in the current scope
  --> state/src/local_data_commitment/local_data_commitment.rs:81:69
   |
81 |     let local_data_commitment_root = <LocalDataCRH as CRH>::Output::read(&root[..])?;
   |                                                                     ^^^^ function or associated item not found in `snarkvm_fields::fp_256::Fp256<snarkvm_curves::bls12_377::fr::FrParameters>`
   |
   = help: items from traits can only be used if the trait is in scope
   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
           `use snarkvm_utilities::bytes::FromBytes;`

error[E0277]: the trait bound `AccountAddress<snarkvm_dpc::testnet1::instantiated::Components>: ToBytes` is not satisfied
  --> state/src/record_commitment/record_commitment.rs:39:35
   |
39 |       let record_commitment_input = to_bytes![
   |  ___________________________________^
40 | |         record.owner,
41 | |         record.is_dummy,
42 | |         record.value,
...  |
46 | |         record.serial_number_nonce
47 | |     ]?;
   | |_____^ the trait `ToBytes` is not implemented for `AccountAddress<snarkvm_dpc::testnet1::instantiated::Components>`
   | 
  ::: /home/circleci/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/snarkvm-utilities-0.6.0/src/bytes.rs:25:14
   |
25 |       fn write<W: Write>(&self, writer: W) -> IoResult<()>;
   |                - required by this bound in `snarkvm_utilities::ToBytes::write`
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no function or associated item named `read` found for struct `snarkvm_fields::fp_256::Fp256<snarkvm_curves::bls12_377::fr::FrParameters>` in the current scope
  --> state/src/record_commitment/record_commitment.rs:49:70
   |
49 |     let commitment = <RecordCommitment as CommitmentScheme>::Output::read(&record.commitment[..])?;
   |                                                                      ^^^^ function or associated item not found in `snarkvm_fields::fp_256::Fp256<snarkvm_curves::bls12_377::fr::FrParameters>`
   |
   = help: items from traits can only be used if the trait is in scope
   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
           `use snarkvm_utilities::bytes::FromBytes;`

error[E0599]: no function or associated item named `read` found for struct `snarkvm_fields::fp_256::Fp256<snarkvm_curves::edwards_bls12::fr::FrParameters>` in the current scope
  --> state/src/record_commitment/record_commitment.rs:51:61
   |
51 |         <RecordCommitment as CommitmentScheme>::Randomness::read(&record.commitment_randomness[..])?;
   |                                                             ^^^^ function or associated item not found in `snarkvm_fields::fp_256::Fp256<snarkvm_curves::edwards_bls12::fr::FrParameters>`
   |
   = help: items from traits can only be used if the trait is in scope
   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
           `use snarkvm_utilities::bytes::FromBytes;`

Implementation

Are you willing to open a pull request? (See CONTRIBUTING)

@damirka damirka added feature A new feature. dependencies Pull requests that update a dependency file, labels Jun 28, 2021
@damirka damirka added this to the Leo Developer Preview III milestone Jun 28, 2021
@gluax
Copy link
Contributor

gluax commented Jul 1, 2021

@damirka you made a PR to update these already, so I am closing this.

@gluax gluax closed this as completed Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file, feature A new feature.
Projects
None yet
Development

No branches or pull requests

2 participants