Skip to content

Commit

Permalink
Move to secp256k1 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewLM committed May 28, 2024
1 parent d66f2de commit a6e1fb1
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 36 deletions.
6 changes: 3 additions & 3 deletions coinlib/bin/build_linux.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ RUN apt-get update -y \
# Could use secp256k1 already in code-base but this makes the dockerfile more
# independent and avoids complexity of copying everything into the correct
# context. It's not a large library to download.
# Use 0.4.1 release
# Use 0.5.0 release
RUN git clone https://github.com/bitcoin-core/secp256k1 \
&& cd secp256k1 \
&& git checkout 1ad5185cd42c0636104129fcc9f6a4bf9c67cc40
&& git checkout e3a885d42a7800c1ccebad94ad1e2b82c4df5c65
WORKDIR /secp256k1
Expand All @@ -34,7 +34,7 @@ RUN make
# maintained.
RUN make install
RUN mkdir output
RUN cp /usr/local/lib/libsecp256k1.so.2.1.1 output/libsecp256k1.so
RUN cp /usr/local/lib/libsecp256k1.so.2.2.0 output/libsecp256k1.so
""";

void main() async {
Expand Down
6 changes: 3 additions & 3 deletions coinlib/bin/build_macos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ void main() async {
"Could not clone secp256k1 to temporary build directory",
);

// Checkout to 0.4.1 commit
// Checkout to 0.5.0 commit
exitOnCode(
await execWithStdio(
"git", ["checkout", "1ad5185cd42c0636104129fcc9f6a4bf9c67cc40"],
"git", ["checkout", "e3a885d42a7800c1ccebad94ad1e2b82c4df5c65"],
workingDir: libDir,
),
"Could not checkout to v0.4.1 commit",
"Could not checkout to v0.5.0 commit",
);

// Generate configure
Expand Down
4 changes: 2 additions & 2 deletions coinlib/bin/build_wasm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ RUN wget -nv https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-
RUN tar xvf $WASI_ARCHIVE
RUN rm $WASI_ARCHIVE
# Clone libsecp256k1 and use v0.4.1
# Clone libsecp256k1 and use v0.5.0
RUN git clone https://github.com/bitcoin-core/secp256k1 \
&& cd secp256k1 \
&& git checkout 1ad5185cd42c0636104129fcc9f6a4bf9c67cc40
&& git checkout e3a885d42a7800c1ccebad94ad1e2b82c4df5c65
WORKDIR /secp256k1
# Build using wasi-sdk
Expand Down
4 changes: 2 additions & 2 deletions coinlib/bin/build_windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ void main() async {
Directory.current = Directory("$tmpDir/secp256k1");
await execWithStdio(
"git",
// Use version 0.4.1
["checkout", "1ad5185cd42c0636104129fcc9f6a4bf9c67cc40"],
// Use version 0.5.0
["checkout", "e3a885d42a7800c1ccebad94ad1e2b82c4df5c65"],
);

// Build in tmpDir/secp256k1/build.
Expand Down
4 changes: 2 additions & 2 deletions coinlib/bin/build_windows_crosscompile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ FROM debian:bullseye
RUN apt-get update -y \
&& apt-get install -y autoconf libtool build-essential git cmake gcc-mingw-w64
# Clone libsecp256k1 0.4.1 release.
# Clone libsecp256k1 0.5.0 release.
RUN git clone https://github.com/bitcoin-core/secp256k1 \
&& cd secp256k1 \
&& git checkout 1ad5185cd42c0636104129fcc9f6a4bf9c67cc40 \
&& git checkout e3a885d42a7800c1ccebad94ad1e2b82c4df5c65 \
&& mkdir build
WORKDIR /secp256k1/build
Expand Down
4 changes: 2 additions & 2 deletions coinlib/bin/build_wsl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ void main() async {
Directory.current = Directory("$tmpDir/secp256k1");
await execWithStdio(
"git",
// Use version 0.4.1
["checkout", "1ad5185cd42c0636104129fcc9f6a4bf9c67cc40"],
// Use version 0.5.0
["checkout", "e3a885d42a7800c1ccebad94ad1e2b82c4df5c65"],
);

// Build in tmpDir/secp256k1/lib.
Expand Down
64 changes: 44 additions & 20 deletions coinlib_flutter/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ packages:
dependency: transitive
description:
name: coinlib
sha256: a90427e9b66202d52c282f15c7f1c35e63674ad62f65bb07de61fb73664cd2b9
sha256: "44aa3f7b07d3b03d58353e7657f43cdaf76a70ad2cce5bdac9306208099d8df5"
url: "https://pub.dev"
source: hosted
version: "2.0.0-rc.9"
version: "2.0.0"
coinlib_flutter:
dependency: "direct main"
description:
name: coinlib_flutter
sha256: "0090452e63e35e8f83d6a61e144490b71709ffd394ff2c495396cefaa5427dd0"
sha256: b352378773158dbaec37bd542c297682f3812f9881acb676971f0f4c5893631f
url: "https://pub.dev"
source: hosted
version: "2.0.0-rc.10"
version: "2.0.0"
collection:
dependency: transitive
description:
Expand Down Expand Up @@ -139,6 +139,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.7"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
lints:
dependency: transitive
description:
Expand All @@ -151,34 +175,34 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev"
source: hosted
version: "0.12.16"
version: "0.12.16+1"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.11.0"
path:
dependency: transitive
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev"
source: hosted
version: "1.8.3"
version: "1.9.0"
plugin_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -264,22 +288,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
wasm_interop:
vm_service:
dependency: transitive
description:
name: wasm_interop
sha256: b1b378f07a4cf0103c25faf34d9a64d2c3312135b9efb47e0ec116ec3b14e48f
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "2.0.1"
web:
version: "13.0.0"
wasm_interop:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
name: wasm_interop
sha256: b1b378f07a4cf0103c25faf34d9a64d2c3312135b9efb47e0ec116ec3b14e48f
url: "https://pub.dev"
source: hosted
version: "0.3.0"
version: "2.0.1"
sdks:
dart: ">=3.2.0 <4.0.0"
flutter: ">=2.17.0"
4 changes: 2 additions & 2 deletions coinlib_flutter/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ExternalProject_Add(
secp256k1

GIT_REPOSITORY https://github.com/bitcoin-core/secp256k1
GIT_TAG 1ad5185cd42c0636104129fcc9f6a4bf9c67cc40 # v0.4.1 with cmake system
GIT_TAG e3a885d42a7800c1ccebad94ad1e2b82c4df5c65 # v0.5.0

PREFIX ${SECP256K1_PREFIX}

Expand All @@ -59,7 +59,7 @@ ExternalProject_Add(
# Post-build processing of library file
# Move output library to the correct place

set(SECP256K1_VERSIONEDLIB ${SECP256K1_PREFIX}/lib/libsecp256k1.so.2.1.1)
set(SECP256K1_VERSIONEDLIB ${SECP256K1_PREFIX}/lib/libsecp256k1.so.2.2.0)
set(SECP255K1_FINALLIB ${SECP256K1_PREFIX}/lib/libsecp256k1.so)

# Move any versioned .so file to an unversioned .so file.
Expand Down

0 comments on commit a6e1fb1

Please sign in to comment.