[PATCH 0/1] gnu: bitcoin-core: Update to 0.20.1.

  • Done
  • quality assurance status badge
Details
4 participants
  • Guillaume Le Vaillant
  • Martin via web
  • Christopher Baines
  • Simon South
Owner
unassigned
Submitted by
Simon South
Severity
normal

Debbugs page

Simon South wrote 4 years ago
(address . guix-patches@gnu.org)(address . simon@simonsouth.net)
cover.1604701819.git.simon@simonsouth.net
This patch updates Bitcoin Core, the reference implementation of the Bitcoin
protocol, to 0.20.1.

I've followed the instructions[0] for verifying the downloaded source bundle,
though of course you may still want to do the same.

My changes remove an obsolete patch whose contents are now part of the
distribution. They also

- Add autoconf, automake and libtool as native inputs, as this release does
not include a pre-generated "configure" script[1].

- Remove protobuf from the inputs, as with the removal of BIP70 support in
version 0.20.0[2] this is no longer used[3].

- Add a phase before "build" that sets an environment variable,
"BITCOIN_GENBUILD_NO_GIT", as recommended in the release notes[4], to
indicate the build is not being made from within a git repository. (This
isn't really necessary, since the section of code this variable
controls---in share/genbuild.sh---will be skipped anyway without git
available in the container. But I've added it for certainty and
completeness.)

I've built this successfully on x86-64 and AArch64, and am using it now on
AArch64 without issue.


--
Simon South
simon@simonsouth.net


Simon South (1):
gnu: bitcoin-core: Update to 0.20.1.

gnu/local.mk | 1 -
gnu/packages/finance.scm | 18 ++++++++----
.../patches/bitcoin-core-python-compat.patch | 28 -------------------
3 files changed, 13 insertions(+), 34 deletions(-)
delete mode 100644 gnu/packages/patches/bitcoin-core-python-compat.patch

--
2.28.0
Simon South wrote 4 years ago
[PATCH 1/1] gnu: bitcoin-core: Update to 0.20.1.
(address . 44493@debbugs.gnu.org)(address . simon@simonsouth.net)
66f07907c0a80e45b97c3cf234e8d384bad7225e.1604701819.git.simon@simonsouth.net
* gnu/packages/finance.scm (bitcoin-core): Update to 0.20.1.
[source]: Remove obsolete patch.
[native-inputs]: Add autoconf, automake and libtool.
[inputs]: Remove protobuf.
[arguments]: Add "set-no-git-flag" phase to indicate the build is not taking
place within a git repository.
* gnu/packages/patches/bitcoin-core-python-compat.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
gnu/local.mk | 1 -
gnu/packages/finance.scm | 18 ++++++++----
.../patches/bitcoin-core-python-compat.patch | 28 -------------------
3 files changed, 13 insertions(+), 34 deletions(-)
delete mode 100644 gnu/packages/patches/bitcoin-core-python-compat.patch

Toggle diff (100 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 2a994bd3b9..a72a30ecb1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -844,7 +844,6 @@ dist_patch_DATA = \
%D%/packages/patches/binutils-loongson-workaround.patch \
%D%/packages/patches/binutils-mingw-w64-timestamp.patch \
%D%/packages/patches/binutils-mingw-w64-deterministic.patch \
- %D%/packages/patches/bitcoin-core-python-compat.patch \
%D%/packages/patches/blender-2.79-gcc8.patch \
%D%/packages/patches/blender-2.79-gcc9.patch \
%D%/packages/patches/blender-2.79-newer-ffmpeg.patch \
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index ffbf3b218d..0479560810 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -108,7 +108,7 @@
(define-public bitcoin-core
(package
(name "bitcoin-core")
- (version "0.19.1")
+ (version "0.20.1")
(source (origin
(method url-fetch)
(uri
@@ -116,11 +116,13 @@
version "/bitcoin-" version ".tar.gz"))
(sha256
(base32
- "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj"))
- (patches (search-patches "bitcoin-core-python-compat.patch"))))
+ "0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab"))))
(build-system gnu-build-system)
(native-inputs
- `(("pkg-config" ,pkg-config)
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)
("python" ,python) ; for the tests
("util-linux" ,util-linux) ; provides the hexdump command for tests
("qttools" ,qttools)))
@@ -130,7 +132,6 @@
("libevent" ,libevent)
("miniupnpc" ,miniupnpc)
("openssl" ,openssl)
- ("protobuf" ,protobuf)
("qtbase" ,qtbase)))
(arguments
`(#:configure-flags
@@ -154,6 +155,13 @@
;; Make Qt deterministic.
(setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
#t))
+ (add-before 'build 'set-no-git-flag
+ (lambda _
+ ;; Make it clear we are not building from within a git repository
+ ;; (and thus no information regarding this build is available
+ ;; from git).
+ (setenv "BITCOIN_GENBUILD_NO_GIT" "1")
+ #t))
(add-before 'check 'set-home
(lambda _
(setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
diff --git a/gnu/packages/patches/bitcoin-core-python-compat.patch b/gnu/packages/patches/bitcoin-core-python-compat.patch
deleted file mode 100644
index 6bf744124d..0000000000
--- a/gnu/packages/patches/bitcoin-core-python-compat.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Get rid of deprecation warning emitted by Python 3.8, which causes a test failure(!).
-
-https://github.com/bitcoin/bitcoin/pull/17931
-
-Taken from upstream:
-
-https://github.com/bitcoin/bitcoin/commit/f117fb00da747147cddfb071c1427a2754c278cd
-
-diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py
-index 20864881c165..07eacf410d88 100755
---- a/test/functional/p2p_invalid_messages.py
-+++ b/test/functional/p2p_invalid_messages.py
-@@ -145,13 +145,13 @@ def run_test(self):
- def test_magic_bytes(self):
- conn = self.nodes[0].add_p2p_connection(P2PDataStore())
-
-- def swap_magic_bytes():
-+ async def swap_magic_bytes():
- conn._on_data = lambda: None # Need to ignore all incoming messages from now, since they come with "invalid" magic bytes
- conn.magic_bytes = b'\x00\x11\x22\x32'
-
- # Call .result() to block until the atomic swap is complete, otherwise
- # we might run into races later on
-- asyncio.run_coroutine_threadsafe(asyncio.coroutine(swap_magic_bytes)(), NetworkThread.network_event_loop).result()
-+ asyncio.run_coroutine_threadsafe(swap_magic_bytes(), NetworkThread.network_event_loop).result()
-
- with self.nodes[0].assert_debug_log(['PROCESSMESSAGE: INVALID MESSAGESTART ping']):
- conn.send_message(messages.msg_ping(nonce=0xff))
--
2.28.0
Christopher Baines wrote 4 years ago
Re: [bug#44493] [PATCH 0/1] gnu: bitcoin-core: Update to 0.20.1.
(name . Simon South)(address . simon@simonsouth.net)(address . 44493-done@debbugs.gnu.org)
87ima3kq3q.fsf@cbaines.net
Simon South <simon@simonsouth.net> writes:

Toggle quote (6 lines)
> This patch updates Bitcoin Core, the reference implementation of the Bitcoin
> protocol, to 0.20.1.
>
> I've followed the instructions[0] for verifying the downloaded source bundle,
> though of course you may still want to do the same.

So, I downloaded sha256 file with the GPG signature, and checked against
this, which was fine.

Toggle quote (40 lines)
> My changes remove an obsolete patch whose contents are now part of the
> distribution. They also
>
> - Add autoconf, automake and libtool as native inputs, as this release does
> not include a pre-generated "configure" script[1].
>
> - Remove protobuf from the inputs, as with the removal of BIP70 support in
> version 0.20.0[2] this is no longer used[3].
>
> - Add a phase before "build" that sets an environment variable,
> "BITCOIN_GENBUILD_NO_GIT", as recommended in the release notes[4], to
> indicate the build is not being made from within a git repository. (This
> isn't really necessary, since the section of code this variable
> controls---in share/genbuild.sh---will be skipped anyway without git
> available in the container. But I've added it for certainty and
> completeness.)
>
> I've built this successfully on x86-64 and AArch64, and am using it now on
> AArch64 without issue.
>
> [0] https://bitcoincore.org/en/download/#verify-your-download
> [1] https://bitcoincore.org/en/releases/0.20.1/#known-bugs
> [2] https://bitcoincore.org/en/releases/0.20.0/#build-system
> [3] https://github.com/bitcoin/bitcoin/pull/19058
> [4] https://bitcoincore.org/en/releases/0.20.1/#known-bugs
>
> --
> Simon South
> simon@simonsouth.net
>
>
> Simon South (1):
> gnu: bitcoin-core: Update to 0.20.1.
>
> gnu/local.mk | 1 -
> gnu/packages/finance.scm | 18 ++++++++----
> .../patches/bitcoin-core-python-compat.patch | 28 -------------------
> 3 files changed, 13 insertions(+), 34 deletions(-)
> delete mode 100644 gnu/packages/patches/bitcoin-core-python-compat.patch

Thanks Simon, this all looks great. I've pushed to master as
fa268b28e1ccc392c85846810d836034c96df3c0.

Thanks again,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+039lfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XefcRAAuEzZzNG1giX1lokOiQSzi56AzL8ZLprc
X7aWVi9FhiPWBXYdcdi9Vr07WegPIkEvoLScVdkoFoVTJWlsrspWHnsR9My85AI7
zjeXk9xCIReshdaTvLqL9nhZMGGTGSEKSe1VRrAVT1Z0SI1UwSSpt0FkQ2Rwzsyj
C//iTek6i8khgjkNYGqAaAaRviR+oFR5dlGWHc9OwJb9U2vwYNLWvrD3iY5cSm4C
F0kLFWTMK9DIirHVZIrXQkNo4JB9Z60ggXM4FkkFAaRbic9UEt3j84kVoHycDmjW
+o8989rAv8invzef7XjQWQPvPMARhtO7Iu+9Lo7VyD44HyZ6LihNND+Q3fWaC/47
x1YTYk2YWdogbbXyGP55q6AArKTd+plm7rgXZH9VtuI3bJRr05DaB1w1GewLV8MZ
PStTWxSdpsSMfwCSh+4G661U5emKnImU8NFb7UjrVBXGeQ+x7dTf7sVrnWm6z3TE
SN1cyAU466Ghar6/TfEFn0OxS1uZzcIX4gNMlE0e2mlEEHPk38Y3TmBR0auBS7mv
w7PEuinuJ8CU5lGBX9kOsjw6Ssf5SWA96UANtsSTlJYKOitJqUZ96L03jIp1KPgH
R3Lbf3CdKxBmUABNF1ofbGyZV85jhTjOo2pK7qKmRlB3N6IMWOJ/AkOodnrFpMW9
22r7OTetbfY=
=1SbI
-----END PGP SIGNATURE-----

Closed
Martin via web wrote 4 years ago
[PATCH 0/1] gnu: bitcoin-core: Update to 0.20.1.
(address . 44493@debbugs.gnu.org)
7f4c4d580230.10f738a92840912a@guile.gnu.org
The SHA256 checksum is not the hexadecimal one output by sha256sum, and I cannot recompute it as follows `cat bitcoin-0.20.1.tar.gz | sha256sum | xxd -r -p | base32`

How is this base32 value `0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab` computed?

Thanks!
Guillaume Le Vaillant wrote 4 years ago
(name . Martin via web)(address . issues.guix.gnu.org@elephly.net)(address . 44493@debbugs.gnu.org)
87pn3n1fzm.fsf@yamatai
Martin via web <issues.guix.gnu.org@elephly.net> skribis:

Toggle quote (6 lines)
> The SHA256 checksum is not the hexadecimal one output by sha256sum, and I cannot recompute it as follows `cat bitcoin-0.20.1.tar.gz | sha256sum | xxd -r -p | base32`
>
> How is this base32 value `0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab` computed?
>
> Thanks!

The base32 encoding used by Guix (and by Nix) is different from the
usual one used by the base32 command. You can compute it with
"guix hash bitcoin-0.20.1.tar.gz".
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCX8yZzQ8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+EPAD/SyaHhJnISz1+gy1hM3aLAuLGcjM4Klt+l/4/
YVcdMfsBAJPIO8WZfAop5Xk/y82egophmdxrVGJdEfJR0JxDAKs9
=LtbP
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 44493@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 44493
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help