Skip to content

Commit

Permalink
Merge pull request #1361 from psgreco/elem-23.2.3-rc1
Browse files Browse the repository at this point in the history
Prepare 23.2.3 rc1
  • Loading branch information
jamesdorfman authored Aug 26, 2024
2 parents 4b8daa9 + bb9e44d commit d75c232
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 25 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
AC_PREREQ([2.69])
define(_CLIENT_VERSION_MAJOR, 23)
define(_CLIENT_VERSION_MINOR, 2)
define(_CLIENT_VERSION_BUILD, 2)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_BUILD, 3)
define(_CLIENT_VERSION_RC, 1)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2024)
define(_COPYRIGHT_HOLDERS,[The %s developers])
Expand Down
6 changes: 3 additions & 3 deletions doc/man/elements-cli.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH ELEMENTS-CLI "1" "July 2024" "elements-cli v23.2.2" "User Commands"
.TH ELEMENTS-CLI "1" "August 2024" "elements-cli v23.2.3" "User Commands"
.SH NAME
elements-cli \- manual page for elements-cli v23.2.2
elements-cli \- manual page for elements-cli v23.2.3
.SH SYNOPSIS
.B elements-cli
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Elements Core\/\fR
Expand All @@ -15,7 +15,7 @@ elements-cli \- manual page for elements-cli v23.2.2
.B elements-cli
[\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR
.SH DESCRIPTION
Elements Core RPC client version v23.2.2
Elements Core RPC client version v23.2.3
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/elements-qt.1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH ELEMENTS-QT "1" "July 2024" "elements-qt v23.2.2" "User Commands"
.TH ELEMENTS-QT "1" "August 2024" "elements-qt v23.2.3" "User Commands"
.SH NAME
elements-qt \- manual page for elements-qt v23.2.2
elements-qt \- manual page for elements-qt v23.2.3
.SH SYNOPSIS
.B elements-qt
[\fI\,command-line options\/\fR]
.SH DESCRIPTION
Elements Core version v23.2.2
Elements Core version v23.2.3
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/elements-tx.1
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH ELEMENTS-TX "1" "July 2024" "elements-tx v23.2.2" "User Commands"
.TH ELEMENTS-TX "1" "August 2024" "elements-tx v23.2.3" "User Commands"
.SH NAME
elements-tx \- manual page for elements-tx v23.2.2
elements-tx \- manual page for elements-tx v23.2.3
.SH SYNOPSIS
.B elements-tx
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded Elements transaction\/\fR
.br
.B elements-tx
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded Elements transaction\/\fR
.SH DESCRIPTION
Elements Core elements\-tx utility version v23.2.2
Elements Core elements\-tx utility version v23.2.3
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/elements-util.1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH ELEMENTS-UTIL "1" "July 2024" "elements-util v23.2.2" "User Commands"
.TH ELEMENTS-UTIL "1" "August 2024" "elements-util v23.2.3" "User Commands"
.SH NAME
elements-util \- manual page for elements-util v23.2.2
elements-util \- manual page for elements-util v23.2.3
.SH SYNOPSIS
.B bitcoin-util
[\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR
.SH DESCRIPTION
Elements Core bitcoin\-util utility version v23.2.2
Elements Core bitcoin\-util utility version v23.2.3
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/elements-wallet.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH ELEMENTS-WALLET "1" "July 2024" "elements-wallet v23.2.2" "User Commands"
.TH ELEMENTS-WALLET "1" "August 2024" "elements-wallet v23.2.3" "User Commands"
.SH NAME
elements-wallet \- manual page for elements-wallet v23.2.2
elements-wallet \- manual page for elements-wallet v23.2.3
.SH DESCRIPTION
Elements Core elements\-wallet version v23.2.2
Elements Core elements\-wallet version v23.2.3
.PP
elements\-wallet is an offline tool for creating and interacting with Elements Core wallet files.
By default elements\-wallet will act on wallets in the default mainnet wallet directory in the datadir.
Expand Down
6 changes: 3 additions & 3 deletions doc/man/elementsd.1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH ELEMENTSD "1" "July 2024" "elementsd v23.2.2" "User Commands"
.TH ELEMENTSD "1" "August 2024" "elementsd v23.2.3" "User Commands"
.SH NAME
elementsd \- manual page for elementsd v23.2.2
elementsd \- manual page for elementsd v23.2.3
.SH SYNOPSIS
.B elementsd
[\fI\,options\/\fR] \fI\,Start Elements Core\/\fR
.SH DESCRIPTION
Elements Core version v23.2.2
Elements Core version v23.2.3
.SH OPTIONS
.HP
\-?
Expand Down
8 changes: 6 additions & 2 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,8 @@ class CCustomParams : public CRegTestParams {
const CScript default_script(CScript() << OP_TRUE);
consensus.fedpegScript = StrHexToScriptWithDefault(args.GetArg("-fedpegscript", ""), default_script);
consensus.start_p2wsh_script = args.GetIntArg("-con_start_p2wsh_script", consensus.start_p2wsh_script);
create_discount_ct = args.GetBoolArg("-creatediscountct", false);
accept_discount_ct = args.GetBoolArg("-acceptdiscountct", false) || create_discount_ct;
create_discount_ct = args.GetBoolArg("-creatediscountct", create_discount_ct);
accept_discount_ct = args.GetBoolArg("-acceptdiscountct", accept_discount_ct) || create_discount_ct;

// Calculate pegged Bitcoin asset
std::vector<unsigned char> commit = CommitToArguments(consensus, strNetworkID);
Expand Down Expand Up @@ -974,6 +974,8 @@ class CCustomParams : public CRegTestParams {
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].min_activation_height = 0; // No activation delay

create_discount_ct = false;
accept_discount_ct = false;
UpdateFromArgs(args);
SetGenesisBlock();
consensus.hashGenesisBlock = genesis.GetHash();
Expand Down Expand Up @@ -1017,6 +1019,8 @@ class CLiquidTestNetParams : public CCustomParams {

default_magic_str = "410EDD62";
default_signblockscript = "51210217e403ddb181872c32a0cd468c710040b2f53d8cac69f18dad07985ee37e9a7151ae";
create_discount_ct = false;
accept_discount_ct = true;
UpdateFromArgs(args);
multi_data_permitted = true;
SetGenesisBlock();
Expand Down
12 changes: 10 additions & 2 deletions src/node/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,15 +441,23 @@ void BlockAssembler::addPackageTxs(int& nPackagesSelected, int& nDescendantsUpda
uint64_t packageSize = iter->GetSizeWithAncestors();
CAmount packageFees = iter->GetModFeesWithAncestors();
int64_t packageSigOpsCost = iter->GetSigOpCostWithAncestors();
uint64_t discountSize = iter->GetDiscountSizeWithAncestors();
if (fUsingModified) {
packageSize = modit->nSizeWithAncestors;
packageFees = modit->nModFeesWithAncestors;
packageSigOpsCost = modit->nSigOpCostWithAncestors;
discountSize = modit->discountSizeWithAncestors;
}

if (packageFees < blockMinFeeRate.GetFee(packageSize)) {
// Everything else we might consider has a lower fee rate
return;
if (Params().GetAcceptDiscountCT()) {
if (packageFees < blockMinFeeRate.GetFee(discountSize)) {
return;
}
} else {
// Everything else we might consider has a lower fee rate
return;
}
}

if (!TestPackage(packageSize, packageSigOpsCost)) {
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/rpc/elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ static UniValue createrawpegin(const JSONRPCRequest& request, T_tx_ref& txBTCRef

// Estimate fee for transaction, decrement fee output(including witness data)
unsigned int nBytes = GetVirtualTransactionSize(CTransaction(mtx)) +
(1+1+72+1+33/WITNESS_SCALE_FACTOR);
(1+1+72+1+33)/WITNESS_SCALE_FACTOR;
CCoinControl coin_control;
FeeCalculation feeCalc;
CAmount nFeeNeeded = GetMinimumFee(*pwallet, nBytes, coin_control, &feeCalc);
Expand Down
30 changes: 30 additions & 0 deletions test/functional/feature_discount_ct.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def set_test_params(self):
"-con_connect_genesis_outputs=1",
"-initialfreecoins=2100000000000000",
"-txindex=1",
"-minrelaytxfee=0.00000100",
"-blockmintxfee=0.00000100",
"-fallbackfee=0.00000100",
]
self.extra_args = [
# node 0 does not accept nor create discounted CTs
Expand Down Expand Up @@ -154,6 +157,33 @@ def run_test(self):
tx = node0.getrawtransaction(txid, True)
assert_equal(tx['vsize'], 2575)

# check liquidv1 min feerate
feerate = 0.1
self.log.info(f"Send confidential (discounted) tx to node 1 at {feerate} sats/vb")
addr = node1.getnewaddress()
info = node1.getaddressinfo(addr)
txid = node2.sendtoaddress(info['confidential'], 1.0, "", "", False, None, None, None, None, None, None, feerate)
self.sync_mempools([node1, node2])
assert_equal(node0.getrawmempool(), [])
self.generate(node2, 1, sync_fun=self.sync_blocks)
for node in [node2, node1]:
tx = node.gettransaction(txid, True, True)
assert_equal(tx["confirmations"], 1)
decoded = tx['decoded']
vin = decoded['vin']
vout = decoded['vout']
assert_equal(len(vin), 2)
assert_equal(len(vout), 3)
if 'bitcoin' in decoded['fee']:
assert_equal(decoded['fee']['bitcoin'], Decimal('-0.00000041'))
else:
assert_equal(decoded['fee'][bitcoin], Decimal('0.00000041'))
assert_equal(decoded['vsize'], 2575)
assert_equal(decoded['discountvsize'], 410)
# node0 only has vsize
tx = node0.getrawtransaction(txid, True)
assert_equal(tx['vsize'], 2575)


if __name__ == '__main__':
CTTest().main()

0 comments on commit d75c232

Please sign in to comment.