Skip to content

Commit e398b07

Browse files
committed
Merge #46: Update rust-secp-zkp to latest upstream and latest rust-secp
c61a982 Fix warnings (sanket1729) 46a2c48 Updates upstream to 725d895fc54cf82da1c2a9c69048656405da556d See also the changed patch: secp256k1.h.patch (sanket1729) b1a3048 Update rust upstream (sanket1729) 3db533c Remove custom hash derives to fix build errors (sanket1729) ed64568 Comment out Wasm build on CI (sanket1729) Pull request description: The upstream impl_array_newtype now implements a core::Hash. This caused a breaking changed here :( despite it being a minor release. ACKs for top commit: sanket1729: Pushed to c61a982. The diff between the previous ACK and this one is null. thomaseizinger: ACK c61a982 apoelstra: utACK c61a982 Tree-SHA512: b59a0bf6dc4a6627ef2a5495f7a880fad8ff0ff4683bc5347512bb87b5343ee387b400d80990c09f2ce63edfde6c2686ffd8638e1088c4f8583a13eeb5e91af5
2 parents 5d49c85 + c61a982 commit e398b07

File tree

187 files changed

+44258
-13242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+44258
-13242
lines changed

.github/workflows/rust.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -29,42 +29,42 @@ jobs:
2929
DO_BENCH: true
3030
run: ./contrib/test.sh
3131

32-
wasm:
33-
name: Stable - Docs / WebAssembly Build
34-
strategy:
35-
matrix:
36-
target: [ x86_64-unknown-linux-gnu, x86_64-apple-darwin ]
37-
include:
38-
- target: x86_64-unknown-linux-gnu
39-
os: ubuntu-latest
40-
cc: clang-12
41-
ar: ar
42-
- target: x86_64-apple-darwin
43-
os: macos-latest
44-
cc: /usr/local/opt/llvm/bin/clang
45-
ar: /usr/local/opt/llvm/bin/llvm-ar
46-
runs-on: ${{ matrix.os }}
47-
steps:
48-
- name: Checkout Crate
49-
uses: actions/checkout@v2
50-
- name: Checkout Toolchain
51-
uses: actions-rs/toolchain@v1
52-
with:
53-
profile: minimal
54-
toolchain: stable
55-
override: true
56-
- name: Building docs
57-
env:
58-
DO_DOCS: true
59-
run: ./contrib/test.sh
60-
- name: Install wasm-pack
61-
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
62-
- name: Running WASM build
63-
env:
64-
DO_WASM: true
65-
CC: ${{ matrix.cc }}
66-
AR: ${{ matrix.ar }}
67-
run: ./contrib/test.sh
32+
# wasm:
33+
# name: Stable - Docs / WebAssembly Build
34+
# strategy:
35+
# matrix:
36+
# target: [ x86_64-unknown-linux-gnu, x86_64-apple-darwin ]
37+
# include:
38+
# - target: x86_64-unknown-linux-gnu
39+
# os: ubuntu-latest
40+
# cc: clang-12
41+
# ar: ar
42+
# - target: x86_64-apple-darwin
43+
# os: macos-latest
44+
# cc: /usr/local/opt/llvm/bin/clang
45+
# ar: /usr/local/opt/llvm/bin/llvm-ar
46+
# runs-on: ${{ matrix.os }}
47+
# steps:
48+
# - name: Checkout Crate
49+
# uses: actions/checkout@v2
50+
# - name: Checkout Toolchain
51+
# uses: actions-rs/toolchain@v1
52+
# with:
53+
# profile: minimal
54+
# toolchain: stable
55+
# override: true
56+
# - name: Building docs
57+
# env:
58+
# DO_DOCS: true
59+
# run: ./contrib/test.sh
60+
# - name: Install wasm-pack
61+
# run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
62+
# - name: Running WASM build
63+
# env:
64+
# DO_WASM: true
65+
# CC: ${{ matrix.cc }}
66+
# AR: ${{ matrix.ar }}
67+
# run: ./contrib/test.sh
6868

6969
Tests:
7070
name: Tests

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1-zkp"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
authors = [ "Dawid Ciężarkiewicz <dpc@ucore.info>",
55
"Andrew Poelstra <apoelstra@wpsoftware.net>",
66
"Lucas Soriano <lucas@comit.network>",
@@ -30,8 +30,8 @@ use-serde = ["serde", "secp256k1/serde"]
3030
use-rand = ["rand", "secp256k1/rand"]
3131

3232
[dependencies]
33-
secp256k1 = "0.20.0"
34-
secp256k1-zkp-sys = { version = "0.5.0", default-features = false, path = "./secp256k1-zkp-sys" }
33+
secp256k1 = "0.22.1"
34+
secp256k1-zkp-sys = { version = "0.6.0", default-features = false, path = "./secp256k1-zkp-sys" }
3535
rand = { version = "0.6", default-features = false, optional = true }
3636
serde = { version = "1.0", default-features = false, optional = true }
3737

secp256k1-zkp-sys/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1-zkp-sys"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
authors = [ "Dawid Ciężarkiewicz <dpc@ucore.info>",
55
"Andrew Poelstra <apoelstra@wpsoftware.net>",
66
"Steven Roose <steven@stevenroose.org>",
@@ -13,7 +13,7 @@ description = "FFI for `libsecp256k1-zkp` library."
1313
keywords = [ "secp256k1", "libsecp256k1-zkp", "ffi" ]
1414
readme = "README.md"
1515
build = "build.rs"
16-
links = "rustsecp256k1zkp_v0_5_0"
16+
links = "rustsecp256k1zkp_v0_6_0"
1717

1818
# Should make docs.rs show all functions, even those behind non-default features
1919
[package.metadata.docs.rs]
@@ -23,7 +23,7 @@ features = [ "recovery", "lowmemory" ]
2323
cc = "1.0.28"
2424

2525
[dependencies]
26-
secp256k1-sys = "0.4"
26+
secp256k1-sys = "0.5"
2727

2828
[features]
2929
default = ["std"]

secp256k1-zkp-sys/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn main() {
3838
.include("depend/secp256k1/include")
3939
.include("depend/secp256k1/src")
4040
.flag_if_supported("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
41-
.define("SECP256K1_BUILD", Some("1"))
41+
.define("SECP256K1_BUILD", Some(""))
4242
.define("ENABLE_MODULE_SURJECTIONPROOF", Some("1"))
4343
.define("ENABLE_MODULE_GENERATOR", Some("1"))
4444
.define("ENABLE_MODULE_RANGEPROOF", Some("1"))
@@ -74,5 +74,7 @@ fn main() {
7474
base_config
7575
.file("depend/secp256k1/contrib/lax_der_parsing.c")
7676
.file("depend/secp256k1/src/secp256k1.c")
77+
.file("depend/secp256k1/src/precomputed_ecmult_gen.c")
78+
.file("depend/secp256k1/src/precomputed_ecmult.c")
7779
.compile("libsecp256k1zkp.a");
7880
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This file was automatically created by ./vendor-libsecp.sh
2-
f3708a1ecb445b1b05a0f8fcd1da6a88f83d89c4
2+
725d895fc54cf82da1c2a9c69048656405da556d

secp256k1-zkp-sys/depend/secp256k1.h.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
202,204d201
1+
226,228d225
22
< SECP256K1_API secp256k1_context* secp256k1_context_create(
33
< unsigned int flags
44
< ) SECP256K1_WARN_UNUSED_RESULT;
5-
215,217d211
5+
231,233d227
66
< SECP256K1_API secp256k1_context* secp256k1_context_clone(
77
< const secp256k1_context* ctx
88
< ) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT;
9-
232,234d225
9+
248,250d241
1010
< SECP256K1_API void secp256k1_context_destroy(
1111
< secp256k1_context* ctx
12-
< );
13-
311,314d301
12+
< ) SECP256K1_ARG_NONNULL(1);
13+
327,330d317
1414
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create(
1515
< const secp256k1_context* ctx,
1616
< size_t size
1717
< ) SECP256K1_ARG_NONNULL(1);
18-
322,325d308
18+
338,341d324
1919
< SECP256K1_API void secp256k1_scratch_space_destroy(
2020
< const secp256k1_context* ctx,
2121
< secp256k1_scratch_space* scratch

0 commit comments

Comments
 (0)