Skip to content

Commit

Permalink
Merge branch 'auxpow-28.x' into 28.x
Browse files Browse the repository at this point in the history
  • Loading branch information
domob1812 committed Jan 13, 2025
2 parents a12097e + 78f1ab0 commit fa206ed
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 35 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.69])
define(_CLIENT_VERSION_MAJOR, 28)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 2)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2024)
define(_COPYRIGHT_HOLDERS,[The %s developers])
Expand Down
2 changes: 0 additions & 2 deletions depends/hosts/netbsd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ netbsd_NM = $(host_toolchain)gcc-nm
netbsd_RANLIB = $(host_toolchain)gcc-ranlib
endif

netbsd_CXXFLAGS=$(netbsd_CFLAGS)

netbsd_release_CFLAGS=-O2
netbsd_release_CXXFLAGS=$(netbsd_release_CFLAGS)

Expand Down
6 changes: 3 additions & 3 deletions doc/man/namecoin-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.1.
.TH NAMECOIN-CLI "1" "December 2024" "namecoin-cli v28.1.0rc2" "User Commands"
.TH NAMECOIN-CLI "1" "January 2025" "namecoin-cli v28.1.0" "User Commands"
.SH NAME
namecoin-cli \- manual page for namecoin-cli v28.1.0rc2
namecoin-cli \- manual page for namecoin-cli v28.1.0
.SH SYNOPSIS
.B namecoin-cli
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Namecoin Core\/\fR
Expand All @@ -15,7 +15,7 @@ namecoin-cli \- manual page for namecoin-cli v28.1.0rc2
.B namecoin-cli
[\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR
.SH DESCRIPTION
Namecoin Core RPC client version v28.1.0rc2
Namecoin Core RPC client version v28.1.0
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/namecoin-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.1.
.TH NAMECOIN-QT "1" "December 2024" "namecoin-qt v28.1.0rc2" "User Commands"
.TH NAMECOIN-QT "1" "January 2025" "namecoin-qt v28.1.0" "User Commands"
.SH NAME
namecoin-qt \- manual page for namecoin-qt v28.1.0rc2
namecoin-qt \- manual page for namecoin-qt v28.1.0
.SH SYNOPSIS
.B namecoin-qt
[\fI\,command-line options\/\fR] [\fI\,URI\/\fR]
.SH DESCRIPTION
Namecoin Core version v28.1.0rc2
Namecoin Core version v28.1.0
.PP
Optional URI is a Namecoin address in BIP21 URI format.
.SH OPTIONS
Expand Down
6 changes: 3 additions & 3 deletions doc/man/namecoin-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.1.
.TH NAMECOIN-TX "1" "December 2024" "namecoin-tx v28.1.0rc2" "User Commands"
.TH NAMECOIN-TX "1" "January 2025" "namecoin-tx v28.1.0" "User Commands"
.SH NAME
namecoin-tx \- manual page for namecoin-tx v28.1.0rc2
namecoin-tx \- manual page for namecoin-tx v28.1.0
.SH SYNOPSIS
.B namecoin-tx
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded transaction\/\fR
.br
.B namecoin-tx
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded transaction\/\fR
.SH DESCRIPTION
Namecoin Core namecoin\-tx utility version v28.1.0rc2
Namecoin Core namecoin\-tx utility version v28.1.0
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/namecoin-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.1.
.TH NAMECOIN-UTIL "1" "December 2024" "namecoin-util v28.1.0rc2" "User Commands"
.TH NAMECOIN-UTIL "1" "January 2025" "namecoin-util v28.1.0" "User Commands"
.SH NAME
namecoin-util \- manual page for namecoin-util v28.1.0rc2
namecoin-util \- manual page for namecoin-util v28.1.0
.SH SYNOPSIS
.B bitcoin-util
[\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR
.SH DESCRIPTION
Namecoin Core bitcoin\-util utility version v28.1.0rc2
Namecoin Core bitcoin\-util utility version v28.1.0
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/namecoin-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.1.
.TH NAMECOIN-WALLET "1" "December 2024" "namecoin-wallet v28.1.0rc2" "User Commands"
.TH NAMECOIN-WALLET "1" "January 2025" "namecoin-wallet v28.1.0" "User Commands"
.SH NAME
namecoin-wallet \- manual page for namecoin-wallet v28.1.0rc2
namecoin-wallet \- manual page for namecoin-wallet v28.1.0
.SH DESCRIPTION
Namecoin Core namecoin\-wallet version v28.1.0rc2
Namecoin Core namecoin\-wallet version v28.1.0
.PP
namecoin\-wallet is an offline tool for creating and interacting with Namecoin Core wallet files.
By default namecoin\-wallet will act on wallets in the default mainnet wallet directory in the datadir.
Expand Down
6 changes: 3 additions & 3 deletions doc/man/namecoind.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.1.
.TH NAMECOIND "1" "December 2024" "namecoind v28.1.0rc2" "User Commands"
.TH NAMECOIND "1" "January 2025" "namecoind v28.1.0" "User Commands"
.SH NAME
namecoind \- manual page for namecoind v28.1.0rc2
namecoind \- manual page for namecoind v28.1.0
.SH SYNOPSIS
.B namecoind
[\fI\,options\/\fR] \fI\,Start Namecoin Core\/\fR
.SH DESCRIPTION
Namecoin Core version v28.1.0rc2
Namecoin Core version v28.1.0
.SH OPTIONS
.HP
\-?
Expand Down
7 changes: 5 additions & 2 deletions doc/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Bitcoin Core version 28.1rc1 is now available from:
Bitcoin Core version 28.1 is now available from:

<https://bitcoincore.org/bin/bitcoin-core-28.1/test.rc1>
<https://bitcoincore.org/bin/bitcoin-core-28.1>

This release includes new features, various bug fixes and performance
improvements, as well as updated translations.
Expand Down Expand Up @@ -68,12 +68,14 @@ Notable changes
### Build

- #31013 depends: For mingw cross compile use `-gcc-posix` to prevent library conflict
- #31502 depends: Fix CXXFLAGS on NetBSD

### Test

- #31016 test: add missing sync to feature_fee_estimation.py
- #31448 fuzz: add cstdlib to FuzzedDataProvider
- #31419 test: fix MIN macro redefinition
- #31563 rpc: Extend scope of validation mutex in generateblock

### Doc

Expand All @@ -92,6 +94,7 @@ Credits
=======

- fanquake
- Hennadii Stepanov
- laanwj
- MarcoFalke
- Martin Zumsande
Expand Down
23 changes: 12 additions & 11 deletions src/rpc/mining.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2022 The Bitcoin Core developers
// Copyright (c) 2009-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -373,20 +373,21 @@ static RPCHelpMan generateblock()

ChainstateManager& chainman = EnsureChainman(node);
{
std::unique_ptr<CBlockTemplate> blocktemplate{miner.createNewBlock(coinbase_script, {.use_mempool = false})};
if (!blocktemplate) {
throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't create new block");
LOCK(chainman.GetMutex());
{
std::unique_ptr<CBlockTemplate> blocktemplate{miner.createNewBlock(coinbase_script, {.use_mempool = false})};
if (!blocktemplate) {
throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't create new block");
}
block = blocktemplate->block;
}
block = blocktemplate->block;
}

CHECK_NONFATAL(block.vtx.size() == 1);
CHECK_NONFATAL(block.vtx.size() == 1);

// Add transactions
block.vtx.insert(block.vtx.end(), txs.begin(), txs.end());
RegenerateCommitments(block, chainman);
// Add transactions
block.vtx.insert(block.vtx.end(), txs.begin(), txs.end());
RegenerateCommitments(block, chainman);

{
BlockValidationState state;
if (!miner.testBlockValidity(block, /*check_merkle_root=*/false, state)) {
throw JSONRPCError(RPC_VERIFY_ERROR, strprintf("testBlockValidity failed: %s", state.ToString()));
Expand Down
11 changes: 10 additions & 1 deletion test/functional/rpc_generate.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env python3
# Copyright (c) 2020-2022 The Bitcoin Core developers
# Copyright (c) 2020-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test generate* RPCs."""

from concurrent.futures import ThreadPoolExecutor

from test_framework.test_framework import BitcoinTestFramework
from test_framework.wallet import MiniWallet
from test_framework.util import (
Expand Down Expand Up @@ -83,6 +85,13 @@ def test_generateblock(self):
txid = block['tx'][1]
assert_equal(node.getrawtransaction(txid=txid, verbose=False, blockhash=hash), rawtx)

# Ensure that generateblock can be called concurrently by many threads.
self.log.info('Generate blocks in parallel')
generate_50_blocks = lambda n: [n.generateblock(output=address, transactions=[]) for _ in range(50)]
rpcs = [node.cli for _ in range(6)]
with ThreadPoolExecutor(max_workers=len(rpcs)) as threads:
list(threads.map(generate_50_blocks, rpcs))

self.log.info('Fail to generate block with out of order txs')
txid1 = miniwallet.send_self_transfer(from_node=node)['txid']
utxo1 = miniwallet.get_utxo(txid=txid1)
Expand Down

0 comments on commit fa206ed

Please sign in to comment.