feat: bump secp256k1 0.30→0.31 + sha2 0.10→0.11#14
Conversation
secp256k1 0.31 deprecated SecretKey::from_slice (now from_byte_array on a fixed [u8; 32]) and Message::from_digest_slice (now from_digest on a [u8; 32]). sign_ecdsa now takes msg by value (impl Into<Message>) instead of by reference. Wallet round-trip (well_known_metamask_test_key_derives_correct_address) still passes — derived address matches MetaMask's canonical test key. Supersedes #8 (secp256k1) and #12 (sha2).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR upgrades two wallet/signing dependencies in the Rust SDK: secp256k1 from 0.30 to 0.31 and sha2 from 0.10 to 0.11. The code in src/wallet.rs was updated to adapt to the new APIs. The Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Cluster B of the major-bump audit.
Changes
API migrations
SecretKey::from_slice(&bytes)SecretKey::from_byte_array([u8; 32])Message::from_digest_slice(&digest)Message::from_digest([u8; 32])secp.sign_ecdsa(&msg, &sk)secp.sign_ecdsa(msg, &sk)(msg now by value)Verification
cargo test --features wallet— 5/5 pass, includingwell_known_metamask_test_key_derives_correct_addresswhich verifies signing path against MetaMask's canonical test key.Supersedes #8 (secp256k1) and #12 (sha2).
Summary by CodeRabbit