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 impl Hash for Anchor #221

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions taiga_halo2/src/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
}
}

impl Hash for Anchor {
fn hash<H: Hasher>(&self, state: &mut H) {

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:55:54 | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing one of these items | 1 + use borsh::__private::maybestd::io::ErrorKind; | 1 + use std::io::ErrorKind; | help: if you import `ErrorKind`, refer to it directly | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] |

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:55:54 | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing one of these items | 1 + use borsh::__private::maybestd::io::Error; | 1 + use core::error::Error; | 1 + use core::fmt::Error; | 1 + use crate::merkle_tree::serde::__private::doc::Error; | and 18 other candidates help: if you import `Error`, refer to it directly | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] |

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:55:54 | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:55:38 | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshSerialize` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:55:54 | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing one of these items | 1 + use borsh::__private::maybestd::io::ErrorKind; | 1 + use std::io::ErrorKind; | help: if you import `ErrorKind`, refer to it directly | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] |

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:55:54 | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing one of these items | 1 + use borsh::__private::maybestd::io::Error; | 1 + use core::error::Error; | 1 + use core::fmt::Error; | 1 + use crate::merkle_tree::serde::__private::doc::Error; | and 18 other candidates help: if you import `Error`, refer to it directly | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] |

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:55:54 | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing one of these items | 1 + use borsh::__private::maybestd::io; | 1 + use std::io; | help: if you import `io`, refer to it directly | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] |

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:55:38 | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing one of these items | 1 + use borsh::__private::maybestd::io; | 1 + use std::io; | help: if you import `io`, refer to it directly | 55 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] |

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

failed to resolve: could not find `io` in `borsh`

Check failure on line 55 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

failed to resolve: could not find `io` in `borsh`
self.0.to_repr().hash(state);
}
}

#[derive(Clone, Debug, PartialEq, Eq, Copy, Hash, Default)]
#[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
Expand Down Expand Up @@ -81,7 +87,7 @@
} else {
R
}
}

Check failure on line 90 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:90:54 | 90 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 90 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:90:38 | 90 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshSerialize` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 90 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:90:54 | 90 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing one of these items | 1 + use borsh::__private::maybestd::io; | 1 + use std::io; | help: if you import `io`, refer to it directly | 90 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] |

Check failure on line 90 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

failed to resolve: could not find `io` in `borsh`

error[E0433]: failed to resolve: could not find `io` in `borsh` --> taiga_halo2/src/merkle_tree.rs:90:38 | 90 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] | ^^^^^^^^^^^^^^ could not find `io` in `borsh` | = note: this error originates in the derive macro `BorshSerialize` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing one of these items | 1 + use borsh::__private::maybestd::io; | 1 + use std::io; | help: if you import `io`, refer to it directly | 90 | #[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))] |

Check failure on line 90 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

failed to resolve: could not find `io` in `borsh`

Check failure on line 90 in taiga_halo2/src/merkle_tree.rs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

failed to resolve: could not find `io` in `borsh`
}

/// A path from a position in a particular commitment tree to the root of that tree.
Expand Down
Loading