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

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).