Skip to content

chore(deps): upgrade faster-hex to 2.1 and adopt new codec APIs - #107

Open
zhangsoledad wants to merge 3 commits into
masterfrom
zhangsoledad/upgrade-faster-hex-2.1
Open

zhangsoledad wants to merge 3 commits into
masterfrom
zhangsoledad/upgrade-faster-hex-2.1

Conversation

@zhangsoledad

@zhangsoledad zhangsoledad commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Upgrade faster-hex in [build-dependencies] and [dev-dependencies] from 0.6.0 to 2.1 (default-features = false, features = ["std"]) and adopt faster-hex 2.1 APIs:

  • build.rs: Encode 32-byte Blake2b digests into a stack [0u8; 64] buffer via faster_hex::hex_encode instead of allocating a String per binary on the happy path.
  • src/tests/secp256k1_blake160_multisig_all.rs: Use faster_hex::hex_decode_vec and faster_hex::hex_decode_array::<32> instead of zero-filled Vec buffers + hex_decode.
  • MSRV & CI: Declare rust-version = "1.95.0" in Cargo.toml, bump CI Rust toolchain from 1.67.1 to 1.95.0, and fix 3 Rust 1.95 clippy lints in src/tests/.

Release / MSRV Note

  • Because faster-hex 2.1 is in [build-dependencies] (used by build.rs), compiling this crate now requires Rust 1.95.0+ (matching ckb and declared via rust-version = "1.95.0" in Cargo.toml). Mention the MSRV bump (1.67.1 → 1.95.0) in the release notes when publishing.
  • If maintainers prefer preserving older Rust toolchains for downstream builds, the upgrade can instead be scoped to [dev-dependencies] only.

Upgrade `faster-hex` in `[build-dependencies]` and `[dev-dependencies]` from `0.6.0` to `2.1` (`default-features = false`, `features = ["std"]`), update `Cargo.lock` to `faster-hex 2.1.0`, and adopt its new safe codec helpers:

- Encode binary hashes into a 64-byte stack buffer via `faster_hex::hex_encode` in `build.rs`, avoiding heap allocation on matching hashes.
- Use `faster_hex::hex_decode_append` and `faster_hex::hex_decode_array` in `src/tests/secp256k1_blake160_multisig_all.rs` instead of pre-zeroed `vec![0u8; N]` buffers.
- Update the CI toolchain in `.github/workflows/ci.yaml` from `1.67.1` to `1.95.0` (matching `faster-hex 2.1.0`'s MSRV) and fix the three Rust 1.95 clippy lints in `src/tests/`.
@zhangsoledad
zhangsoledad force-pushed the zhangsoledad/upgrade-faster-hex-2.1 branch from 4f6d896 to 119eb8f Compare November 30, 2026 04:26
@zhangsoledad zhangsoledad changed the title chore(deps): upgrade faster-hex to 2.1 chore(deps): upgrade faster-hex to 2.1 and adopt new codec APIs Nov 30, 2026
@XuJiandong

Copy link
Copy Markdown
Collaborator

pin rust version to 1.95 or above.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants