From a6e1fb1b783f4273ac8773eda0a9ef459972a8f2 Mon Sep 17 00:00:00 2001 From: Matthew Mitchell Date: Tue, 28 May 2024 17:59:57 +0100 Subject: [PATCH] Move to secp256k1 0.5.0 --- coinlib/bin/build_linux.dart | 6 +- coinlib/bin/build_macos.dart | 6 +- coinlib/bin/build_wasm.dart | 4 +- coinlib/bin/build_windows.dart | 4 +- coinlib/bin/build_windows_crosscompile.dart | 4 +- coinlib/bin/build_wsl.dart | 4 +- coinlib_flutter/example/pubspec.lock | 64 ++++++++++++++------- coinlib_flutter/src/CMakeLists.txt | 4 +- 8 files changed, 60 insertions(+), 36 deletions(-) diff --git a/coinlib/bin/build_linux.dart b/coinlib/bin/build_linux.dart index 6f842ff..ec92987 100644 --- a/coinlib/bin/build_linux.dart +++ b/coinlib/bin/build_linux.dart @@ -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 @@ -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 { diff --git a/coinlib/bin/build_macos.dart b/coinlib/bin/build_macos.dart index d779f85..1b4281e 100644 --- a/coinlib/bin/build_macos.dart +++ b/coinlib/bin/build_macos.dart @@ -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 diff --git a/coinlib/bin/build_wasm.dart b/coinlib/bin/build_wasm.dart index 757029d..b6c5b2f 100644 --- a/coinlib/bin/build_wasm.dart +++ b/coinlib/bin/build_wasm.dart @@ -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 diff --git a/coinlib/bin/build_windows.dart b/coinlib/bin/build_windows.dart index cb34e0b..209b958 100644 --- a/coinlib/bin/build_windows.dart +++ b/coinlib/bin/build_windows.dart @@ -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. diff --git a/coinlib/bin/build_windows_crosscompile.dart b/coinlib/bin/build_windows_crosscompile.dart index f6e77a0..9503879 100644 --- a/coinlib/bin/build_windows_crosscompile.dart +++ b/coinlib/bin/build_windows_crosscompile.dart @@ -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 diff --git a/coinlib/bin/build_wsl.dart b/coinlib/bin/build_wsl.dart index 75be94e..357ee1f 100644 --- a/coinlib/bin/build_wsl.dart +++ b/coinlib/bin/build_wsl.dart @@ -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. diff --git a/coinlib_flutter/example/pubspec.lock b/coinlib_flutter/example/pubspec.lock index a222ddf..297e1ce 100644 --- a/coinlib_flutter/example/pubspec.lock +++ b/coinlib_flutter/example/pubspec.lock @@ -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: @@ -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: @@ -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: @@ -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" diff --git a/coinlib_flutter/src/CMakeLists.txt b/coinlib_flutter/src/CMakeLists.txt index b2c2a07..80f37e5 100644 --- a/coinlib_flutter/src/CMakeLists.txt +++ b/coinlib_flutter/src/CMakeLists.txt @@ -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} @@ -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.