From f4a1b43c4833ae41381db5ccb227715cadddfad1 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Fri, 3 Jan 2025 06:50:18 -0800 Subject: [PATCH 1/4] Continue receiving data for the current messages, even when we select to send (cherry picked from commit cd306bf8d3a0e5d2a7ab78020c417346a071acdc) --- src/net.cpp | 7 ++++++- src/net.h | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 1b0e7369a3..944c49cceb 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1425,6 +1425,9 @@ bool CConnman::GenerateSelectSet(const std::vector& nodes, // write buffer in this case before receiving more. This avoids // needlessly queueing received data, if the remote peer is not themselves // receiving data. This means properly utilizing TCP flow control signalling. + // This logic can put both nodes in deadlock if they are both "not receiving", + // so there is a special case where we only stop receiving new messages, but + // keep processing the in-progress ones. // * Otherwise, if there is space left in the receive buffer, select() for // receiving data. // * Hand off all complete messages to the processor, to be handled without @@ -1445,7 +1448,9 @@ bool CConnman::GenerateSelectSet(const std::vector& nodes, error_set.insert(pnode->m_sock->Get()); if (select_send) { send_set.insert(pnode->m_sock->Get()); - continue; + // Only stop receiving new messages, but keep processing incomplete ones + if (pnode->m_deserializer->IsEmpty()) + continue; } if (select_recv) { recv_set.insert(pnode->m_sock->Get()); diff --git a/src/net.h b/src/net.h index 421e3a85a1..d34912c62b 100644 --- a/src/net.h +++ b/src/net.h @@ -313,6 +313,8 @@ class CNetMessage { */ class TransportDeserializer { public: + // returns true if the current deserialization is empty + virtual bool IsEmpty() const = 0; // returns true if the current deserialization is complete virtual bool Complete() const = 0; // set the serialization context version @@ -363,6 +365,10 @@ class V1TransportDeserializer final : public TransportDeserializer Reset(); } + bool IsEmpty() const override + { + return (nHdrPos == 0); + } bool Complete() const override { if (!in_data) From 475e77c836705c42a82694d146187a3efee9e429 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Thu, 9 Jan 2025 08:52:01 -0800 Subject: [PATCH 2/4] Update copyright year to 2025 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 93ea370b19..b32e29b4a3 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ define(_CLIENT_VERSION_MINOR, 2) define(_CLIENT_VERSION_BUILD, 5) define(_CLIENT_VERSION_RC, 1) define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2024) +define(_COPYRIGHT_YEAR, 2025) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Elements Project]]) AC_INIT([Elements Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/ElementsProject/elements/issues],[elements],[https://elementsproject.org/]) From 5b5740e59385112dac0d015b48316bf91745233b Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Thu, 9 Jan 2025 08:58:00 -0800 Subject: [PATCH 3/4] Update manpages --- doc/man/elements-cli.1 | 6 +++--- doc/man/elements-qt.1 | 9 +++++---- doc/man/elements-tx.1 | 6 +++--- doc/man/elements-util.1 | 6 +++--- doc/man/elements-wallet.1 | 6 +++--- doc/man/elementsd.1 | 9 +++++---- 6 files changed, 22 insertions(+), 20 deletions(-) diff --git a/doc/man/elements-cli.1 b/doc/man/elements-cli.1 index 04d552f071..0b64946743 100644 --- a/doc/man/elements-cli.1 +++ b/doc/man/elements-cli.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH ELEMENTS-CLI "1" "November 2024" "elements-cli v23.2.5" "User Commands" +.TH ELEMENTS-CLI "1" "January 2025" "elements-cli v23.2.5" "User Commands" .SH NAME elements-cli \- manual page for elements-cli v23.2.5 .SH SYNOPSIS @@ -271,8 +271,8 @@ pre\-dynamic federations. Only used for testing in custom chains. Per\-chain parameter that sets how long a particular fedpegscript is in effect for. .SH COPYRIGHT -Copyright (C) 2009-2024 The Elements Project developers -Copyright (C) 2009-2024 The Bitcoin Core developers +Copyright (C) 2009-2025 The Elements Project developers +Copyright (C) 2009-2025 The Bitcoin Core developers Please contribute if you find Elements Core useful. Visit for further information about the software. diff --git a/doc/man/elements-qt.1 b/doc/man/elements-qt.1 index f427778c51..8d0715c239 100644 --- a/doc/man/elements-qt.1 +++ b/doc/man/elements-qt.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH ELEMENTS-QT "1" "November 2024" "elements-qt v23.2.5" "User Commands" +.TH ELEMENTS-QT "1" "January 2025" "elements-qt v23.2.5" "User Commands" .SH NAME elements-qt \- manual page for elements-qt v23.2.5 .SH SYNOPSIS @@ -637,7 +637,8 @@ Chain selection options: .HP \fB\-acceptdiscountct\fR .IP -Accept discounted fees for Confidential Transactions (default: false) +Accept discounted fees for Confidential Transactions (default: true in +liquidtestnet and liquidv1, false otherwise) .HP \fB\-bech32_hrp\fR .IP @@ -1063,8 +1064,8 @@ trusted mainchain daemon using the `mainchain*` settings below. All functionaries must run this enabled. (default: true if chain has federated peg) .SH COPYRIGHT -Copyright (C) 2009-2024 The Elements Project developers -Copyright (C) 2009-2024 The Bitcoin Core developers +Copyright (C) 2009-2025 The Elements Project developers +Copyright (C) 2009-2025 The Bitcoin Core developers Please contribute if you find Elements Core useful. Visit for further information about the software. diff --git a/doc/man/elements-tx.1 b/doc/man/elements-tx.1 index 2e4055d19e..12a4314e61 100644 --- a/doc/man/elements-tx.1 +++ b/doc/man/elements-tx.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH ELEMENTS-TX "1" "November 2024" "elements-tx v23.2.5" "User Commands" +.TH ELEMENTS-TX "1" "January 2025" "elements-tx v23.2.5" "User Commands" .SH NAME elements-tx \- manual page for elements-tx v23.2.5 .SH SYNOPSIS @@ -240,8 +240,8 @@ set=NAME:JSON\-STRING .IP Set register NAME to given JSON\-STRING .SH COPYRIGHT -Copyright (C) 2009-2024 The Elements Project developers -Copyright (C) 2009-2024 The Bitcoin Core developers +Copyright (C) 2009-2025 The Elements Project developers +Copyright (C) 2009-2025 The Bitcoin Core developers Please contribute if you find Elements Core useful. Visit for further information about the software. diff --git a/doc/man/elements-util.1 b/doc/man/elements-util.1 index bf2730c6d2..c312918d1b 100644 --- a/doc/man/elements-util.1 +++ b/doc/man/elements-util.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH ELEMENTS-UTIL "1" "November 2024" "elements-util v23.2.5" "User Commands" +.TH ELEMENTS-UTIL "1" "January 2025" "elements-util v23.2.5" "User Commands" .SH NAME elements-util \- manual page for elements-util v23.2.5 .SH SYNOPSIS @@ -155,8 +155,8 @@ grind .IP Perform proof of work on hex header string .SH COPYRIGHT -Copyright (C) 2009-2024 The Elements Project developers -Copyright (C) 2009-2024 The Bitcoin Core developers +Copyright (C) 2009-2025 The Elements Project developers +Copyright (C) 2009-2025 The Bitcoin Core developers Please contribute if you find Elements Core useful. Visit for further information about the software. diff --git a/doc/man/elements-wallet.1 b/doc/man/elements-wallet.1 index 9769e7ab6b..6daa9bff44 100644 --- a/doc/man/elements-wallet.1 +++ b/doc/man/elements-wallet.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH ELEMENTS-WALLET "1" "November 2024" "elements-wallet v23.2.5" "User Commands" +.TH ELEMENTS-WALLET "1" "January 2025" "elements-wallet v23.2.5" "User Commands" .SH NAME elements-wallet \- manual page for elements-wallet v23.2.5 .SH DESCRIPTION @@ -211,8 +211,8 @@ salvage Attempt to recover private keys from a corrupt wallet. Warning: \&'salvage' is experimental. .SH COPYRIGHT -Copyright (C) 2009-2024 The Elements Project developers -Copyright (C) 2009-2024 The Bitcoin Core developers +Copyright (C) 2009-2025 The Elements Project developers +Copyright (C) 2009-2025 The Bitcoin Core developers Please contribute if you find Elements Core useful. Visit for further information about the software. diff --git a/doc/man/elementsd.1 b/doc/man/elementsd.1 index 393e0b5a1d..5f3da70b9e 100644 --- a/doc/man/elementsd.1 +++ b/doc/man/elementsd.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH ELEMENTSD "1" "November 2024" "elementsd v23.2.5" "User Commands" +.TH ELEMENTSD "1" "January 2025" "elementsd v23.2.5" "User Commands" .SH NAME elementsd \- manual page for elementsd v23.2.5 .SH SYNOPSIS @@ -637,7 +637,8 @@ Chain selection options: .HP \fB\-acceptdiscountct\fR .IP -Accept discounted fees for Confidential Transactions (default: false) +Accept discounted fees for Confidential Transactions (default: true in +liquidtestnet and liquidv1, false otherwise) .HP \fB\-bech32_hrp\fR .IP @@ -1041,8 +1042,8 @@ trusted mainchain daemon using the `mainchain*` settings below. All functionaries must run this enabled. (default: true if chain has federated peg) .SH COPYRIGHT -Copyright (C) 2009-2024 The Elements Project developers -Copyright (C) 2009-2024 The Bitcoin Core developers +Copyright (C) 2009-2025 The Elements Project developers +Copyright (C) 2009-2025 The Bitcoin Core developers Please contribute if you find Elements Core useful. Visit for further information about the software. From 4a2f79b60151e400f61124e62633c6a062c83fd7 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Thu, 9 Jan 2025 08:58:41 -0800 Subject: [PATCH 4/4] Bump version to 23.2.5 final --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b32e29b4a3..45735e2dd8 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 23) define(_CLIENT_VERSION_MINOR, 2) define(_CLIENT_VERSION_BUILD, 5) -define(_CLIENT_VERSION_RC, 1) +define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2025) define(_COPYRIGHT_HOLDERS,[The %s developers])