Skip to content
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

Update rust-secp-zkp to latest upstream and latest rust-secp #46

Merged
merged 5 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,42 @@ jobs:
DO_BENCH: true
run: ./contrib/test.sh

wasm:
name: Stable - Docs / WebAssembly Build
strategy:
matrix:
target: [ x86_64-unknown-linux-gnu, x86_64-apple-darwin ]
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
cc: clang-12
ar: ar
- target: x86_64-apple-darwin
os: macos-latest
cc: /usr/local/opt/llvm/bin/clang
ar: /usr/local/opt/llvm/bin/llvm-ar
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Building docs
env:
DO_DOCS: true
run: ./contrib/test.sh
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Running WASM build
env:
DO_WASM: true
CC: ${{ matrix.cc }}
AR: ${{ matrix.ar }}
run: ./contrib/test.sh
# wasm:
# name: Stable - Docs / WebAssembly Build
# strategy:
# matrix:
# target: [ x86_64-unknown-linux-gnu, x86_64-apple-darwin ]
# include:
# - target: x86_64-unknown-linux-gnu
# os: ubuntu-latest
# cc: clang-12
# ar: ar
# - target: x86_64-apple-darwin
# os: macos-latest
# cc: /usr/local/opt/llvm/bin/clang
# ar: /usr/local/opt/llvm/bin/llvm-ar
# runs-on: ${{ matrix.os }}
# steps:
# - name: Checkout Crate
# uses: actions/checkout@v2
# - name: Checkout Toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true
# - name: Building docs
# env:
# DO_DOCS: true
# run: ./contrib/test.sh
# - name: Install wasm-pack
# run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# - name: Running WASM build
# env:
# DO_WASM: true
# CC: ${{ matrix.cc }}
# AR: ${{ matrix.ar }}
# run: ./contrib/test.sh

Tests:
name: Tests
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "secp256k1-zkp"
version = "0.5.0"
version = "0.6.0"
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
"Andrew Poelstra <[email protected]>",
"Lucas Soriano <[email protected]>",
Expand Down Expand Up @@ -30,8 +30,8 @@ use-serde = ["serde", "secp256k1/serde"]
use-rand = ["rand", "secp256k1/rand"]

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

Expand Down
6 changes: 3 additions & 3 deletions secp256k1-zkp-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "secp256k1-zkp-sys"
version = "0.5.0"
version = "0.6.0"
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
"Andrew Poelstra <[email protected]>",
"Steven Roose <[email protected]>",
Expand All @@ -13,7 +13,7 @@ description = "FFI for `libsecp256k1-zkp` library."
keywords = [ "secp256k1", "libsecp256k1-zkp", "ffi" ]
readme = "README.md"
build = "build.rs"
links = "rustsecp256k1zkp_v0_5_0"
links = "rustsecp256k1zkp_v0_6_0"

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

[dependencies]
secp256k1-sys = "0.4"
secp256k1-sys = "0.5"

[features]
default = ["std"]
Expand Down
4 changes: 3 additions & 1 deletion secp256k1-zkp-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn main() {
.include("depend/secp256k1/include")
.include("depend/secp256k1/src")
.flag_if_supported("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
.define("SECP256K1_BUILD", Some("1"))
.define("SECP256K1_BUILD", Some(""))
.define("ENABLE_MODULE_SURJECTIONPROOF", Some("1"))
.define("ENABLE_MODULE_GENERATOR", Some("1"))
.define("ENABLE_MODULE_RANGEPROOF", Some("1"))
Expand Down Expand Up @@ -74,5 +74,7 @@ fn main() {
base_config
.file("depend/secp256k1/contrib/lax_der_parsing.c")
.file("depend/secp256k1/src/secp256k1.c")
.file("depend/secp256k1/src/precomputed_ecmult_gen.c")
.file("depend/secp256k1/src/precomputed_ecmult.c")
.compile("libsecp256k1zkp.a");
}
2 changes: 1 addition & 1 deletion secp256k1-zkp-sys/depend/secp256k1-HEAD-revision.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file was automatically created by ./vendor-libsecp.sh
f3708a1ecb445b1b05a0f8fcd1da6a88f83d89c4
725d895fc54cf82da1c2a9c69048656405da556d
12 changes: 6 additions & 6 deletions secp256k1-zkp-sys/depend/secp256k1.h.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
202,204d201
226,228d225
< SECP256K1_API secp256k1_context* secp256k1_context_create(
< unsigned int flags
< ) SECP256K1_WARN_UNUSED_RESULT;
215,217d211
231,233d227
< SECP256K1_API secp256k1_context* secp256k1_context_clone(
< const secp256k1_context* ctx
< ) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT;
232,234d225
248,250d241
< SECP256K1_API void secp256k1_context_destroy(
< secp256k1_context* ctx
< );
311,314d301
< ) SECP256K1_ARG_NONNULL(1);
327,330d317
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create(
< const secp256k1_context* ctx,
< size_t size
< ) SECP256K1_ARG_NONNULL(1);
322,325d308
338,341d324
< SECP256K1_API void secp256k1_scratch_space_destroy(
< const secp256k1_context* ctx,
< secp256k1_scratch_space* scratch
Expand Down
Loading