Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash
@ 2023-05-01 17:40 ar-jan
  2023-05-01 17:44 ` ar-jan
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: ar-jan @ 2023-05-01 17:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2744 bytes --]

There is a new pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages bitcoin-etc
https://github.com/void-linux/void-packages/pull/43702

Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package: libsecp256k1
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Electrum v4.4.1 moved to using libsecp256k1 0.3.1 (`libsecp256k1.so.2`).

Void's current libsecp256k1 is from https://github.com/libbitcoin/secp256k1, which is extremely outdated.
I believe this was originally used because back then https://github.com/bitcoin-core/secp256k1 was too unstable and did not provide tagged releases. Now they do, so we should move to that.

The only two packages which use libsecp256k1 are `electrum` and `Electron-Cash` (besides the other `libbitcoin-*` packages).

Electron Cash can also use bitcoin-core's libsecp256k1 v0.3.1, although it actually needs https://github.com/Bitcoin-ABC/secp256k1 or Electron Cash's own fork for full functionality (CashFusion would not work):
> you CAN use the Core version, and it will speed-up ECDSA sigs.. but then for Schnorr sigs it won't speed them up at all since Core's Schnorr stuff differs from Bitcoin Cash's. So Electron Cash will detect that it's on Core, and will fall-back to using python-only Schnorr in that case (slow).
> https://github.com/Electron-Cash/Electron-Cash/issues/2596#issuecomment-1529926625

I assume CashFusion is currently not working either since it's already using the wrong version of the library, so switching to bitcoin-core's libsecp256k1 v0.3.1 should be fine for Electron Cash too.

That leaves the other 10 libbitcoin packages which also depend on libsecp256k1:

- libbitcoin-blockchain
- libbitcoin-client
- libbitcoin-consensus
- libbitcoin-database
- libbitcoin-explorer
- libbitcoin-network
- libbitcoin-node
- libbitcoin-protocol
- libbitcoin-server
- libbitcoin-system

These packages haven't been updated for Void Linux since August 2019, so it seems safe to assume they're not actively used. There are no other packages that depend on any of them. I propose we remove them.

If agreed that we can remove the `libbitcoin`  packages, is it OK to just provide the new .so version from the new package, and remove the old one when updating `removed-packages`? 

> libsecp256k1.so.2 libsecp256k1-0.3.1_1
> libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1

A patch file from https://github.com/void-linux/void-packages/pull/43702.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bitcoin-etc-43702.patch --]
[-- Type: text/x-diff, Size: 5833 bytes --]

From 1e39df5c6a6725276b59ce3a7e62f2064c95f3d2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 17:55:47 +0200
Subject: [PATCH 1/3] New package: libsecp256k1-0.3.1

---
 common/shlibs                 |  1 +
 srcpkgs/libsecp256k1-devel    |  1 +
 srcpkgs/libsecp256k1/template | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 120000 srcpkgs/libsecp256k1-devel
 create mode 100644 srcpkgs/libsecp256k1/template

diff --git a/common/shlibs b/common/shlibs
index a64330bd7cb9..f9a299664e68 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3667,6 +3667,7 @@ libdwarves_emit.so.1 pahole-1.12_1
 libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
+libsecp256k1.so.2 libsecp256k1-0.3.1_1
 libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1
 libbitcoin.so.0 libbitcoin-system-3.5.0_1
 libbitcoin-protocol.so.0 libbitcoin-protocol-3.5.0_1
diff --git a/srcpkgs/libsecp256k1-devel b/srcpkgs/libsecp256k1-devel
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libsecp256k1-devel
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1/template b/srcpkgs/libsecp256k1/template
new file mode 100644
index 000000000000..1d9d9c10549e
--- /dev/null
+++ b/srcpkgs/libsecp256k1/template
@@ -0,0 +1,35 @@
+# Template file for 'libsecp256k1'
+pkgname=libsecp256k1
+version=0.3.1
+revision=1
+build_style=gnu-configure
+configure_args="--disable-benchmark --disable-coverage --enable-experimental
+ --enable-module-ecdh --enable-module-recovery --enable-tests
+ --enable-exhaustive-tests --with-gnu-ld"
+hostmakedepends="autoconf automake libtool m4 pkg-config"
+short_desc="Optimized C library for EC operations on curve secp256k1"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="MIT"
+homepage="https://github.com/bitcoin-core/secp256k1"
+distfiles="https://github.com/bitcoin-core/secp256k1/archive/v${version}.tar.gz"
+checksum="0e7bb22c29ed6add5e3631e6a9ed0526f3020a20f3b99e6151918fba6cf6affa"
+
+pre_configure() {
+	./autogen.sh
+}
+
+post_install() {
+	vlicense COPYING
+	vdoc README.md
+}
+
+libsecp256k1-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+	}
+}

From 550b78883843b5e2dbda4bb87a0f897b54b8f7ca Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 16:13:03 +0200
Subject: [PATCH 2/3] electrum: update to 4.4.1; use bitcoin-core/libsecp256k1

---
 srcpkgs/electrum/template | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template
index dcabed755423..702a2ec7c280 100644
--- a/srcpkgs/electrum/template
+++ b/srcpkgs/electrum/template
@@ -1,14 +1,14 @@
 # Template file for 'electrum'
 pkgname=electrum
-version=4.2.0
-revision=3
+version=4.4.1
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx
  python3-bitstring python3-dnspython python3-ecdsa python3-jsonrpclib
  python3-protobuf python3-pyaes python3-pycryptodomex python3-PyQt5
- python3-qrcode python3-socks python3-cryptography libbitcoin-secp256k1
- python3-certifi"
+ python3-qrcode python3-socks python3-cryptography libsecp256k1
+ python3-certifi libzbar"
 # Optional dependencies:
 #  btchip - BTChip hardware wallet support
 #  trezor - TREZOR hardware wallet support
@@ -19,8 +19,9 @@ short_desc="Lightweight Bitcoin wallet"
 maintainer="Charles E. Lehner <cel@celehner.com>"
 license="MIT"
 homepage="https://electrum.org/"
+changelog="https://raw.githubusercontent.com/spesmilo/electrum/master/RELEASE-NOTES"
 distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz"
-checksum=3a24c7ed7a2bb47888f308380b8624a3fff3cf3882fd63d904cd9c3ec543fb3b
+checksum=62b7978f880657e272aac23096258e7f9c6a6940731de61c69a4e673f5ac6aa0
 
 post_install() {
 	vsed -i -e 's|electrum %u|electrum|' \

From 69de5a5f9b76cc46c2f20073c6a8f58008332896 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 19:29:16 +0200
Subject: [PATCH 3/3] Electron-Cash: update to 4.2.14; use
 bitcoin-core/libsecp256k1

---
 srcpkgs/Electron-Cash/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Electron-Cash/template b/srcpkgs/Electron-Cash/template
index 38ca3449b093..a858e3d68cea 100644
--- a/srcpkgs/Electron-Cash/template
+++ b/srcpkgs/Electron-Cash/template
@@ -1,20 +1,20 @@
 # Template file for 'Electron-Cash'
 pkgname=Electron-Cash
-version=4.2.10
-revision=3
+version=4.2.14
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-PyQt5 python3-PyQt5-svg python3-qrcode python3-dateutil
  python3-jsonrpclib python3-protobuf
  python3-dnspython python3-requests python3-pysocks python3-stem
- python3-ecdsa python3-pyaes python3-pycryptodomex libbitcoin-secp256k1 libzbar
+ python3-ecdsa python3-pyaes python3-pycryptodomex libsecp256k1 libzbar
  python3-cryptography>=2.6 python3-pathvalidate python3-psutil"
 short_desc="Lightweight Bitcoin Cash client"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://electroncash.org"
 distfiles="https://github.com/Electron-Cash/Electron-Cash/releases/download/${version}/Electron-Cash-${version}.tar.gz"
-checksum=2c77258c0e8ccdc42d16cd9bdbc26b47f94b92d9ba8a86d63c25a17ec832b324
+checksum=2b987e7074add9631865ee0bd704c4cd8d736945edc5ed038009d00b3aaa2afb
 make_check=no # Depends on unpackaged SimpleWebSocketServer
 
 post_install() {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
@ 2023-05-01 17:44 ` ar-jan
  2023-05-01 18:53 ` ar-jan
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-01 17:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/43702#issuecomment-1530002735

Comment:
@atweiden would you agree that the `libbitcoin` packages can all be removed if we switch to `bitcoin-core/secp256k1`?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
  2023-05-01 17:44 ` ar-jan
@ 2023-05-01 18:53 ` ar-jan
  2023-05-02  1:28 ` atweiden
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-01 18:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/43702#issuecomment-1530002735

Comment:
@atweiden would you agree that the `libbitcoin` packages can all be removed (to facilitate switching to `bitcoin-core/secp256k1`)?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
  2023-05-01 17:44 ` ar-jan
  2023-05-01 18:53 ` ar-jan
@ 2023-05-02  1:28 ` atweiden
  2023-05-06 12:41 ` [PR PATCH] [Updated] " ar-jan
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: atweiden @ 2023-05-02  1:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

New comment by atweiden on void-packages repository

https://github.com/void-linux/void-packages/pull/43702#issuecomment-1530747329

Comment:
Yes, @libbitcoin hasn’t made a new release since 2019. If the packages are removed, I’d be okay with that.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (2 preceding siblings ...)
  2023-05-02  1:28 ` atweiden
@ 2023-05-06 12:41 ` ar-jan
  2023-05-06 12:54 ` ar-jan
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-06 12:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2749 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages bitcoin-etc
https://github.com/void-linux/void-packages/pull/43702

Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package: libsecp256k1
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Electrum v4.4.1 moved to using libsecp256k1 0.3.1 (`libsecp256k1.so.2`).

Void's current libsecp256k1 is from https://github.com/libbitcoin/secp256k1, which is extremely outdated.
I believe this was originally used because back then https://github.com/bitcoin-core/secp256k1 was too unstable and did not provide tagged releases. Now they do, so we should move to that.

The only two packages which use libsecp256k1 are `electrum` and `Electron-Cash` (besides the other `libbitcoin-*` packages).

Electron Cash can also use bitcoin-core's libsecp256k1 v0.3.1, although it actually needs https://github.com/Bitcoin-ABC/secp256k1 or Electron Cash's own fork for full functionality (CashFusion would not work):
> you CAN use the Core version, and it will speed-up ECDSA sigs.. but then for Schnorr sigs it won't speed them up at all since Core's Schnorr stuff differs from Bitcoin Cash's. So Electron Cash will detect that it's on Core, and will fall-back to using python-only Schnorr in that case (slow).
> https://github.com/Electron-Cash/Electron-Cash/issues/2596#issuecomment-1529926625

I assume CashFusion is currently not working either since it's already using the wrong version of the library, so switching to bitcoin-core's libsecp256k1 v0.3.1 should be fine for Electron Cash too.

That leaves the other 10 libbitcoin packages which also depend on libsecp256k1:

- libbitcoin-blockchain
- libbitcoin-client
- libbitcoin-consensus
- libbitcoin-database
- libbitcoin-explorer
- libbitcoin-network
- libbitcoin-node
- libbitcoin-protocol
- libbitcoin-server
- libbitcoin-system

These packages haven't been updated for Void Linux since August 2019, so it seems safe to assume they're not actively used. There are no other packages that depend on any of them. I propose we remove them.

If agreed that we can remove the `libbitcoin`  packages, is it OK to just provide the new .so version from the new package, and remove the old one when updating `removed-packages`? 

> libsecp256k1.so.2 libsecp256k1-0.3.1_1
> libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1

A patch file from https://github.com/void-linux/void-packages/pull/43702.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bitcoin-etc-43702.patch --]
[-- Type: text/x-diff, Size: 9454 bytes --]

From 1d920d67cbeef16820d625fee00b390d50925a15 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Thu, 4 May 2023 19:02:21 +0200
Subject: [PATCH 1/4] libbitcoin-secp256k1: remove package.

An updated version of the libsecp256k1 library is provided via
new libsecp256k1 package (bitcoin-core version).
---
 common/shlibs                         |  1 +
 srcpkgs/libbitcoin-secp256k1-devel    |  1 -
 srcpkgs/libbitcoin-secp256k1/template | 35 ---------------------------
 srcpkgs/removed-packages/template     |  1 +
 4 files changed, 2 insertions(+), 36 deletions(-)
 delete mode 120000 srcpkgs/libbitcoin-secp256k1-devel
 delete mode 100644 srcpkgs/libbitcoin-secp256k1/template

diff --git a/common/shlibs b/common/shlibs
index a64330bd7cb9..811333527664 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3668,6 +3668,7 @@ libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
 libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1
+libsecp256k1.so.2 libsecp256k1-0.3.1_1
 libbitcoin.so.0 libbitcoin-system-3.5.0_1
 libbitcoin-protocol.so.0 libbitcoin-protocol-3.5.0_1
 libbitcoin-client.so.0 libbitcoin-client-3.5.0_1
diff --git a/srcpkgs/libbitcoin-secp256k1-devel b/srcpkgs/libbitcoin-secp256k1-devel
deleted file mode 120000
index 527eb8d59d7e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1-devel
+++ /dev/null
@@ -1 +0,0 @@
-libbitcoin-secp256k1
\ No newline at end of file
diff --git a/srcpkgs/libbitcoin-secp256k1/template b/srcpkgs/libbitcoin-secp256k1/template
deleted file mode 100644
index 42f5ad1ded0e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1/template
+++ /dev/null
@@ -1,35 +0,0 @@
-# Template file for 'libbitcoin-secp256k1'
-pkgname=libbitcoin-secp256k1
-version=0.1.0.13
-revision=1
-build_style=gnu-configure
-configure_args="--disable-benchmark --disable-coverage --disable-jni
- --disable-openssl-tests --enable-exhaustive-tests --enable-module-recovery
- --enable-tests --with-gnu-ld"
-hostmakedepends="autoconf automake libtool m4 pkg-config"
-short_desc="Optimized C library for EC operations on curve secp256k1"
-maintainer="Andy Weidenbaum <atweiden@tutanota.de>"
-license="MIT"
-homepage="https://github.com/libbitcoin/secp256k1"
-distfiles="https://github.com/libbitcoin/secp256k1/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
-checksum=9e48dbc88d0fb5646d40ea12df9375c577f0e77525e49833fb744d3c2a69e727
-
-pre_configure() {
-	./autogen.sh
-}
-
-post_install() {
-	vlicense COPYING
-	vdoc README.md
-}
-
-libbitcoin-secp256k1-devel_package() {
-	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/include
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
-		vmove usr/lib/pkgconfig
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 20453e71a7d8..7ff48cea1dc2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -269,6 +269,7 @@ replaces="
  libapp<=20140527_2
  libco-devel<=20_1
  libco<=20_1
+ libbitcoin-secp256k1<=0.1.0.13_1
  libechonest-qt5<=2.3.1_2
  libechonest-qt5-devel<=2.3.1_2
  libdbusmenu-qt<=0.9.2_4

From a09b15504e07ad9ddbbbe4be5aaad70e6685049a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 17:55:47 +0200
Subject: [PATCH 2/4] New package: libsecp256k1-0.3.1

---
 common/shlibs                 |  1 +
 srcpkgs/libbitcoin-secp256k1  |  1 +
 srcpkgs/libsecp256k1-devel    |  1 +
 srcpkgs/libsecp256k1/template | 41 +++++++++++++++++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 120000 srcpkgs/libbitcoin-secp256k1
 create mode 120000 srcpkgs/libsecp256k1-devel
 create mode 100644 srcpkgs/libsecp256k1/template

diff --git a/common/shlibs b/common/shlibs
index 811333527664..bd28ec42e6c1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3667,6 +3667,7 @@ libdwarves_emit.so.1 pahole-1.12_1
 libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
+libsecp256k1.so.2 libsecp256k1-0.3.1_1
 libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1
 libsecp256k1.so.2 libsecp256k1-0.3.1_1
 libbitcoin.so.0 libbitcoin-system-3.5.0_1
diff --git a/srcpkgs/libbitcoin-secp256k1 b/srcpkgs/libbitcoin-secp256k1
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libbitcoin-secp256k1
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1-devel b/srcpkgs/libsecp256k1-devel
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libsecp256k1-devel
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1/template b/srcpkgs/libsecp256k1/template
new file mode 100644
index 000000000000..31bc89ba72e9
--- /dev/null
+++ b/srcpkgs/libsecp256k1/template
@@ -0,0 +1,41 @@
+# Template file for 'libsecp256k1'
+pkgname=libsecp256k1
+version=0.3.1
+revision=1
+build_style=gnu-configure
+configure_args="--disable-benchmark --disable-coverage --enable-experimental
+ --enable-module-ecdh --enable-module-recovery --enable-tests
+ --enable-exhaustive-tests --with-gnu-ld"
+hostmakedepends="autoconf automake libtool m4 pkg-config"
+short_desc="Optimized C library for EC operations on curve secp256k1"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="MIT"
+homepage="https://github.com/bitcoin-core/secp256k1"
+distfiles="https://github.com/bitcoin-core/secp256k1/archive/v${version}.tar.gz"
+checksum="0e7bb22c29ed6add5e3631e6a9ed0526f3020a20f3b99e6151918fba6cf6affa"
+
+pre_configure() {
+	./autogen.sh
+}
+
+post_install() {
+	vlicense COPYING
+	vdoc README.md
+}
+
+libsecp256k1-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+	}
+}
+
+libbitcoin-secp256k1_package() {
+	depends="libsecp256k1"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
+}

From bf9cce78c34db7600b1fcd0cecf2007ff8468859 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 16:13:03 +0200
Subject: [PATCH 3/4] electrum: update to 4.4.1; use bitcoin-core libsecp256k1

---
 srcpkgs/electrum/template | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template
index dcabed755423..702a2ec7c280 100644
--- a/srcpkgs/electrum/template
+++ b/srcpkgs/electrum/template
@@ -1,14 +1,14 @@
 # Template file for 'electrum'
 pkgname=electrum
-version=4.2.0
-revision=3
+version=4.4.1
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx
  python3-bitstring python3-dnspython python3-ecdsa python3-jsonrpclib
  python3-protobuf python3-pyaes python3-pycryptodomex python3-PyQt5
- python3-qrcode python3-socks python3-cryptography libbitcoin-secp256k1
- python3-certifi"
+ python3-qrcode python3-socks python3-cryptography libsecp256k1
+ python3-certifi libzbar"
 # Optional dependencies:
 #  btchip - BTChip hardware wallet support
 #  trezor - TREZOR hardware wallet support
@@ -19,8 +19,9 @@ short_desc="Lightweight Bitcoin wallet"
 maintainer="Charles E. Lehner <cel@celehner.com>"
 license="MIT"
 homepage="https://electrum.org/"
+changelog="https://raw.githubusercontent.com/spesmilo/electrum/master/RELEASE-NOTES"
 distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz"
-checksum=3a24c7ed7a2bb47888f308380b8624a3fff3cf3882fd63d904cd9c3ec543fb3b
+checksum=62b7978f880657e272aac23096258e7f9c6a6940731de61c69a4e673f5ac6aa0
 
 post_install() {
 	vsed -i -e 's|electrum %u|electrum|' \

From ee9f3c97012f8165cf7cc92fd9e950d548a3a82b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 19:29:16 +0200
Subject: [PATCH 4/4] Electron-Cash: update to 4.2.14; use bitcoin-core
 libsecp256k1

---
 srcpkgs/Electron-Cash/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Electron-Cash/template b/srcpkgs/Electron-Cash/template
index 38ca3449b093..a858e3d68cea 100644
--- a/srcpkgs/Electron-Cash/template
+++ b/srcpkgs/Electron-Cash/template
@@ -1,20 +1,20 @@
 # Template file for 'Electron-Cash'
 pkgname=Electron-Cash
-version=4.2.10
-revision=3
+version=4.2.14
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-PyQt5 python3-PyQt5-svg python3-qrcode python3-dateutil
  python3-jsonrpclib python3-protobuf
  python3-dnspython python3-requests python3-pysocks python3-stem
- python3-ecdsa python3-pyaes python3-pycryptodomex libbitcoin-secp256k1 libzbar
+ python3-ecdsa python3-pyaes python3-pycryptodomex libsecp256k1 libzbar
  python3-cryptography>=2.6 python3-pathvalidate python3-psutil"
 short_desc="Lightweight Bitcoin Cash client"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://electroncash.org"
 distfiles="https://github.com/Electron-Cash/Electron-Cash/releases/download/${version}/Electron-Cash-${version}.tar.gz"
-checksum=2c77258c0e8ccdc42d16cd9bdbc26b47f94b92d9ba8a86d63c25a17ec832b324
+checksum=2b987e7074add9631865ee0bd704c4cd8d736945edc5ed038009d00b3aaa2afb
 make_check=no # Depends on unpackaged SimpleWebSocketServer
 
 post_install() {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (3 preceding siblings ...)
  2023-05-06 12:41 ` [PR PATCH] [Updated] " ar-jan
@ 2023-05-06 12:54 ` ar-jan
  2023-05-15 20:32 ` [PR PATCH] [Updated] Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update " ar-jan
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-06 12:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/43702#issuecomment-1537136251

Comment:
Waiting for #43713 and removal of the packages from the repository index.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (4 preceding siblings ...)
  2023-05-06 12:54 ` ar-jan
@ 2023-05-15 20:32 ` ar-jan
  2023-05-15 20:56 ` ar-jan
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-15 20:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2749 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages bitcoin-etc
https://github.com/void-linux/void-packages/pull/43702

Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package: libsecp256k1
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Electrum v4.4.1 moved to using libsecp256k1 0.3.1 (`libsecp256k1.so.2`).

Void's current libsecp256k1 is from https://github.com/libbitcoin/secp256k1, which is extremely outdated.
I believe this was originally used because back then https://github.com/bitcoin-core/secp256k1 was too unstable and did not provide tagged releases. Now they do, so we should move to that.

The only two packages which use libsecp256k1 are `electrum` and `Electron-Cash` (besides the other `libbitcoin-*` packages).

Electron Cash can also use bitcoin-core's libsecp256k1 v0.3.1, although it actually needs https://github.com/Bitcoin-ABC/secp256k1 or Electron Cash's own fork for full functionality (CashFusion would not work):
> you CAN use the Core version, and it will speed-up ECDSA sigs.. but then for Schnorr sigs it won't speed them up at all since Core's Schnorr stuff differs from Bitcoin Cash's. So Electron Cash will detect that it's on Core, and will fall-back to using python-only Schnorr in that case (slow).
> https://github.com/Electron-Cash/Electron-Cash/issues/2596#issuecomment-1529926625

I assume CashFusion is currently not working either since it's already using the wrong version of the library, so switching to bitcoin-core's libsecp256k1 v0.3.1 should be fine for Electron Cash too.

That leaves the other 10 libbitcoin packages which also depend on libsecp256k1:

- libbitcoin-blockchain
- libbitcoin-client
- libbitcoin-consensus
- libbitcoin-database
- libbitcoin-explorer
- libbitcoin-network
- libbitcoin-node
- libbitcoin-protocol
- libbitcoin-server
- libbitcoin-system

These packages haven't been updated for Void Linux since August 2019, so it seems safe to assume they're not actively used. There are no other packages that depend on any of them. I propose we remove them.

If agreed that we can remove the `libbitcoin`  packages, is it OK to just provide the new .so version from the new package, and remove the old one when updating `removed-packages`? 

> libsecp256k1.so.2 libsecp256k1-0.3.1_1
> libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1

A patch file from https://github.com/void-linux/void-packages/pull/43702.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bitcoin-etc-43702.patch --]
[-- Type: text/x-diff, Size: 9677 bytes --]

From 2c4338ce253c308ad4641b90ccda675e93bc2f0c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Thu, 4 May 2023 19:02:21 +0200
Subject: [PATCH 1/4] libbitcoin-secp256k1: remove package.

An updated version of the libsecp256k1 library is provided via
new libsecp256k1 package (bitcoin-core version).
---
 common/shlibs                         |  6 +++++
 srcpkgs/libbitcoin-secp256k1-devel    |  1 -
 srcpkgs/libbitcoin-secp256k1/template | 35 ---------------------------
 srcpkgs/removed-packages/template     |  1 +
 4 files changed, 7 insertions(+), 36 deletions(-)
 delete mode 120000 srcpkgs/libbitcoin-secp256k1-devel
 delete mode 100644 srcpkgs/libbitcoin-secp256k1/template

diff --git a/common/shlibs b/common/shlibs
index da8b12690cb6..fe31bfe223b3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3669,6 +3669,12 @@ libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
 libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1
+libsecp256k1.so.2 libsecp256k1-0.3.1_1
+libbitcoin.so.0 libbitcoin-system-3.5.0_1
+libbitcoin-protocol.so.0 libbitcoin-protocol-3.5.0_1
+libbitcoin-client.so.0 libbitcoin-client-3.5.0_1
+libbitcoin-network.so.0 libbitcoin-network-3.5.0_1
+libbitcoin-explorer.so.0 libbitcoin-explorer-3.5.0_1
 libltc.so.11 libltc-1.3.1_1
 libvpd-2.2.so.2 libvpd-2.2.6_1
 libvpd_cxx-2.2.so.2 libvpd-2.2.6_1
diff --git a/srcpkgs/libbitcoin-secp256k1-devel b/srcpkgs/libbitcoin-secp256k1-devel
deleted file mode 120000
index 527eb8d59d7e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1-devel
+++ /dev/null
@@ -1 +0,0 @@
-libbitcoin-secp256k1
\ No newline at end of file
diff --git a/srcpkgs/libbitcoin-secp256k1/template b/srcpkgs/libbitcoin-secp256k1/template
deleted file mode 100644
index 42f5ad1ded0e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1/template
+++ /dev/null
@@ -1,35 +0,0 @@
-# Template file for 'libbitcoin-secp256k1'
-pkgname=libbitcoin-secp256k1
-version=0.1.0.13
-revision=1
-build_style=gnu-configure
-configure_args="--disable-benchmark --disable-coverage --disable-jni
- --disable-openssl-tests --enable-exhaustive-tests --enable-module-recovery
- --enable-tests --with-gnu-ld"
-hostmakedepends="autoconf automake libtool m4 pkg-config"
-short_desc="Optimized C library for EC operations on curve secp256k1"
-maintainer="Andy Weidenbaum <atweiden@tutanota.de>"
-license="MIT"
-homepage="https://github.com/libbitcoin/secp256k1"
-distfiles="https://github.com/libbitcoin/secp256k1/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
-checksum=9e48dbc88d0fb5646d40ea12df9375c577f0e77525e49833fb744d3c2a69e727
-
-pre_configure() {
-	./autogen.sh
-}
-
-post_install() {
-	vlicense COPYING
-	vdoc README.md
-}
-
-libbitcoin-secp256k1-devel_package() {
-	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/include
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
-		vmove usr/lib/pkgconfig
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ec0ddd9262f1..90d5339e7ef7 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -290,6 +290,7 @@ replaces="
  libbitcoin-system-devel<=3.6.0_10
  libco-devel<=20_1
  libco<=20_1
+ libbitcoin-secp256k1<=0.1.0.13_1
  libechonest-qt5<=2.3.1_2
  libechonest-qt5-devel<=2.3.1_2
  libdbusmenu-qt<=0.9.2_4

From 9eda704b27e45ed4defea61d503f98faa11ed35b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 17:55:47 +0200
Subject: [PATCH 2/4] New package: libsecp256k1-0.3.1

---
 common/shlibs                 |  1 +
 srcpkgs/libbitcoin-secp256k1  |  1 +
 srcpkgs/libsecp256k1-devel    |  1 +
 srcpkgs/libsecp256k1/template | 41 +++++++++++++++++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 120000 srcpkgs/libbitcoin-secp256k1
 create mode 120000 srcpkgs/libsecp256k1-devel
 create mode 100644 srcpkgs/libsecp256k1/template

diff --git a/common/shlibs b/common/shlibs
index fe31bfe223b3..d388321ee989 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3668,6 +3668,7 @@ libdwarves_emit.so.1 pahole-1.12_1
 libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
+libsecp256k1.so.2 libsecp256k1-0.3.1_1
 libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1
 libsecp256k1.so.2 libsecp256k1-0.3.1_1
 libbitcoin.so.0 libbitcoin-system-3.5.0_1
diff --git a/srcpkgs/libbitcoin-secp256k1 b/srcpkgs/libbitcoin-secp256k1
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libbitcoin-secp256k1
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1-devel b/srcpkgs/libsecp256k1-devel
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libsecp256k1-devel
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1/template b/srcpkgs/libsecp256k1/template
new file mode 100644
index 000000000000..31bc89ba72e9
--- /dev/null
+++ b/srcpkgs/libsecp256k1/template
@@ -0,0 +1,41 @@
+# Template file for 'libsecp256k1'
+pkgname=libsecp256k1
+version=0.3.1
+revision=1
+build_style=gnu-configure
+configure_args="--disable-benchmark --disable-coverage --enable-experimental
+ --enable-module-ecdh --enable-module-recovery --enable-tests
+ --enable-exhaustive-tests --with-gnu-ld"
+hostmakedepends="autoconf automake libtool m4 pkg-config"
+short_desc="Optimized C library for EC operations on curve secp256k1"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="MIT"
+homepage="https://github.com/bitcoin-core/secp256k1"
+distfiles="https://github.com/bitcoin-core/secp256k1/archive/v${version}.tar.gz"
+checksum="0e7bb22c29ed6add5e3631e6a9ed0526f3020a20f3b99e6151918fba6cf6affa"
+
+pre_configure() {
+	./autogen.sh
+}
+
+post_install() {
+	vlicense COPYING
+	vdoc README.md
+}
+
+libsecp256k1-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+	}
+}
+
+libbitcoin-secp256k1_package() {
+	depends="libsecp256k1"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
+}

From 871797107f85b0f37a937795686eaf2bade555f5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 16:13:03 +0200
Subject: [PATCH 3/4] electrum: update to 4.4.1; use bitcoin-core libsecp256k1

---
 srcpkgs/electrum/template | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template
index dcabed755423..702a2ec7c280 100644
--- a/srcpkgs/electrum/template
+++ b/srcpkgs/electrum/template
@@ -1,14 +1,14 @@
 # Template file for 'electrum'
 pkgname=electrum
-version=4.2.0
-revision=3
+version=4.4.1
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx
  python3-bitstring python3-dnspython python3-ecdsa python3-jsonrpclib
  python3-protobuf python3-pyaes python3-pycryptodomex python3-PyQt5
- python3-qrcode python3-socks python3-cryptography libbitcoin-secp256k1
- python3-certifi"
+ python3-qrcode python3-socks python3-cryptography libsecp256k1
+ python3-certifi libzbar"
 # Optional dependencies:
 #  btchip - BTChip hardware wallet support
 #  trezor - TREZOR hardware wallet support
@@ -19,8 +19,9 @@ short_desc="Lightweight Bitcoin wallet"
 maintainer="Charles E. Lehner <cel@celehner.com>"
 license="MIT"
 homepage="https://electrum.org/"
+changelog="https://raw.githubusercontent.com/spesmilo/electrum/master/RELEASE-NOTES"
 distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz"
-checksum=3a24c7ed7a2bb47888f308380b8624a3fff3cf3882fd63d904cd9c3ec543fb3b
+checksum=62b7978f880657e272aac23096258e7f9c6a6940731de61c69a4e673f5ac6aa0
 
 post_install() {
 	vsed -i -e 's|electrum %u|electrum|' \

From 8cf706467d558cc958fdee3cc0bec9207c59f74d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 19:29:16 +0200
Subject: [PATCH 4/4] Electron-Cash: update to 4.2.14; use bitcoin-core
 libsecp256k1

---
 srcpkgs/Electron-Cash/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Electron-Cash/template b/srcpkgs/Electron-Cash/template
index 38ca3449b093..a858e3d68cea 100644
--- a/srcpkgs/Electron-Cash/template
+++ b/srcpkgs/Electron-Cash/template
@@ -1,20 +1,20 @@
 # Template file for 'Electron-Cash'
 pkgname=Electron-Cash
-version=4.2.10
-revision=3
+version=4.2.14
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-PyQt5 python3-PyQt5-svg python3-qrcode python3-dateutil
  python3-jsonrpclib python3-protobuf
  python3-dnspython python3-requests python3-pysocks python3-stem
- python3-ecdsa python3-pyaes python3-pycryptodomex libbitcoin-secp256k1 libzbar
+ python3-ecdsa python3-pyaes python3-pycryptodomex libsecp256k1 libzbar
  python3-cryptography>=2.6 python3-pathvalidate python3-psutil"
 short_desc="Lightweight Bitcoin Cash client"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://electroncash.org"
 distfiles="https://github.com/Electron-Cash/Electron-Cash/releases/download/${version}/Electron-Cash-${version}.tar.gz"
-checksum=2c77258c0e8ccdc42d16cd9bdbc26b47f94b92d9ba8a86d63c25a17ec832b324
+checksum=2b987e7074add9631865ee0bd704c4cd8d736945edc5ed038009d00b3aaa2afb
 make_check=no # Depends on unpackaged SimpleWebSocketServer
 
 post_install() {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (5 preceding siblings ...)
  2023-05-15 20:32 ` [PR PATCH] [Updated] Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update " ar-jan
@ 2023-05-15 20:56 ` ar-jan
  2023-05-15 21:05 ` ar-jan
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-15 20:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2749 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages bitcoin-etc
https://github.com/void-linux/void-packages/pull/43702

Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package: libsecp256k1
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Electrum v4.4.1 moved to using libsecp256k1 0.3.1 (`libsecp256k1.so.2`).

Void's current libsecp256k1 is from https://github.com/libbitcoin/secp256k1, which is extremely outdated.
I believe this was originally used because back then https://github.com/bitcoin-core/secp256k1 was too unstable and did not provide tagged releases. Now they do, so we should move to that.

The only two packages which use libsecp256k1 are `electrum` and `Electron-Cash` (besides the other `libbitcoin-*` packages).

Electron Cash can also use bitcoin-core's libsecp256k1 v0.3.1, although it actually needs https://github.com/Bitcoin-ABC/secp256k1 or Electron Cash's own fork for full functionality (CashFusion would not work):
> you CAN use the Core version, and it will speed-up ECDSA sigs.. but then for Schnorr sigs it won't speed them up at all since Core's Schnorr stuff differs from Bitcoin Cash's. So Electron Cash will detect that it's on Core, and will fall-back to using python-only Schnorr in that case (slow).
> https://github.com/Electron-Cash/Electron-Cash/issues/2596#issuecomment-1529926625

I assume CashFusion is currently not working either since it's already using the wrong version of the library, so switching to bitcoin-core's libsecp256k1 v0.3.1 should be fine for Electron Cash too.

That leaves the other 10 libbitcoin packages which also depend on libsecp256k1:

- libbitcoin-blockchain
- libbitcoin-client
- libbitcoin-consensus
- libbitcoin-database
- libbitcoin-explorer
- libbitcoin-network
- libbitcoin-node
- libbitcoin-protocol
- libbitcoin-server
- libbitcoin-system

These packages haven't been updated for Void Linux since August 2019, so it seems safe to assume they're not actively used. There are no other packages that depend on any of them. I propose we remove them.

If agreed that we can remove the `libbitcoin`  packages, is it OK to just provide the new .so version from the new package, and remove the old one when updating `removed-packages`? 

> libsecp256k1.so.2 libsecp256k1-0.3.1_1
> libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1

A patch file from https://github.com/void-linux/void-packages/pull/43702.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bitcoin-etc-43702.patch --]
[-- Type: text/x-diff, Size: 9377 bytes --]

From 98cdf813e462889a5669265a318cf59a16af4087 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Thu, 4 May 2023 19:02:21 +0200
Subject: [PATCH 1/4] libbitcoin-secp256k1: remove package.

An updated version of the libsecp256k1 library is provided via
new libsecp256k1 package (bitcoin-core version).
---
 common/shlibs                         |  1 -
 srcpkgs/libbitcoin-secp256k1-devel    |  1 -
 srcpkgs/libbitcoin-secp256k1/template | 35 ---------------------------
 srcpkgs/removed-packages/template     |  1 +
 4 files changed, 1 insertion(+), 37 deletions(-)
 delete mode 120000 srcpkgs/libbitcoin-secp256k1-devel
 delete mode 100644 srcpkgs/libbitcoin-secp256k1/template

diff --git a/common/shlibs b/common/shlibs
index da8b12690cb6..a32d33d3cd32 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3668,7 +3668,6 @@ libdwarves_emit.so.1 pahole-1.12_1
 libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
-libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1
 libltc.so.11 libltc-1.3.1_1
 libvpd-2.2.so.2 libvpd-2.2.6_1
 libvpd_cxx-2.2.so.2 libvpd-2.2.6_1
diff --git a/srcpkgs/libbitcoin-secp256k1-devel b/srcpkgs/libbitcoin-secp256k1-devel
deleted file mode 120000
index 527eb8d59d7e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1-devel
+++ /dev/null
@@ -1 +0,0 @@
-libbitcoin-secp256k1
\ No newline at end of file
diff --git a/srcpkgs/libbitcoin-secp256k1/template b/srcpkgs/libbitcoin-secp256k1/template
deleted file mode 100644
index 42f5ad1ded0e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1/template
+++ /dev/null
@@ -1,35 +0,0 @@
-# Template file for 'libbitcoin-secp256k1'
-pkgname=libbitcoin-secp256k1
-version=0.1.0.13
-revision=1
-build_style=gnu-configure
-configure_args="--disable-benchmark --disable-coverage --disable-jni
- --disable-openssl-tests --enable-exhaustive-tests --enable-module-recovery
- --enable-tests --with-gnu-ld"
-hostmakedepends="autoconf automake libtool m4 pkg-config"
-short_desc="Optimized C library for EC operations on curve secp256k1"
-maintainer="Andy Weidenbaum <atweiden@tutanota.de>"
-license="MIT"
-homepage="https://github.com/libbitcoin/secp256k1"
-distfiles="https://github.com/libbitcoin/secp256k1/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
-checksum=9e48dbc88d0fb5646d40ea12df9375c577f0e77525e49833fb744d3c2a69e727
-
-pre_configure() {
-	./autogen.sh
-}
-
-post_install() {
-	vlicense COPYING
-	vdoc README.md
-}
-
-libbitcoin-secp256k1-devel_package() {
-	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/include
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
-		vmove usr/lib/pkgconfig
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ec0ddd9262f1..90d5339e7ef7 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -290,6 +290,7 @@ replaces="
  libbitcoin-system-devel<=3.6.0_10
  libco-devel<=20_1
  libco<=20_1
+ libbitcoin-secp256k1<=0.1.0.13_1
  libechonest-qt5<=2.3.1_2
  libechonest-qt5-devel<=2.3.1_2
  libdbusmenu-qt<=0.9.2_4

From 6bbf1a18a996bc0b669af32afec36aa4cef7cdf2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 17:55:47 +0200
Subject: [PATCH 2/4] New package: libsecp256k1-0.3.2

---
 common/shlibs                 |  1 +
 srcpkgs/libbitcoin-secp256k1  |  1 +
 srcpkgs/libsecp256k1-devel    |  1 +
 srcpkgs/libsecp256k1/template | 41 +++++++++++++++++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 120000 srcpkgs/libbitcoin-secp256k1
 create mode 120000 srcpkgs/libsecp256k1-devel
 create mode 100644 srcpkgs/libsecp256k1/template

diff --git a/common/shlibs b/common/shlibs
index a32d33d3cd32..da48e31bdf99 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3668,6 +3668,7 @@ libdwarves_emit.so.1 pahole-1.12_1
 libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
+libsecp256k1.so.2 libsecp256k1-0.3.2_1
 libltc.so.11 libltc-1.3.1_1
 libvpd-2.2.so.2 libvpd-2.2.6_1
 libvpd_cxx-2.2.so.2 libvpd-2.2.6_1
diff --git a/srcpkgs/libbitcoin-secp256k1 b/srcpkgs/libbitcoin-secp256k1
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libbitcoin-secp256k1
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1-devel b/srcpkgs/libsecp256k1-devel
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libsecp256k1-devel
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1/template b/srcpkgs/libsecp256k1/template
new file mode 100644
index 000000000000..0d0ad3245359
--- /dev/null
+++ b/srcpkgs/libsecp256k1/template
@@ -0,0 +1,41 @@
+# Template file for 'libsecp256k1'
+pkgname=libsecp256k1
+version=0.3.2
+revision=1
+build_style=gnu-configure
+configure_args="--disable-benchmark --disable-coverage --enable-experimental
+ --enable-module-ecdh --enable-module-recovery --enable-tests
+ --enable-exhaustive-tests --with-gnu-ld"
+hostmakedepends="autoconf automake libtool m4 pkg-config"
+short_desc="Optimized C library for EC operations on curve secp256k1"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="MIT"
+homepage="https://github.com/bitcoin-core/secp256k1"
+distfiles="https://github.com/bitcoin-core/secp256k1/archive/v${version}.tar.gz"
+checksum="ef2e1061951b8cf94a7597b4e60fd7810613e327e25305e8d73dfdff67d12190"
+
+pre_configure() {
+	./autogen.sh
+}
+
+post_install() {
+	vlicense COPYING
+	vdoc README.md
+}
+
+libsecp256k1-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+	}
+}
+
+libbitcoin-secp256k1_package() {
+	depends="libsecp256k1"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
+}

From 491073b34e03c113b82df4027cc73631cf8136c7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 16:13:03 +0200
Subject: [PATCH 3/4] electrum: update to 4.4.1; use bitcoin-core libsecp256k1

---
 srcpkgs/electrum/template | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template
index dcabed755423..702a2ec7c280 100644
--- a/srcpkgs/electrum/template
+++ b/srcpkgs/electrum/template
@@ -1,14 +1,14 @@
 # Template file for 'electrum'
 pkgname=electrum
-version=4.2.0
-revision=3
+version=4.4.1
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx
  python3-bitstring python3-dnspython python3-ecdsa python3-jsonrpclib
  python3-protobuf python3-pyaes python3-pycryptodomex python3-PyQt5
- python3-qrcode python3-socks python3-cryptography libbitcoin-secp256k1
- python3-certifi"
+ python3-qrcode python3-socks python3-cryptography libsecp256k1
+ python3-certifi libzbar"
 # Optional dependencies:
 #  btchip - BTChip hardware wallet support
 #  trezor - TREZOR hardware wallet support
@@ -19,8 +19,9 @@ short_desc="Lightweight Bitcoin wallet"
 maintainer="Charles E. Lehner <cel@celehner.com>"
 license="MIT"
 homepage="https://electrum.org/"
+changelog="https://raw.githubusercontent.com/spesmilo/electrum/master/RELEASE-NOTES"
 distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz"
-checksum=3a24c7ed7a2bb47888f308380b8624a3fff3cf3882fd63d904cd9c3ec543fb3b
+checksum=62b7978f880657e272aac23096258e7f9c6a6940731de61c69a4e673f5ac6aa0
 
 post_install() {
 	vsed -i -e 's|electrum %u|electrum|' \

From cf08a5fe126f6d7a82b125dde4e9b9cb7c814148 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 19:29:16 +0200
Subject: [PATCH 4/4] Electron-Cash: update to 4.2.14; use bitcoin-core
 libsecp256k1

---
 srcpkgs/Electron-Cash/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Electron-Cash/template b/srcpkgs/Electron-Cash/template
index 38ca3449b093..a858e3d68cea 100644
--- a/srcpkgs/Electron-Cash/template
+++ b/srcpkgs/Electron-Cash/template
@@ -1,20 +1,20 @@
 # Template file for 'Electron-Cash'
 pkgname=Electron-Cash
-version=4.2.10
-revision=3
+version=4.2.14
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-PyQt5 python3-PyQt5-svg python3-qrcode python3-dateutil
  python3-jsonrpclib python3-protobuf
  python3-dnspython python3-requests python3-pysocks python3-stem
- python3-ecdsa python3-pyaes python3-pycryptodomex libbitcoin-secp256k1 libzbar
+ python3-ecdsa python3-pyaes python3-pycryptodomex libsecp256k1 libzbar
  python3-cryptography>=2.6 python3-pathvalidate python3-psutil"
 short_desc="Lightweight Bitcoin Cash client"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://electroncash.org"
 distfiles="https://github.com/Electron-Cash/Electron-Cash/releases/download/${version}/Electron-Cash-${version}.tar.gz"
-checksum=2c77258c0e8ccdc42d16cd9bdbc26b47f94b92d9ba8a86d63c25a17ec832b324
+checksum=2b987e7074add9631865ee0bd704c4cd8d736945edc5ed038009d00b3aaa2afb
 make_check=no # Depends on unpackaged SimpleWebSocketServer
 
 post_install() {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (6 preceding siblings ...)
  2023-05-15 20:56 ` ar-jan
@ 2023-05-15 21:05 ` ar-jan
  2023-05-16 18:14 ` [PR PATCH] [Updated] " ar-jan
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-15 21:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 247 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/43702#issuecomment-1548576723

Comment:
Looks like the old `libbitcoin-*` packages need to be removed from the repository index for tests to pass?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (7 preceding siblings ...)
  2023-05-15 21:05 ` ar-jan
@ 2023-05-16 18:14 ` ar-jan
  2023-05-16 19:06 ` ar-jan
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-16 18:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2749 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages bitcoin-etc
https://github.com/void-linux/void-packages/pull/43702

Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package: libsecp256k1
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Electrum v4.4.1 moved to using libsecp256k1 0.3.1 (`libsecp256k1.so.2`).

Void's current libsecp256k1 is from https://github.com/libbitcoin/secp256k1, which is extremely outdated.
I believe this was originally used because back then https://github.com/bitcoin-core/secp256k1 was too unstable and did not provide tagged releases. Now they do, so we should move to that.

The only two packages which use libsecp256k1 are `electrum` and `Electron-Cash` (besides the other `libbitcoin-*` packages).

Electron Cash can also use bitcoin-core's libsecp256k1 v0.3.1, although it actually needs https://github.com/Bitcoin-ABC/secp256k1 or Electron Cash's own fork for full functionality (CashFusion would not work):
> you CAN use the Core version, and it will speed-up ECDSA sigs.. but then for Schnorr sigs it won't speed them up at all since Core's Schnorr stuff differs from Bitcoin Cash's. So Electron Cash will detect that it's on Core, and will fall-back to using python-only Schnorr in that case (slow).
> https://github.com/Electron-Cash/Electron-Cash/issues/2596#issuecomment-1529926625

I assume CashFusion is currently not working either since it's already using the wrong version of the library, so switching to bitcoin-core's libsecp256k1 v0.3.1 should be fine for Electron Cash too.

That leaves the other 10 libbitcoin packages which also depend on libsecp256k1:

- libbitcoin-blockchain
- libbitcoin-client
- libbitcoin-consensus
- libbitcoin-database
- libbitcoin-explorer
- libbitcoin-network
- libbitcoin-node
- libbitcoin-protocol
- libbitcoin-server
- libbitcoin-system

These packages haven't been updated for Void Linux since August 2019, so it seems safe to assume they're not actively used. There are no other packages that depend on any of them. I propose we remove them.

If agreed that we can remove the `libbitcoin`  packages, is it OK to just provide the new .so version from the new package, and remove the old one when updating `removed-packages`? 

> libsecp256k1.so.2 libsecp256k1-0.3.1_1
> libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1

A patch file from https://github.com/void-linux/void-packages/pull/43702.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bitcoin-etc-43702.patch --]
[-- Type: text/x-diff, Size: 9377 bytes --]

From 242719b697c94eeb1b6ecd5bdf0b796a90d60b27 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Thu, 4 May 2023 19:02:21 +0200
Subject: [PATCH 1/4] libbitcoin-secp256k1: remove package.

An updated version of the libsecp256k1 library is provided via
new libsecp256k1 package (bitcoin-core version).
---
 common/shlibs                         |  1 -
 srcpkgs/libbitcoin-secp256k1-devel    |  1 -
 srcpkgs/libbitcoin-secp256k1/template | 35 ---------------------------
 srcpkgs/removed-packages/template     |  1 +
 4 files changed, 1 insertion(+), 37 deletions(-)
 delete mode 120000 srcpkgs/libbitcoin-secp256k1-devel
 delete mode 100644 srcpkgs/libbitcoin-secp256k1/template

diff --git a/common/shlibs b/common/shlibs
index da8b12690cb6..a32d33d3cd32 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3668,7 +3668,6 @@ libdwarves_emit.so.1 pahole-1.12_1
 libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
-libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1
 libltc.so.11 libltc-1.3.1_1
 libvpd-2.2.so.2 libvpd-2.2.6_1
 libvpd_cxx-2.2.so.2 libvpd-2.2.6_1
diff --git a/srcpkgs/libbitcoin-secp256k1-devel b/srcpkgs/libbitcoin-secp256k1-devel
deleted file mode 120000
index 527eb8d59d7e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1-devel
+++ /dev/null
@@ -1 +0,0 @@
-libbitcoin-secp256k1
\ No newline at end of file
diff --git a/srcpkgs/libbitcoin-secp256k1/template b/srcpkgs/libbitcoin-secp256k1/template
deleted file mode 100644
index 42f5ad1ded0e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1/template
+++ /dev/null
@@ -1,35 +0,0 @@
-# Template file for 'libbitcoin-secp256k1'
-pkgname=libbitcoin-secp256k1
-version=0.1.0.13
-revision=1
-build_style=gnu-configure
-configure_args="--disable-benchmark --disable-coverage --disable-jni
- --disable-openssl-tests --enable-exhaustive-tests --enable-module-recovery
- --enable-tests --with-gnu-ld"
-hostmakedepends="autoconf automake libtool m4 pkg-config"
-short_desc="Optimized C library for EC operations on curve secp256k1"
-maintainer="Andy Weidenbaum <atweiden@tutanota.de>"
-license="MIT"
-homepage="https://github.com/libbitcoin/secp256k1"
-distfiles="https://github.com/libbitcoin/secp256k1/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
-checksum=9e48dbc88d0fb5646d40ea12df9375c577f0e77525e49833fb744d3c2a69e727
-
-pre_configure() {
-	./autogen.sh
-}
-
-post_install() {
-	vlicense COPYING
-	vdoc README.md
-}
-
-libbitcoin-secp256k1-devel_package() {
-	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/include
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
-		vmove usr/lib/pkgconfig
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index ec0ddd9262f1..90d5339e7ef7 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -290,6 +290,7 @@ replaces="
  libbitcoin-system-devel<=3.6.0_10
  libco-devel<=20_1
  libco<=20_1
+ libbitcoin-secp256k1<=0.1.0.13_1
  libechonest-qt5<=2.3.1_2
  libechonest-qt5-devel<=2.3.1_2
  libdbusmenu-qt<=0.9.2_4

From 3922c9c9e04344952526bd8afac9dade39ac3c0b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 17:55:47 +0200
Subject: [PATCH 2/4] New package: libsecp256k1-0.3.2

---
 common/shlibs                 |  1 +
 srcpkgs/libbitcoin-secp256k1  |  1 +
 srcpkgs/libsecp256k1-devel    |  1 +
 srcpkgs/libsecp256k1/template | 41 +++++++++++++++++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 120000 srcpkgs/libbitcoin-secp256k1
 create mode 120000 srcpkgs/libsecp256k1-devel
 create mode 100644 srcpkgs/libsecp256k1/template

diff --git a/common/shlibs b/common/shlibs
index a32d33d3cd32..da48e31bdf99 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3668,6 +3668,7 @@ libdwarves_emit.so.1 pahole-1.12_1
 libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
+libsecp256k1.so.2 libsecp256k1-0.3.2_1
 libltc.so.11 libltc-1.3.1_1
 libvpd-2.2.so.2 libvpd-2.2.6_1
 libvpd_cxx-2.2.so.2 libvpd-2.2.6_1
diff --git a/srcpkgs/libbitcoin-secp256k1 b/srcpkgs/libbitcoin-secp256k1
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libbitcoin-secp256k1
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1-devel b/srcpkgs/libsecp256k1-devel
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libsecp256k1-devel
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1/template b/srcpkgs/libsecp256k1/template
new file mode 100644
index 000000000000..0d0ad3245359
--- /dev/null
+++ b/srcpkgs/libsecp256k1/template
@@ -0,0 +1,41 @@
+# Template file for 'libsecp256k1'
+pkgname=libsecp256k1
+version=0.3.2
+revision=1
+build_style=gnu-configure
+configure_args="--disable-benchmark --disable-coverage --enable-experimental
+ --enable-module-ecdh --enable-module-recovery --enable-tests
+ --enable-exhaustive-tests --with-gnu-ld"
+hostmakedepends="autoconf automake libtool m4 pkg-config"
+short_desc="Optimized C library for EC operations on curve secp256k1"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="MIT"
+homepage="https://github.com/bitcoin-core/secp256k1"
+distfiles="https://github.com/bitcoin-core/secp256k1/archive/v${version}.tar.gz"
+checksum="ef2e1061951b8cf94a7597b4e60fd7810613e327e25305e8d73dfdff67d12190"
+
+pre_configure() {
+	./autogen.sh
+}
+
+post_install() {
+	vlicense COPYING
+	vdoc README.md
+}
+
+libsecp256k1-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+	}
+}
+
+libbitcoin-secp256k1_package() {
+	depends="libsecp256k1"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
+}

From 30c0508e74f98016e075dbd295bcbea345ae15c8 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 16:13:03 +0200
Subject: [PATCH 3/4] electrum: update to 4.4.1; use bitcoin-core libsecp256k1

---
 srcpkgs/electrum/template | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template
index dcabed755423..702a2ec7c280 100644
--- a/srcpkgs/electrum/template
+++ b/srcpkgs/electrum/template
@@ -1,14 +1,14 @@
 # Template file for 'electrum'
 pkgname=electrum
-version=4.2.0
-revision=3
+version=4.4.1
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx
  python3-bitstring python3-dnspython python3-ecdsa python3-jsonrpclib
  python3-protobuf python3-pyaes python3-pycryptodomex python3-PyQt5
- python3-qrcode python3-socks python3-cryptography libbitcoin-secp256k1
- python3-certifi"
+ python3-qrcode python3-socks python3-cryptography libsecp256k1
+ python3-certifi libzbar"
 # Optional dependencies:
 #  btchip - BTChip hardware wallet support
 #  trezor - TREZOR hardware wallet support
@@ -19,8 +19,9 @@ short_desc="Lightweight Bitcoin wallet"
 maintainer="Charles E. Lehner <cel@celehner.com>"
 license="MIT"
 homepage="https://electrum.org/"
+changelog="https://raw.githubusercontent.com/spesmilo/electrum/master/RELEASE-NOTES"
 distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz"
-checksum=3a24c7ed7a2bb47888f308380b8624a3fff3cf3882fd63d904cd9c3ec543fb3b
+checksum=62b7978f880657e272aac23096258e7f9c6a6940731de61c69a4e673f5ac6aa0
 
 post_install() {
 	vsed -i -e 's|electrum %u|electrum|' \

From e20d16253e9a686bfe3e6f79e47d0e11945f243e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 19:29:16 +0200
Subject: [PATCH 4/4] Electron-Cash: update to 4.2.14; use bitcoin-core
 libsecp256k1

---
 srcpkgs/Electron-Cash/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Electron-Cash/template b/srcpkgs/Electron-Cash/template
index 38ca3449b093..a858e3d68cea 100644
--- a/srcpkgs/Electron-Cash/template
+++ b/srcpkgs/Electron-Cash/template
@@ -1,20 +1,20 @@
 # Template file for 'Electron-Cash'
 pkgname=Electron-Cash
-version=4.2.10
-revision=3
+version=4.2.14
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-PyQt5 python3-PyQt5-svg python3-qrcode python3-dateutil
  python3-jsonrpclib python3-protobuf
  python3-dnspython python3-requests python3-pysocks python3-stem
- python3-ecdsa python3-pyaes python3-pycryptodomex libbitcoin-secp256k1 libzbar
+ python3-ecdsa python3-pyaes python3-pycryptodomex libsecp256k1 libzbar
  python3-cryptography>=2.6 python3-pathvalidate python3-psutil"
 short_desc="Lightweight Bitcoin Cash client"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://electroncash.org"
 distfiles="https://github.com/Electron-Cash/Electron-Cash/releases/download/${version}/Electron-Cash-${version}.tar.gz"
-checksum=2c77258c0e8ccdc42d16cd9bdbc26b47f94b92d9ba8a86d63c25a17ec832b324
+checksum=2b987e7074add9631865ee0bd704c4cd8d736945edc5ed038009d00b3aaa2afb
 make_check=no # Depends on unpackaged SimpleWebSocketServer
 
 post_install() {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (8 preceding siblings ...)
  2023-05-16 18:14 ` [PR PATCH] [Updated] " ar-jan
@ 2023-05-16 19:06 ` ar-jan
  2023-05-21 13:31 ` [PR PATCH] [Updated] " ar-jan
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-16 19:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/43702#issuecomment-1548576723

Comment:
Looks like the old `libbitcoin-*` packages need to be removed from the repository index for tests to pass?

*edit: yes, fixed now.*

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (9 preceding siblings ...)
  2023-05-16 19:06 ` ar-jan
@ 2023-05-21 13:31 ` ar-jan
  2023-05-21 13:35 ` ar-jan
  2023-06-26 20:07 ` [PR PATCH] [Closed]: " leahneukirchen
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-21 13:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2749 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages bitcoin-etc
https://github.com/void-linux/void-packages/pull/43702

Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package: libsecp256k1
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Electrum v4.4.1 moved to using libsecp256k1 0.3.1 (`libsecp256k1.so.2`).

Void's current libsecp256k1 is from https://github.com/libbitcoin/secp256k1, which is extremely outdated.
I believe this was originally used because back then https://github.com/bitcoin-core/secp256k1 was too unstable and did not provide tagged releases. Now they do, so we should move to that.

The only two packages which use libsecp256k1 are `electrum` and `Electron-Cash` (besides the other `libbitcoin-*` packages).

Electron Cash can also use bitcoin-core's libsecp256k1 v0.3.1, although it actually needs https://github.com/Bitcoin-ABC/secp256k1 or Electron Cash's own fork for full functionality (CashFusion would not work):
> you CAN use the Core version, and it will speed-up ECDSA sigs.. but then for Schnorr sigs it won't speed them up at all since Core's Schnorr stuff differs from Bitcoin Cash's. So Electron Cash will detect that it's on Core, and will fall-back to using python-only Schnorr in that case (slow).
> https://github.com/Electron-Cash/Electron-Cash/issues/2596#issuecomment-1529926625

I assume CashFusion is currently not working either since it's already using the wrong version of the library, so switching to bitcoin-core's libsecp256k1 v0.3.1 should be fine for Electron Cash too.

That leaves the other 10 libbitcoin packages which also depend on libsecp256k1:

- libbitcoin-blockchain
- libbitcoin-client
- libbitcoin-consensus
- libbitcoin-database
- libbitcoin-explorer
- libbitcoin-network
- libbitcoin-node
- libbitcoin-protocol
- libbitcoin-server
- libbitcoin-system

These packages haven't been updated for Void Linux since August 2019, so it seems safe to assume they're not actively used. There are no other packages that depend on any of them. I propose we remove them.

If agreed that we can remove the `libbitcoin`  packages, is it OK to just provide the new .so version from the new package, and remove the old one when updating `removed-packages`? 

> libsecp256k1.so.2 libsecp256k1-0.3.1_1
> libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1

A patch file from https://github.com/void-linux/void-packages/pull/43702.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bitcoin-etc-43702.patch --]
[-- Type: text/x-diff, Size: 9375 bytes --]

From efad733e40679c124e989bde3ad539abdae4aac5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Thu, 4 May 2023 19:02:21 +0200
Subject: [PATCH 1/4] libbitcoin-secp256k1: remove package.

An updated version of the libsecp256k1 library is provided via
new libsecp256k1 package (bitcoin-core version).
---
 common/shlibs                         |  1 -
 srcpkgs/libbitcoin-secp256k1-devel    |  1 -
 srcpkgs/libbitcoin-secp256k1/template | 35 ---------------------------
 srcpkgs/removed-packages/template     |  1 +
 4 files changed, 1 insertion(+), 37 deletions(-)
 delete mode 120000 srcpkgs/libbitcoin-secp256k1-devel
 delete mode 100644 srcpkgs/libbitcoin-secp256k1/template

diff --git a/common/shlibs b/common/shlibs
index de1171416591..91abc90b0176 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3667,7 +3667,6 @@ libdwarves_emit.so.1 pahole-1.12_1
 libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
-libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1
 libltc.so.11 libltc-1.3.1_1
 libvpd-2.2.so.2 libvpd-2.2.6_1
 libvpd_cxx-2.2.so.2 libvpd-2.2.6_1
diff --git a/srcpkgs/libbitcoin-secp256k1-devel b/srcpkgs/libbitcoin-secp256k1-devel
deleted file mode 120000
index 527eb8d59d7e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1-devel
+++ /dev/null
@@ -1 +0,0 @@
-libbitcoin-secp256k1
\ No newline at end of file
diff --git a/srcpkgs/libbitcoin-secp256k1/template b/srcpkgs/libbitcoin-secp256k1/template
deleted file mode 100644
index 42f5ad1ded0e..000000000000
--- a/srcpkgs/libbitcoin-secp256k1/template
+++ /dev/null
@@ -1,35 +0,0 @@
-# Template file for 'libbitcoin-secp256k1'
-pkgname=libbitcoin-secp256k1
-version=0.1.0.13
-revision=1
-build_style=gnu-configure
-configure_args="--disable-benchmark --disable-coverage --disable-jni
- --disable-openssl-tests --enable-exhaustive-tests --enable-module-recovery
- --enable-tests --with-gnu-ld"
-hostmakedepends="autoconf automake libtool m4 pkg-config"
-short_desc="Optimized C library for EC operations on curve secp256k1"
-maintainer="Andy Weidenbaum <atweiden@tutanota.de>"
-license="MIT"
-homepage="https://github.com/libbitcoin/secp256k1"
-distfiles="https://github.com/libbitcoin/secp256k1/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
-checksum=9e48dbc88d0fb5646d40ea12df9375c577f0e77525e49833fb744d3c2a69e727
-
-pre_configure() {
-	./autogen.sh
-}
-
-post_install() {
-	vlicense COPYING
-	vdoc README.md
-}
-
-libbitcoin-secp256k1-devel_package() {
-	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
-	pkg_install() {
-		vmove usr/include
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
-		vmove usr/lib/pkgconfig
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 9b0ce9c93fce..b7d177441873 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -291,6 +291,7 @@ replaces="
  libbitcoin-system-devel<=3.6.0_10
  libco-devel<=20_1
  libco<=20_1
+ libbitcoin-secp256k1<=0.1.0.13_1
  libechonest-qt5<=2.3.1_2
  libechonest-qt5-devel<=2.3.1_2
  libdbusmenu-qt<=0.9.2_4

From 53be6138f9601da30f93f57dc0c7260b3bd208e1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 17:55:47 +0200
Subject: [PATCH 2/4] New package: libsecp256k1-0.3.2

---
 common/shlibs                 |  1 +
 srcpkgs/libbitcoin-secp256k1  |  1 +
 srcpkgs/libsecp256k1-devel    |  1 +
 srcpkgs/libsecp256k1/template | 41 +++++++++++++++++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 120000 srcpkgs/libbitcoin-secp256k1
 create mode 120000 srcpkgs/libsecp256k1-devel
 create mode 100644 srcpkgs/libsecp256k1/template

diff --git a/common/shlibs b/common/shlibs
index 91abc90b0176..21a8315431aa 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3667,6 +3667,7 @@ libdwarves_emit.so.1 pahole-1.12_1
 libdwarves_reorganize.so.1 pahole-1.12_1
 libclthreads.so.2 clthreads-2.4.2_1
 libclxclient.so.3 clxclient-3.9.2_1
+libsecp256k1.so.2 libsecp256k1-0.3.2_1
 libltc.so.11 libltc-1.3.1_1
 libvpd-2.2.so.2 libvpd-2.2.6_1
 libvpd_cxx-2.2.so.2 libvpd-2.2.6_1
diff --git a/srcpkgs/libbitcoin-secp256k1 b/srcpkgs/libbitcoin-secp256k1
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libbitcoin-secp256k1
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1-devel b/srcpkgs/libsecp256k1-devel
new file mode 120000
index 000000000000..1a5b8eebddec
--- /dev/null
+++ b/srcpkgs/libsecp256k1-devel
@@ -0,0 +1 @@
+libsecp256k1
\ No newline at end of file
diff --git a/srcpkgs/libsecp256k1/template b/srcpkgs/libsecp256k1/template
new file mode 100644
index 000000000000..0d0ad3245359
--- /dev/null
+++ b/srcpkgs/libsecp256k1/template
@@ -0,0 +1,41 @@
+# Template file for 'libsecp256k1'
+pkgname=libsecp256k1
+version=0.3.2
+revision=1
+build_style=gnu-configure
+configure_args="--disable-benchmark --disable-coverage --enable-experimental
+ --enable-module-ecdh --enable-module-recovery --enable-tests
+ --enable-exhaustive-tests --with-gnu-ld"
+hostmakedepends="autoconf automake libtool m4 pkg-config"
+short_desc="Optimized C library for EC operations on curve secp256k1"
+maintainer="Arjan Mossel <arjanmossel@gmail.com>"
+license="MIT"
+homepage="https://github.com/bitcoin-core/secp256k1"
+distfiles="https://github.com/bitcoin-core/secp256k1/archive/v${version}.tar.gz"
+checksum="ef2e1061951b8cf94a7597b4e60fd7810613e327e25305e8d73dfdff67d12190"
+
+pre_configure() {
+	./autogen.sh
+}
+
+post_install() {
+	vlicense COPYING
+	vdoc README.md
+}
+
+libsecp256k1-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+	}
+}
+
+libbitcoin-secp256k1_package() {
+	depends="libsecp256k1"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
+}

From 223cbe10042cdd4ef369efa8bcd2134eab7ccc48 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 16:13:03 +0200
Subject: [PATCH 3/4] electrum: update to 4.4.3; use bitcoin-core libsecp256k1

---
 srcpkgs/electrum/template | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template
index dcabed755423..448b299bc2f4 100644
--- a/srcpkgs/electrum/template
+++ b/srcpkgs/electrum/template
@@ -1,14 +1,14 @@
 # Template file for 'electrum'
 pkgname=electrum
-version=4.2.0
-revision=3
+version=4.4.3
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx
  python3-bitstring python3-dnspython python3-ecdsa python3-jsonrpclib
  python3-protobuf python3-pyaes python3-pycryptodomex python3-PyQt5
- python3-qrcode python3-socks python3-cryptography libbitcoin-secp256k1
- python3-certifi"
+ python3-qrcode python3-socks python3-cryptography libsecp256k1
+ python3-certifi libzbar"
 # Optional dependencies:
 #  btchip - BTChip hardware wallet support
 #  trezor - TREZOR hardware wallet support
@@ -19,8 +19,9 @@ short_desc="Lightweight Bitcoin wallet"
 maintainer="Charles E. Lehner <cel@celehner.com>"
 license="MIT"
 homepage="https://electrum.org/"
+changelog="https://raw.githubusercontent.com/spesmilo/electrum/master/RELEASE-NOTES"
 distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz"
-checksum=3a24c7ed7a2bb47888f308380b8624a3fff3cf3882fd63d904cd9c3ec543fb3b
+checksum=223baa42e2d276dcb3784e34d6558b2efd8a06b761be27447e7eca24ab4e55d6
 
 post_install() {
 	vsed -i -e 's|electrum %u|electrum|' \

From 911691731082e94af547862a9329cb61397eb714 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Mon, 1 May 2023 19:29:16 +0200
Subject: [PATCH 4/4] Electron-Cash: update to 4.3.1; use bitcoin-core
 libsecp256k1

---
 srcpkgs/Electron-Cash/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Electron-Cash/template b/srcpkgs/Electron-Cash/template
index 38ca3449b093..a4fbc06791e1 100644
--- a/srcpkgs/Electron-Cash/template
+++ b/srcpkgs/Electron-Cash/template
@@ -1,20 +1,20 @@
 # Template file for 'Electron-Cash'
 pkgname=Electron-Cash
-version=4.2.10
-revision=3
+version=4.3.1
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-PyQt5-devel-tools"
 depends="python3-PyQt5 python3-PyQt5-svg python3-qrcode python3-dateutil
  python3-jsonrpclib python3-protobuf
  python3-dnspython python3-requests python3-pysocks python3-stem
- python3-ecdsa python3-pyaes python3-pycryptodomex libbitcoin-secp256k1 libzbar
+ python3-ecdsa python3-pyaes python3-pycryptodomex libsecp256k1 libzbar
  python3-cryptography>=2.6 python3-pathvalidate python3-psutil"
 short_desc="Lightweight Bitcoin Cash client"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://electroncash.org"
 distfiles="https://github.com/Electron-Cash/Electron-Cash/releases/download/${version}/Electron-Cash-${version}.tar.gz"
-checksum=2c77258c0e8ccdc42d16cd9bdbc26b47f94b92d9ba8a86d63c25a17ec832b324
+checksum=8297c687fe3d081de7fbbf874c04a35c3d86f81aa90ad13c2852647a3daa2e87
 make_check=no # Depends on unpackaged SimpleWebSocketServer
 
 post_install() {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (10 preceding siblings ...)
  2023-05-21 13:31 ` [PR PATCH] [Updated] " ar-jan
@ 2023-05-21 13:35 ` ar-jan
  2023-06-26 20:07 ` [PR PATCH] [Closed]: " leahneukirchen
  12 siblings, 0 replies; 14+ messages in thread
From: ar-jan @ 2023-05-21 13:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/43702#issuecomment-1556182269

Comment:
Updated to `electrum-4.4.3` and `Electron-Cash-4.3.1`.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Closed]: Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
  2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
                   ` (11 preceding siblings ...)
  2023-05-21 13:35 ` ar-jan
@ 2023-06-26 20:07 ` leahneukirchen
  12 siblings, 0 replies; 14+ messages in thread
From: leahneukirchen @ 2023-06-26 20:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]

There's a closed pull request on the void-packages repository

Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update electrum, Electron-Cash
https://github.com/void-linux/void-packages/pull/43702

Description:
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package: libsecp256k1
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

Electrum v4.4.1 moved to using libsecp256k1 0.3.1 (`libsecp256k1.so.2`).

Void's current libsecp256k1 is from https://github.com/libbitcoin/secp256k1, which is extremely outdated.
I believe this was originally used because back then https://github.com/bitcoin-core/secp256k1 was too unstable and did not provide tagged releases. Now they do, so we should move to that.

The only two packages which use libsecp256k1 are `electrum` and `Electron-Cash` (besides the other `libbitcoin-*` packages).

Electron Cash can also use bitcoin-core's libsecp256k1 v0.3.1, although it actually needs https://github.com/Bitcoin-ABC/secp256k1 or Electron Cash's own fork for full functionality (CashFusion would not work):
> you CAN use the Core version, and it will speed-up ECDSA sigs.. but then for Schnorr sigs it won't speed them up at all since Core's Schnorr stuff differs from Bitcoin Cash's. So Electron Cash will detect that it's on Core, and will fall-back to using python-only Schnorr in that case (slow).
> https://github.com/Electron-Cash/Electron-Cash/issues/2596#issuecomment-1529926625

CashFusion is currently not working either since it's already using the wrong version of the library, so switching to bitcoin-core's libsecp256k1 v0.3.1 should be fine for Electron Cash too.

The other 10 libbitcoin packages which also depend on libsecp256k1 have been removed:

- libbitcoin-blockchain
- libbitcoin-client
- libbitcoin-consensus
- libbitcoin-database
- libbitcoin-explorer
- libbitcoin-network
- libbitcoin-node
- libbitcoin-protocol
- libbitcoin-server
- libbitcoin-system

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-06-26 20:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-01 17:40 [PR PATCH] Switch to bitcoin-core/libsecp256k1 and remove libbitcoin? Update electrum, Electron-Cash ar-jan
2023-05-01 17:44 ` ar-jan
2023-05-01 18:53 ` ar-jan
2023-05-02  1:28 ` atweiden
2023-05-06 12:41 ` [PR PATCH] [Updated] " ar-jan
2023-05-06 12:54 ` ar-jan
2023-05-15 20:32 ` [PR PATCH] [Updated] Switch to bitcoin-core libsecp256k1 and remove libbitcoin; update " ar-jan
2023-05-15 20:56 ` ar-jan
2023-05-15 21:05 ` ar-jan
2023-05-16 18:14 ` [PR PATCH] [Updated] " ar-jan
2023-05-16 19:06 ` ar-jan
2023-05-21 13:31 ` [PR PATCH] [Updated] " ar-jan
2023-05-21 13:35 ` ar-jan
2023-06-26 20:07 ` [PR PATCH] [Closed]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).