-
Notifications
You must be signed in to change notification settings - Fork 74
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
Move secp256k1_recover to its own crate #1656
base: master
Are you sure you want to change the base?
Conversation
The circular dependency check is failing but the premise of the check is wrong. It's complaining about the recommended way to activate a feature in tests: https://stackoverflow.com/questions/68618789/is-it-possible-to-enable-a-rust-feature-only-in-test Update: turns out I don't need that to make the tests pass so we can worry about it another time |
Coverage failure means nothing to me: |
facb162
to
caf046e
Compare
@@ -44,7 +44,6 @@ define_syscall!(fn sol_create_program_address(seeds_addr: *const u8, seeds_len: | |||
define_syscall!(fn sol_try_find_program_address(seeds_addr: *const u8, seeds_len: u64, program_id_addr: *const u8, address_bytes_addr: *const u8, bump_seed_addr: *const u8) -> u64); | |||
define_syscall!(fn sol_sha256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64); | |||
define_syscall!(fn sol_keccak256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64); | |||
define_syscall!(fn sol_secp256k1_recover(hash: *const u8, recovery_id: u64, signature: *const u8, result: *mut u8) -> u64); |
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.
Is this intended?
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.
Yes, I defined it manually in the secp256k1-recover crate to avoid depending on solana-program in that crate:
#[cfg(target_os = "solana")]
extern "C" {
pub fn sol_secp256k1_recover(
hash: *const u8,
recovery_id: u64,
signature: *const u8,
result: *mut u8,
) -> u64;
}
1f560f1
to
0d42f21
Compare
0d42f21
to
9415e53
Compare
Problem
libsecp256k1 is a heavy dependency and the use case is niche
Summary of Changes
Moves secp256k1_recover out of solana-program and into its own crate