-
Notifications
You must be signed in to change notification settings - Fork 285
deps: update secp256k1 to 0.31 #2433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The base branch was changed.
|
wasm compilation is broken in 0.31. looks like version bump is blocked until new secp version is released that will include this fix rust-bitcoin/rust-secp256k1#818 |
|
Weird, secp shouldnt be a transitive dep in the wasm build. That seems unintended. |
|
It's because of this in monad-eth-types: pub trait ExtractEthAddress {
fn get_eth_address(&self) -> Address;
}
impl ExtractEthAddress for NopPubKey {
fn get_eth_address(&self) -> Address {
Address::new([0_u8; 20])
}
}
impl ExtractEthAddress for SecpPubkey {
fn get_eth_address(&self) -> Address {
Address::from_raw_public_key(&Self::bytes(self)[1..])
}
} |
893dcf1 to
b342565
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates the secp256k1 dependency from version 0.26 to 0.31 and adapts the codebase to accommodate API changes in the newer version.
- Updated secp256k1 dependency version in Cargo.toml
- Adapted API calls to match the new secp256k1 interface, including changes to message creation, keypair construction, and recovery ID handling
- Reorganized trait implementations to resolve circular dependencies between monad-secp and monad-eth-types
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updated secp256k1 dependency from 0.26 to 0.31 |
| monad-secp/src/secp.rs | Adapted secp256k1 API calls for new version, including message creation, keypair construction, and simplified memory cleanup |
| monad-secp/src/recoverable_address.rs | Updated message and recovery ID creation to use new API methods |
| monad-secp/src/lib.rs | Added ExtractEthAddress trait implementation for PubKey |
| monad-secp/Cargo.toml | Added monad-eth-types dependency |
| monad-eth-types/src/lib.rs | Removed ExtractEthAddress implementation for SecpPubkey to avoid circular dependency |
| monad-eth-types/Cargo.toml | Removed monad-secp dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
b342565 to
f8ae7ca
Compare
|
moved implementation of ExtractEthAddress for Pubkey to monad-secp to avoid secp imports in monad-eth-types |
using newer secp in the authentication protocol, there were some changes in api.
also erase can be now used on inner type without additional unsafe block