GNU bug report logs - #46266
[PATCH] gnu: Update bitcoin-core to 0.21.0

Previous Next

Package: guix-patches;

Reported by: ZmnSCPxj <ZmnSCPxj <at> protonmail.com>

Date: Wed, 3 Feb 2021 05:10:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46266 in the body.
You can then email your comments to 46266 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#46266; Package guix-patches. (Wed, 03 Feb 2021 05:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ZmnSCPxj <ZmnSCPxj <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 03 Feb 2021 05:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: Update bitcoin-core to 0.21.0
Date: Wed, 03 Feb 2021 02:54:30 +0000
In addition to updating, I made as well, separate `bitcoin-core-0.20` and `bitcoin-core-0.21` packages.
Due to RPC changes, it is possible that other programs compatible with older `bitcoin-core` version is not compatible with newer version.
Thus, an `operating-system` declaration, may need to pin a specific major version.

Hoping for your kind review and acceptance of this patch.

Tested with `guix build bitcoin-core`.
Is there more testing I need to do before this is accepted?

Regards,
ZmnSCPxj


From 319a66d931f2191ab91037e0ba9da1c2b969229d Mon Sep 17 00:00:00 2001
From: ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
Date: Wed, 3 Feb 2021 00:51:07 +0000
Subject: [PATCH] gnu: Update bitcoin-core to 0.21.0

* gnu/packages/finance.scm (make-bitcoin-core): New procedure, moved from ...
(bitcoin-core): ... here. Update to 0.21.0.
(bitcoin-core-0.20): New variable.
(bitcoin-core-0.21): New variable.
---
 gnu/packages/finance.scm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 1798ad82bc..dc9b911c68 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2020 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2020 Carlo Holl <carloholl <at> gmail.com>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul <at> autistici.org>
+;;; Copyright © 2021 ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -108,18 +109,17 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages gnuzilla))

-(define-public bitcoin-core
+(define (make-bitcoin-core target-version hash)
   (package
     (name "bitcoin-core")
-    (version "0.20.1")
+    (version target-version)
     (source (origin
               (method url-fetch)
               (uri
                (string-append "https://bitcoincore.org/bin/bitcoin-core-"
                               version "/bitcoin-" version ".tar.gz"))
               (sha256
-               (base32
-                "0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab"))))
+               (base32 hash))))
     (build-system gnu-build-system)
     (native-inputs
      `(("autoconf" ,autoconf)
@@ -186,6 +186,14 @@ of the bitcoin protocol.  This package provides the Bitcoin Core command
 line client and a client based on Qt.")
     (license license:expat)))

+;; Pinning specific versions may be necessary due to changes in
+;; RPC interface, or signalling reasons.
+(define-public bitcoin-core-0.20
+  (make-bitcoin-core "0.20.1" "0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab"))
+(define-public bitcoin-core-0.21
+  (make-bitcoin-core "0.21.0" "0dszcn4r43w0ffsmgwmyzkzr5lqws3bbhlkssmjgnjgfc8n2148s"))
+(define-public bitcoin-core bitcoin-core-0.21)
+
 (define-public hledger
   (package
     (name "hledger")
--
2.30.0





Information forwarded to guix-patches <at> gnu.org:
bug#46266; Package guix-patches. (Wed, 24 Feb 2021 09:13:01 GMT) Full text and rfc822 format available.

Message #8 received at 46266 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
Cc: 46266 <at> debbugs.gnu.org
Subject: Re: [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0
Date: Wed, 24 Feb 2021 09:11:57 +0000
[Message part 1 (text/plain, inline)]
Hi ZmnSCPxj,

Sorry for the delay in getting back to you.

guix-patches--- via <guix-patches <at> gnu.org> writes:

> In addition to updating, I made as well, separate `bitcoin-core-0.20`
> and `bitcoin-core-0.21` packages.  Due to RPC changes, it is possible
> that other programs compatible with older `bitcoin-core` version is
> not compatible with newer version.  Thus, an `operating-system`
> declaration, may need to pin a specific major version.

I think it's OK to keep older versions if that's important, but it would
be good to specifically note why specific older versions are useful to
keep. I'm saying that because it's useful to know when an older version
can be removed. So, for 0.20 are there incompatibilities that you're
aware of?

The second thing is, I wouldn't immediately jump to the
(make-... pattern, and I would instead use package inheritance. See the
ruby packages for example [1].

1: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby.scm#n95

Package inheritance makes it simpler to make changes to individual
versions, and avoids the complexity of introducing a procedure.

Does that all make sense?

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46266; Package guix-patches. (Tue, 16 Mar 2021 02:54:22 GMT) Full text and rfc822 format available.

Message #11 received at 46266 <at> debbugs.gnu.org (full text, mbox):

From: ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
To: Christopher Baines <mail <at> cbaines.net>
Cc: "46266 <at> debbugs.gnu.org" <46266 <at> debbugs.gnu.org>
Subject: Re: [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0
Date: Tue, 16 Mar 2021 02:53:08 +0000
Good morning Christopher,

> Hi ZmnSCPxj,
>
> Sorry for the delay in getting back to you.
>
> guix-patches--- via guix-patches <at> gnu.org writes:
>
> > In addition to updating, I made as well, separate `bitcoin-core-0.20`
> > and `bitcoin-core-0.21` packages. Due to RPC changes, it is possible
> > that other programs compatible with older `bitcoin-core` version is
> > not compatible with newer version. Thus, an `operating-system`
> > declaration, may need to pin a specific major version.
>
> I think it's OK to keep older versions if that's important, but it would
> be good to specifically note why specific older versions are useful to
> keep. I'm saying that because it's useful to know when an older version
> can be removed. So, for 0.20 are there incompatibilities that you're
> aware of?

Previously between 0.18.x to 0.19.0.1, the RPC command `sendrawtransaction` changed its second parameter from a boolean `allowhighfees` to a numeric `maxfeerate`.
Thus, an automated update from 0.18.x to 0.19.0.1 would have lead to problems in dependent software that used the older `allowhighfees` parameter.
So I think it is a good policy in general to provide major versions for Bitcoin Core at least, to avoid such issues in the future.

Another is that Bitcoin Core itself has a policy of not pushing updates; the idea is that the user should consciously elect to update to a newer version, because there may be consensus changes that the user does not agree with.
Using an unanchored `bitcoin-core` would break this policy and make Guix provide always the latest available.
Of course, it is possible to use inferiors and so on.

Finally, 0.21.1 is intended to include consensus policy changes on the activation of the new Taproot feature.
Whatever is deployed in 0.21.1 may or may not be agreed to by the specific user, thus `bitcoin-core` should ideally not be updated automatically to 0.21.1.

Bitcoin Core makes an effort to maintain older major versions in order to allow users to avoid particular changes in later major versions they do not agree with.

> The second thing is, I wouldn't immediately jump to the
> (make-... pattern, and I would instead use package inheritance. See the
> ruby packages for example [1].
>
> 1: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby.scm#n95
>
> Package inheritance makes it simpler to make changes to individual
> versions, and avoids the complexity of introducing a procedure.
>
> Does that all make sense?

Okay, thank you.

Regards,
ZmnSCPxj




Information forwarded to guix-patches <at> gnu.org:
bug#46266; Package guix-patches. (Tue, 16 Mar 2021 23:43:01 GMT) Full text and rfc822 format available.

Message #14 received at 46266 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
Cc: "46266 <at> debbugs.gnu.org" <46266 <at> debbugs.gnu.org>
Subject: Re: [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0
Date: Tue, 16 Mar 2021 23:42:30 +0000
[Message part 1 (text/plain, inline)]
ZmnSCPxj <ZmnSCPxj <at> protonmail.com> writes:

> Good morning Christopher,
>
>> Hi ZmnSCPxj,
>>
>> Sorry for the delay in getting back to you.
>>
>> guix-patches--- via guix-patches <at> gnu.org writes:
>>
>> > In addition to updating, I made as well, separate `bitcoin-core-0.20`
>> > and `bitcoin-core-0.21` packages. Due to RPC changes, it is possible
>> > that other programs compatible with older `bitcoin-core` version is
>> > not compatible with newer version. Thus, an `operating-system`
>> > declaration, may need to pin a specific major version.
>>
>> I think it's OK to keep older versions if that's important, but it would
>> be good to specifically note why specific older versions are useful to
>> keep. I'm saying that because it's useful to know when an older version
>> can be removed. So, for 0.20 are there incompatibilities that you're
>> aware of?
>
> Previously between 0.18.x to 0.19.0.1, the RPC command
> `sendrawtransaction` changed its second parameter from a boolean
> `allowhighfees` to a numeric `maxfeerate`.  Thus, an automated update
> from 0.18.x to 0.19.0.1 would have lead to problems in dependent
> software that used the older `allowhighfees` parameter.  So I think it
> is a good policy in general to provide major versions for Bitcoin Core
> at least, to avoid such issues in the future.
>
> Another is that Bitcoin Core itself has a policy of not pushing
> updates; the idea is that the user should consciously elect to update
> to a newer version, because there may be consensus changes that the
> user does not agree with.  Using an unanchored `bitcoin-core` would
> break this policy and make Guix provide always the latest available.
> Of course, it is possible to use inferiors and so on.
>
> Finally, 0.21.1 is intended to include consensus policy changes on the
> activation of the new Taproot feature.  Whatever is deployed in 0.21.1
> may or may not be agreed to by the specific user, thus `bitcoin-core`
> should ideally not be updated automatically to 0.21.1.
>
> Bitcoin Core makes an effort to maintain older major versions in order
> to allow users to avoid particular changes in later major versions
> they do not agree with.

Ok, I've found https://bitcoincore.org/en/lifecycle/#schedule now which
makes me feel a little better at keeping older versions around, as there
are dates from the upstream project which help signal when removing
versions from Guix might be good.

>> The second thing is, I wouldn't immediately jump to the
>> (make-... pattern, and I would instead use package inheritance. See the
>> ruby packages for example [1].
>>
>> 1: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby.scm#n95
>>
>> Package inheritance makes it simpler to make changes to individual
>> versions, and avoids the complexity of introducing a procedure.
>>
>> Does that all make sense?
>
> Okay, thank you.

On this point, are you OK with sending an updated patch?

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46266; Package guix-patches. (Wed, 17 Mar 2021 03:19:01 GMT) Full text and rfc822 format available.

Message #17 received at 46266 <at> debbugs.gnu.org (full text, mbox):

From: ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
To: Christopher Baines <mail <at> cbaines.net>
Cc: "46266 <at> debbugs.gnu.org" <46266 <at> debbugs.gnu.org>
Subject: Re: [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0
Date: Wed, 17 Mar 2021 03:18:11 +0000
Good morning Christopher,

> ZmnSCPxj ZmnSCPxj <at> protonmail.com writes:
>
> > Good morning Christopher,
> >
> > > Hi ZmnSCPxj,
> > > Sorry for the delay in getting back to you.
> > > guix-patches--- via guix-patches <at> gnu.org writes:
> > >
> > > > In addition to updating, I made as well, separate `bitcoin-core-0.20`
> > > > and `bitcoin-core-0.21` packages. Due to RPC changes, it is possible
> > > > that other programs compatible with older `bitcoin-core` version is
> > > > not compatible with newer version. Thus, an `operating-system`
> > > > declaration, may need to pin a specific major version.
> > >
> > > I think it's OK to keep older versions if that's important, but it would
> > > be good to specifically note why specific older versions are useful to
> > > keep. I'm saying that because it's useful to know when an older version
> > > can be removed. So, for 0.20 are there incompatibilities that you're
> > > aware of?
> >
> > Previously between 0.18.x to 0.19.0.1, the RPC command
> > `sendrawtransaction` changed its second parameter from a boolean
> > `allowhighfees` to a numeric `maxfeerate`. Thus, an automated update
> > from 0.18.x to 0.19.0.1 would have lead to problems in dependent
> > software that used the older `allowhighfees` parameter. So I think it
> > is a good policy in general to provide major versions for Bitcoin Core
> > at least, to avoid such issues in the future.
> > Another is that Bitcoin Core itself has a policy of not pushing
> > updates; the idea is that the user should consciously elect to update
> > to a newer version, because there may be consensus changes that the
> > user does not agree with. Using an unanchored `bitcoin-core` would
> > break this policy and make Guix provide always the latest available.
> > Of course, it is possible to use inferiors and so on.
> > Finally, 0.21.1 is intended to include consensus policy changes on the
> > activation of the new Taproot feature. Whatever is deployed in 0.21.1
> > may or may not be agreed to by the specific user, thus `bitcoin-core`
> > should ideally not be updated automatically to 0.21.1.
> > Bitcoin Core makes an effort to maintain older major versions in order
> > to allow users to avoid particular changes in later major versions
> > they do not agree with.
>
> Ok, I've foundhttps://bitcoincore.org/en/lifecycle/#schedule now which
> makes me feel a little better at keeping older versions around, as there
> are dates from the upstream project which help signal when removing
> versions from Guix might be good.

Okay, I will add a comment linking to this as well in the patch.

>
> > > The second thing is, I wouldn't immediately jump to the
> > > (make-... pattern, and I would instead use package inheritance. See the
> > > ruby packages for example [1].
> > > 1: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby.scm#n95
> > > Package inheritance makes it simpler to make changes to individual
> > > versions, and avoids the complexity of introducing a procedure.
> > > Does that all make sense?
> >
> > Okay, thank you.
>
> On this point, are you OK with sending an updated patch?

Yes, please give me a few days or weeks.

Regards,
ZmnSCPxj




Information forwarded to guix-patches <at> gnu.org:
bug#46266; Package guix-patches. (Wed, 17 Mar 2021 11:50:01 GMT) Full text and rfc822 format available.

Message #20 received at 46266 <at> debbugs.gnu.org (full text, mbox):

From: ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
To: Christopher Baines <mail <at> cbaines.net>
Cc: "46266 <at> debbugs.gnu.org" <46266 <at> debbugs.gnu.org>
Subject: Re: [PATCH v2] gnu: Update bitcoin-core to 0.21.0
Date: Wed, 17 Mar 2021 11:48:52 +0000
From 4397bd3d76fb72a97dcd37c78c23b7e174fd7bc5 Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework <at> protonmail.com>
Date: Wed, 17 Mar 2021 19:46:22 +0800
Subject: [PATCH] gnu: Update bitcoin-core to 0.21.0

* gnu/packages/finance.scm (bitcoin-core): Update to 0.21.0.
(bitcoin-core-0.20): New variable.
(bitcoin-core-0.21): New variable.
---
 gnu/packages/finance.scm | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index e6df40c168..b1c1da9095 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2020 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2020 Carlo Holl <carloholl <at> gmail.com>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul <at> autistici.org>
+;;; Copyright © 2021 ZmnSCPxj jxPCSnmZ <ZmnSCPxj <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -52,6 +53,7 @@
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system go)
   #:use-module (guix build-system qt)
+  #:use-module (guix deprecation)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages aidc)
@@ -108,10 +110,18 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages gnuzilla))

-(define-public bitcoin-core
+;; Specific versions of bitcoin-core are provided, because RPC changes may
+;; occur between major releases, which can cause problems with dependent
+;; software.
+;; In addition, consensus-critical changes may also be scheduled for
+;; particular major releases, and the user may prefer to hold back until
+;; consensus on a newer version forms.
+;; The support lifetimes for major versions can be found in
+;; <https://bitcoincore.org/en/lifecycle/#schedule>.
+(define-public bitcoin-core-0.21
   (package
     (name "bitcoin-core")
-    (version "0.20.1")
+    (version "0.21.0")
     (source (origin
               (method url-fetch)
               (uri
@@ -119,7 +129,7 @@
                               version "/bitcoin-" version ".tar.gz"))
               (sha256
                (base32
-                "0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab"))))
+                "0dszcn4r43w0ffsmgwmyzkzr5lqws3bbhlkssmjgnjgfc8n2148s"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("autoconf" ,autoconf)
@@ -186,6 +196,21 @@ of the bitcoin protocol.  This package provides the Bitcoin Core command
 line client and a client based on Qt.")
     (license license:expat)))

+(define-public bitcoin-core-0.20
+  (package
+    (inherit bitcoin-core-0.21)
+    (version "0.20.1")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://bitcoincore.org/bin/bitcoin-core-"
+                              version "/bitcoin-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab"))))))
+
+(define-public bitcoin-core bitcoin-core-0.21)
+
 (define-public hledger
   (package
     (name "hledger")
--
2.31.0





Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Tue, 23 Mar 2021 22:00:02 GMT) Full text and rfc822 format available.

Notification sent to ZmnSCPxj <ZmnSCPxj <at> protonmail.com>:
bug acknowledged by developer. (Tue, 23 Mar 2021 22:00:02 GMT) Full text and rfc822 format available.

Message #25 received at 46266-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: ZmnSCPxj <ZmnSCPxj <at> protonmail.com>
Cc: 46266-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Update bitcoin-core to 0.21.0
Date: Tue, 23 Mar 2021 21:59:11 +0000
[Message part 1 (text/plain, inline)]
ZmnSCPxj <ZmnSCPxj <at> protonmail.com> writes:

> * gnu/packages/finance.scm (bitcoin-core): Update to 0.21.0.
> (bitcoin-core-0.20): New variable.
> (bitcoin-core-0.21): New variable.
> ---
>  gnu/packages/finance.scm | 31 ++++++++++++++++++++++++++++---
>  1 file changed, 28 insertions(+), 3 deletions(-)

Thanks, I've gone ahead and upshed this as
d3c8aa3f8214434c8ba819984ed4513796a09e38. Sorry for the delay.

I tweaked one of the comments just to be a bit shorter, also tweaked the
commit message.

Thanks again,

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Apr 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.