all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0
@ 2021-02-03  2:54 guix-patches--- via
  2021-02-24  9:11 ` Christopher Baines
  2021-03-17 11:48 ` [bug#46266] [PATCH v2] " ZmnSCPxj via Guix-patches via
  0 siblings, 2 replies; 7+ messages in thread
From: guix-patches--- via @ 2021-02-03  2:54 UTC (permalink / raw)
  To: 46266

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@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@posteo.net>
 ;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2021 ZmnSCPxj <ZmnSCPxj@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





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

* [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0
  2021-02-03  2:54 [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0 guix-patches--- via
@ 2021-02-24  9:11 ` Christopher Baines
  2021-03-16  2:53   ` ZmnSCPxj via Guix-patches via
  2021-03-17 11:48 ` [bug#46266] [PATCH v2] " ZmnSCPxj via Guix-patches via
  1 sibling, 1 reply; 7+ messages in thread
From: Christopher Baines @ 2021-02-24  9:11 UTC (permalink / raw)
  To: ZmnSCPxj; +Cc: 46266

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


Hi ZmnSCPxj,

Sorry for the delay in getting back to you.

guix-patches--- via <guix-patches@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

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

* [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0
  2021-02-24  9:11 ` Christopher Baines
@ 2021-03-16  2:53   ` ZmnSCPxj via Guix-patches via
  2021-03-16 23:42     ` Christopher Baines
  0 siblings, 1 reply; 7+ messages in thread
From: ZmnSCPxj via Guix-patches via @ 2021-03-16  2:53 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 46266@debbugs.gnu.org

Good morning Christopher,

> Hi ZmnSCPxj,
>
> Sorry for the delay in getting back to you.
>
> guix-patches--- via guix-patches@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




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

* [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0
  2021-03-16  2:53   ` ZmnSCPxj via Guix-patches via
@ 2021-03-16 23:42     ` Christopher Baines
  2021-03-17  3:18       ` ZmnSCPxj via Guix-patches via
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Baines @ 2021-03-16 23:42 UTC (permalink / raw)
  To: ZmnSCPxj; +Cc: 46266@debbugs.gnu.org

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


ZmnSCPxj <ZmnSCPxj@protonmail.com> writes:

> Good morning Christopher,
>
>> Hi ZmnSCPxj,
>>
>> Sorry for the delay in getting back to you.
>>
>> guix-patches--- via guix-patches@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

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

* [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0
  2021-03-16 23:42     ` Christopher Baines
@ 2021-03-17  3:18       ` ZmnSCPxj via Guix-patches via
  0 siblings, 0 replies; 7+ messages in thread
From: ZmnSCPxj via Guix-patches via @ 2021-03-17  3:18 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 46266@debbugs.gnu.org

Good morning Christopher,

> ZmnSCPxj ZmnSCPxj@protonmail.com writes:
>
> > Good morning Christopher,
> >
> > > Hi ZmnSCPxj,
> > > Sorry for the delay in getting back to you.
> > > guix-patches--- via guix-patches@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




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

* [bug#46266] [PATCH v2] gnu: Update bitcoin-core to 0.21.0
  2021-02-03  2:54 [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0 guix-patches--- via
  2021-02-24  9:11 ` Christopher Baines
@ 2021-03-17 11:48 ` ZmnSCPxj via Guix-patches via
  2021-03-23 21:59   ` bug#46266: " Christopher Baines
  1 sibling, 1 reply; 7+ messages in thread
From: ZmnSCPxj via Guix-patches via @ 2021-03-17 11:48 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 46266@debbugs.gnu.org


From 4397bd3d76fb72a97dcd37c78c23b7e174fd7bc5 Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@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@posteo.net>
 ;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2021 ZmnSCPxj jxPCSnmZ <ZmnSCPxj@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





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

* bug#46266: [PATCH v2] gnu: Update bitcoin-core to 0.21.0
  2021-03-17 11:48 ` [bug#46266] [PATCH v2] " ZmnSCPxj via Guix-patches via
@ 2021-03-23 21:59   ` Christopher Baines
  0 siblings, 0 replies; 7+ messages in thread
From: Christopher Baines @ 2021-03-23 21:59 UTC (permalink / raw)
  To: ZmnSCPxj; +Cc: 46266-done

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


ZmnSCPxj <ZmnSCPxj@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

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

end of thread, other threads:[~2021-03-23 22:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-03  2:54 [bug#46266] [PATCH] gnu: Update bitcoin-core to 0.21.0 guix-patches--- via
2021-02-24  9:11 ` Christopher Baines
2021-03-16  2:53   ` ZmnSCPxj via Guix-patches via
2021-03-16 23:42     ` Christopher Baines
2021-03-17  3:18       ` ZmnSCPxj via Guix-patches via
2021-03-17 11:48 ` [bug#46266] [PATCH v2] " ZmnSCPxj via Guix-patches via
2021-03-23 21:59   ` bug#46266: " Christopher Baines

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.