Skip to content

Commit

Permalink
Merge #94: secp256k1: enable ellswift module
Browse files Browse the repository at this point in the history
d132eec secp256k1: enable ellswift module (Marko Bencun)

Pull request description:

  When running `cargo tarpaulin` (for test coverage) in a project that depends on this crate, compilation fails with:

  ```
  = note: /usr/bin/ld: /rust-bitcoinconsensus/target/debug/build/bitcoinconsensus-6e1dd1af27ef0a27/out/libbitcoinconsensus.a(0ad13e9c6ad06456-pubkey.o): in function `EllSwiftPubKey::Decode() const':
            /rust-bitcoinconsensus/depend/bitcoin/src/pubkey.cpp:355: undefined reference to `secp256k1_ellswift_decode'
            collect2: error: ld returned 1 exit status

  ```

  I am not sure why it's not a problem when compiling using `cargo test`, but the code does reference this function, so the module should be enabled.

ACKs for top commit:
  apoelstra:
    ACK d132eec

Tree-SHA512: 0c6fd7f8c935f44144aea75688cb8e83d0b6ff260ff0b9843c7cd64ed6bb2ed9a1da420152db390dff1447a308d0217ea6b39e33129c914a5944a6a87691860c
  • Loading branch information
apoelstra committed Jul 6, 2024
2 parents ca6b531 + d132eec commit 788ce4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ fn main() {
.define("ECMULT_GEN_PREC_BITS", "4")
.define("ENABLE_MODULE_SCHNORRSIG", "1")
.define("ENABLE_MODULE_EXTRAKEYS", "1")
// Technically libconsensus doesn't require the recovery feautre, but `pubkey.cpp` does.
// Technically libconsensus doesn't require the ellswift and recovery features, but
// `pubkey.cpp` does.
.define("ENABLE_MODULE_ELLSWIFT", "1")
.define("ENABLE_MODULE_RECOVERY", "1")
.file("depend/bitcoin/src/secp256k1/src/precomputed_ecmult_gen.c")
.file("depend/bitcoin/src/secp256k1/src/precomputed_ecmult.c")
Expand Down

0 comments on commit 788ce4d

Please sign in to comment.