Skip to content

Commit

Permalink
chore: update f4jumble to 0.1.0 (#4926)
Browse files Browse the repository at this point in the history
## Describe your changes

Updates the old git dependency to a suitable published version from
crates.io. To review, see the diff review posted in #4921. I'd prefer
that reviewers replicate that work, and confirm that 1) the procedure
used for obtaining relevant sources was sound; and 2) the code changes
in the dep introduced by this diff are acceptable.

## Issue ticket number and link

Refs #4921.

## Checklist before requesting a review

- [x] I have added guiding text to explain how a reviewer should test
these changes.

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

> The dep appears to function the same in pre and post version bump, as
does our modified error handling of its return values. Reviewers should
confirm those statements are true, and if so, then there's no affect on
consensus.
  • Loading branch information
conorsch authored Nov 18, 2024
1 parent 9dd02b4 commit b252061
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 3 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 crates/core/keys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ decaf377-ka = {workspace = true}
decaf377-rdsa = {workspace = true}
derivative = {workspace = true}
ethnum = {workspace = true}
f4jumble = { git = "https://github.com/zcash/librustzcash", rev = "2425a0869098e3b0588ccd73c42716bcf418612c" }
f4jumble = "0.1.0"
hex = {workspace = true}
hmac = "0.12.0"
ibig = {workspace = true}
Expand Down
3 changes: 1 addition & 2 deletions crates/core/keys/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ impl TryFrom<&[u8]> for Address {
anyhow::bail!("address malformed");
}

let unjumbled_bytes =
f4jumble_inv(jumbled_bytes).ok_or_else(|| anyhow::anyhow!("invalid address"))?;
let unjumbled_bytes = f4jumble_inv(jumbled_bytes).context("invalid address")?;
let mut bytes = Cursor::new(unjumbled_bytes);

let mut diversifier_bytes = [0u8; 16];
Expand Down

0 comments on commit b252061

Please sign in to comment.