Skip to content

Commit

Permalink
Remove vendored hashing_serializer and patch it with upstream fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdplm committed Jul 31, 2024
1 parent fd0024f commit 2c0e9be
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 428 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ resolver = "2"
# TODO(dp): remove before merging
[patch.crates-io]
bip32 = { git = "https://github.com/dvdplm/crates/", branch = "dp-fresh-bip32-dependencies" }
hashing-serializer = { git = "https://github.com/dvdplm/hashing-serializer", branch = "dp-update-deps" }
2 changes: 1 addition & 1 deletion synedrion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ digest = { version = "0.11.0-pre.9", default-features = false, features = ["allo
hex = { version = "0.4", default-features = false, features = ["alloc"] }
base64 = { version = "0.22.1", default-features = false, features = ["alloc"] }
# TODO(dp): Make a PR to update this crate and remove the vendorized copy
# hashing-serializer = { version = "0.1", default-features = false }
hashing-serializer = { version = "0.1", default-features = false }
secrecy = { version = "0.8", default-features = false, features = ["alloc", "serde"] }
zeroize = { version = "1.8", default-features = false, features = ["alloc", "zeroize_derive"] }
bip32 = { version = "0.5.2", default-features = false, features = ["alloc", "secp256k1", "k256"] }
Expand Down
7 changes: 2 additions & 5 deletions synedrion/src/tools/hashing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ use serde::{Deserialize, Serialize};
use sha2::Sha256;
use sha3::{Shake256, Shake256Reader};

use hashing_serializer::HashingSerializer;

use crate::curve::Scalar;
// TODO(dp): the `hashing_serializer` crate uses an old version of `digest` (v0.10) which conflicts
// with our `impl Hashable for T`, so as a temporary workaround, copy&paste the whole crate source here...
// When we get a new release of `digest`, ask for an updated version of `hashing_serializer` and
// remove our copy in `tools/hashing_serializer.rs`
use crate::tools::hashing_serializer::HashingSerializer;
use crate::tools::serde_bytes;

/// A digest object that takes byte slices or decomposable ([`Hashable`]) objects.
Expand Down
Loading

0 comments on commit 2c0e9be

Please sign in to comment.