Skip to content

Commit

Permalink
Upgrade fish hash to include audit changes (#4722)
Browse files Browse the repository at this point in the history
  • Loading branch information
danield9tqh authored Feb 13, 2024
1 parent c7d093d commit 5c60cd9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ crate-type = ["cdylib"]

[dependencies]
base64 = "0.13.0"
fish_hash = "0.1.0"
fish_hash = "0.3.0"
ironfish = { path = "../ironfish-rust" }
ironfish_mpc = { path = "../ironfish-mpc" }
napi = { version = "2.13.2", features = ["napi6"] }
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/src/fish_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl FishHashContext {
#[napi(constructor)]
pub fn new(full: bool) -> Self {
Self {
inner: Context::new(full),
inner: Context::new(full, None),
}
}

Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ crypto_box = { version = "0.8", features = ["std"] }
ff = "0.12.0"
group = "0.12.0"
ironfish-frost = { git = "https://github.com/iron-fish/ironfish-frost.git", branch = "main" }
fish_hash = "0.1.0"
fish_hash = "0.3.0"
ironfish_zkp = { version = "0.2.0", path = "../ironfish-zkp" }
jubjub = { git = "https://github.com/iron-fish/jubjub.git", branch = "blstrs" }
lazy_static = "1.4.0"
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust/src/mining/mine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ mod test {
let start = 43;
let step_size = 1;

let context = &mut fish_hash::Context::new(false);
let context = &mut fish_hash::Context::new(false, None);

// Hardcoded target value derived from a randomness of 45, which is lower than 42
// This allows us to test the looping and target comparison a little better
Expand Down
5 changes: 4 additions & 1 deletion ironfish-rust/src/mining/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ impl Thread {
.name(id.to_string())
.spawn(move || {
let mut fish_hash_context = if fish_hash_options.enabled {
Some(fish_hash::Context::new(fish_hash_options.full_context))
Some(fish_hash::Context::new(
fish_hash_options.full_context,
None,
))
} else {
None
};
Expand Down

0 comments on commit 5c60cd9

Please sign in to comment.