Skip to content

Commit e0a68d9

Browse files
authored
Merge pull request #1387 from psgreco/elem-23.2.6-rc1
Prepare 23.2.6 rc1
2 parents 81ea480 + c315124 commit e0a68d9

19 files changed

Lines changed: 154 additions & 46 deletions

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
AC_PREREQ([2.69])
22
define(_CLIENT_VERSION_MAJOR, 23)
33
define(_CLIENT_VERSION_MINOR, 2)
4-
define(_CLIENT_VERSION_BUILD, 5)
5-
define(_CLIENT_VERSION_RC, 0)
4+
define(_CLIENT_VERSION_BUILD, 6)
5+
define(_CLIENT_VERSION_RC, 1)
66
define(_CLIENT_VERSION_IS_RELEASE, true)
77
define(_COPYRIGHT_YEAR, 2025)
88
define(_COPYRIGHT_HOLDERS,[The %s developers])

doc/man/elements-cli.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
2-
.TH ELEMENTS-CLI "1" "January 2025" "elements-cli v23.2.5" "User Commands"
2+
.TH ELEMENTS-CLI "1" "January 2025" "elements-cli v23.2.6" "User Commands"
33
.SH NAME
4-
elements-cli \- manual page for elements-cli v23.2.5
4+
elements-cli \- manual page for elements-cli v23.2.6
55
.SH SYNOPSIS
66
.B elements-cli
77
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Elements Core\/\fR
@@ -15,7 +15,7 @@ elements-cli \- manual page for elements-cli v23.2.5
1515
.B elements-cli
1616
[\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR
1717
.SH DESCRIPTION
18-
Elements Core RPC client version v23.2.5
18+
Elements Core RPC client version v23.2.6
1919
.SH OPTIONS
2020
.HP
2121
\-?

doc/man/elements-qt.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
2-
.TH ELEMENTS-QT "1" "January 2025" "elements-qt v23.2.5" "User Commands"
2+
.TH ELEMENTS-QT "1" "January 2025" "elements-qt v23.2.6" "User Commands"
33
.SH NAME
4-
elements-qt \- manual page for elements-qt v23.2.5
4+
elements-qt \- manual page for elements-qt v23.2.6
55
.SH SYNOPSIS
66
.B elements-qt
77
[\fI\,command-line options\/\fR]
88
.SH DESCRIPTION
9-
Elements Core version v23.2.5
9+
Elements Core version v23.2.6
1010
.SH OPTIONS
1111
.HP
1212
\-?

doc/man/elements-tx.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
2-
.TH ELEMENTS-TX "1" "January 2025" "elements-tx v23.2.5" "User Commands"
2+
.TH ELEMENTS-TX "1" "January 2025" "elements-tx v23.2.6" "User Commands"
33
.SH NAME
4-
elements-tx \- manual page for elements-tx v23.2.5
4+
elements-tx \- manual page for elements-tx v23.2.6
55
.SH SYNOPSIS
66
.B elements-tx
77
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded Elements transaction\/\fR
88
.br
99
.B elements-tx
1010
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded Elements transaction\/\fR
1111
.SH DESCRIPTION
12-
Elements Core elements\-tx utility version v23.2.5
12+
Elements Core elements\-tx utility version v23.2.6
1313
.SH OPTIONS
1414
.HP
1515
\-?

doc/man/elements-util.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
2-
.TH ELEMENTS-UTIL "1" "January 2025" "elements-util v23.2.5" "User Commands"
2+
.TH ELEMENTS-UTIL "1" "January 2025" "elements-util v23.2.6" "User Commands"
33
.SH NAME
4-
elements-util \- manual page for elements-util v23.2.5
4+
elements-util \- manual page for elements-util v23.2.6
55
.SH SYNOPSIS
66
.B bitcoin-util
77
[\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR
88
.SH DESCRIPTION
9-
Elements Core bitcoin\-util utility version v23.2.5
9+
Elements Core bitcoin\-util utility version v23.2.6
1010
.SH OPTIONS
1111
.HP
1212
\-?

doc/man/elements-wallet.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
2-
.TH ELEMENTS-WALLET "1" "January 2025" "elements-wallet v23.2.5" "User Commands"
2+
.TH ELEMENTS-WALLET "1" "January 2025" "elements-wallet v23.2.6" "User Commands"
33
.SH NAME
4-
elements-wallet \- manual page for elements-wallet v23.2.5
4+
elements-wallet \- manual page for elements-wallet v23.2.6
55
.SH DESCRIPTION
6-
Elements Core elements\-wallet version v23.2.5
6+
Elements Core elements\-wallet version v23.2.6
77
.PP
88
elements\-wallet is an offline tool for creating and interacting with Elements Core wallet files.
99
By default elements\-wallet will act on wallets in the default mainnet wallet directory in the datadir.

doc/man/elementsd.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
2-
.TH ELEMENTSD "1" "January 2025" "elementsd v23.2.5" "User Commands"
2+
.TH ELEMENTSD "1" "January 2025" "elementsd v23.2.6" "User Commands"
33
.SH NAME
4-
elementsd \- manual page for elementsd v23.2.5
4+
elementsd \- manual page for elementsd v23.2.6
55
.SH SYNOPSIS
66
.B elementsd
77
[\fI\,options\/\fR] \fI\,Start Elements Core\/\fR
88
.SH DESCRIPTION
9-
Elements Core version v23.2.5
9+
Elements Core version v23.2.6
1010
.SH OPTIONS
1111
.HP
1212
\-?

src/asset.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,19 @@ bool operator==(const CAmountMap& a, const CAmountMap& b);
9090
bool operator!=(const CAmountMap& a, const CAmountMap& b);
9191
bool operator!(const CAmountMap& a); // Check if all values are 0
9292

93-
inline bool MoneyRange(const CAmountMap& mapValue) {
93+
inline bool MoneyRange(const CAmountMap& mapValue, const CAsset& pegged_asset) {
9494
for(CAmountMap::const_iterator it = mapValue.begin(); it != mapValue.end(); it++) {
95-
if (it->second < 0 || it->second > MAX_MONEY) {
95+
if (it->second < 0 || ((pegged_asset.IsNull() || it->first == pegged_asset) && it->second > MAX_MONEY)) {
9696
return false;
9797
}
9898
}
9999
return true;
100100
}
101101

102+
inline bool MoneyRange(const CAmountMap& mapValue) {
103+
return MoneyRange(mapValue, CAsset());
104+
}
105+
102106
CAmount valueFor(const CAmountMap& mapValue, const CAsset& asset);
103107

104108
std::ostream& operator<<(std::ostream& out, const CAmountMap& map);

src/blind.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <blind.h>
6+
#include <chainparams.h>
67

78
#include <hash.h>
89
#include <primitives/transaction.h>
@@ -157,11 +158,6 @@ bool UnblindConfidentialPair(const CKey& blinding_key, const CConfidentialValue&
157158
return false;
158159
}
159160

160-
// Value sidechannel must be a transaction-valid amount (should be belt-and-suspenders check)
161-
if (amount > (uint64_t)MAX_MONEY || !MoneyRange((CAmount)amount)) {
162-
return false;
163-
}
164-
165161
// Convenience pointers to starting point of each recovered 32 byte message
166162
unsigned char *asset_type = msg;
167163
unsigned char *asset_blinder = msg+32;
@@ -172,6 +168,13 @@ bool UnblindConfidentialPair(const CKey& blinding_key, const CConfidentialValue&
172168
return false;
173169
}
174170

171+
CAsset asset{std::vector<unsigned char>{asset_type, asset_type + 32}};
172+
173+
// Value sidechannel must be a transaction-valid amount (should be belt-and-suspenders check)
174+
if ((!committedScript.IsUnspendable() && amount == 0) || (asset == Params().GetConsensus().pegged_asset && (amount > (uint64_t)MAX_MONEY || !MoneyRange((CAmount)amount)))) {
175+
return false;
176+
}
177+
175178
// Serialize both generators then compare
176179
unsigned char observed_generator[33];
177180
unsigned char derived_generator[33];
@@ -182,7 +185,7 @@ bool UnblindConfidentialPair(const CKey& blinding_key, const CConfidentialValue&
182185
}
183186

184187
amount_out = (CAmount)amount;
185-
asset_out = CAsset(std::vector<unsigned char>(asset_type, asset_type+32));
188+
asset_out = asset;
186189
asset_blinding_factor_out = uint256(std::vector<unsigned char>(asset_blinder, asset_blinder+32));
187190
return true;
188191
}

src/rpc/rawtransaction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3050,7 +3050,7 @@ static RPCHelpMan rawissueasset()
30503050
CAmount asset_amount = 0;
30513051
const UniValue& asset_amount_uni = issuance_o["asset_amount"];
30523052
if (asset_amount_uni.isNum()) {
3053-
asset_amount = AmountFromValue(asset_amount_uni);
3053+
asset_amount = AmountFromValue(asset_amount_uni, false);
30543054
if (asset_amount <= 0) {
30553055
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, asset_amount must be positive");
30563056
}
@@ -3067,7 +3067,7 @@ static RPCHelpMan rawissueasset()
30673067
CAmount token_amount = 0;
30683068
const UniValue& token_amount_uni = issuance_o["token_amount"];
30693069
if (token_amount_uni.isNum()) {
3070-
token_amount = AmountFromValue(token_amount_uni);
3070+
token_amount = AmountFromValue(token_amount_uni, false);
30713071
if (token_amount <= 0) {
30723072
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, token_amount must be positive");
30733073
}
@@ -3178,7 +3178,7 @@ static RPCHelpMan rawreissueasset()
31783178
CAmount asset_amount = 0;
31793179
const UniValue& asset_amount_uni = issuance_o["asset_amount"];
31803180
if (asset_amount_uni.isNum()) {
3181-
asset_amount = AmountFromValue(asset_amount_uni);
3181+
asset_amount = AmountFromValue(asset_amount_uni, false);
31823182
if (asset_amount <= 0) {
31833183
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, asset_amount must be positive");
31843184
}

0 commit comments

Comments
 (0)