-
Notifications
You must be signed in to change notification settings - Fork 715
revert: use old library for secp256k1 functions #6645
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
revert: use old library for secp256k1 functions #6645
Conversation
These should eventually switch over to using the Rust-native `k256` crate from RustCrypto, but for now, we are reverting this to allow more time to ensure there are no accidental consensus breaking changes.
aaronb-stacks
left a comment
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.
LGTM! Just checked for an exact match of the prior code:
% git diff -r release/3.2.0.0.2 HEAD stacks-common/Cargo.toml
diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml
index 8adaa41eee..b9944732c9 100644
--- a/stacks-common/Cargo.toml
+++ b/stacks-common/Cargo.toml
@@ -42,6 +42,10 @@ serde_json = { workspace = true }
sha3 = { version = "0.10.1", default-features = false }
slog = { workspace = true }
slog-term = { version = "2.6.0", default-features = false }
+thiserror = { workspace = true }
+
+# RustCrypto elliptic curve crates
+p256 = { version = "0.13", default-features = false, features = ["std", "serde", "ecdsa"] }
# Optional dependencies
getrandom = { version = "0.2", default-features = false, optional = true }
% git diff -r release/3.2.0.0.2 HEAD stacks-common/src/util/secp256k1
% git diff -r release/3.2.0.0.2 HEAD stacks-common/src/util/mod.rs
diff --git a/stacks-common/src/util/mod.rs b/stacks-common/src/util/mod.rs
index 69e14a4473..25be66f146 100644
--- a/stacks-common/src/util/mod.rs
+++ b/stacks-common/src/util/mod.rs
@@ -27,6 +27,7 @@ pub mod pair;
pub mod pipe;
pub mod retry;
pub mod secp256k1;
+pub mod secp256r1;
pub mod serde_serializers;
pub mod uint;
pub mod vrf;And it looks good to me!
2165fce
Codecov Report❌ Patch coverage is ❌ Your project status has failed because the head coverage (62.90%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## develop #6645 +/- ##
============================================
- Coverage 74.67% 62.90% -11.77%
============================================
Files 574 575 +1
Lines 355039 354908 -131
============================================
- Hits 265114 223269 -41845
- Misses 89925 131639 +41714
... and 401 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
These should eventually switch over to using the Rust-native
k256crate from RustCrypto, but for now, we are reverting this to allow more time to ensure there are no accidental consensus breaking changes.Replaces #6644 for now.