Skip to content

Commit

Permalink
fix(sdk): Asset evidence computation reproducibility fix (#3958)
Browse files Browse the repository at this point in the history
* Use different gzip backend

* Reintroduce `zlib-ng` in build-dependencies
  • Loading branch information
Sawchord authored Oct 22, 2024
1 parent 705c346 commit d65717b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ clap = "4.5"
clap_complete = "4.5"
dialoguer = "0.11.0"
directories-next = "2.0.0"
flate2 = { version = "1.0.11", default-features = false }
flate2 = { version = "1.0.11" }
futures = "0.3.21"
handlebars = "4.3.3"
hex = "0.4.3"
Expand Down
3 changes: 2 additions & 1 deletion src/canisters/frontend/ic-asset/src/evidence/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::error::HashContentError::EncodeContentFailed;
use crate::sync::gather_asset_descriptors;
use ic_utils::Canister;
use sha2::{Digest, Sha256};
use slog::{info, Logger};
use slog::{info, trace, Logger};
use std::collections::{BTreeMap, HashMap};
use std::path::Path;

Expand Down Expand Up @@ -68,6 +68,7 @@ pub async fn compute_evidence(
.await
.map_err(ComputeEvidenceError::AssembleCommitBatchArgumentFailed)?;
operations.sort();
trace!(logger, "{:#?}", operations);

let mut sha = Sha256::new();
for op in operations {
Expand Down
2 changes: 1 addition & 1 deletion src/dfx-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ clap = { workspace = true, features = ["string"] }
dialoguer = { workspace = true }
directories-next.workspace = true
dunce = "1.0"
flate2 = { workspace = true, default-features = false, features = ["zlib-ng"] }
flate2 = { workspace = true }
handlebars.workspace = true
hex = { workspace = true, features = ["serde"] }
humantime-serde = "1.1.1"
Expand Down
2 changes: 1 addition & 1 deletion src/dfx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ctrlc = { version = "3.2.1", features = ["termination"] }
dfx-core.workspace = true
dialoguer = { workspace = true, features = ["fuzzy-select"] }
directories-next.workspace = true
flate2 = { workspace = true, default-features = false, features = ["zlib-ng"] }
flate2 = { workspace = true }
fn-error-context = "0.2.0"
futures-util = "0.3.21"
futures.workspace = true
Expand Down

0 comments on commit d65717b

Please sign in to comment.