Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d3910c6
test: make two functional test checks able to fail
knst Nov 14, 2026
3786f8f
test: make index and EHF checks observe the behavior they name
knst Nov 15, 2026
37a9ec7
test: require the address index to catch both blocks mined while disa…
knst Nov 15, 2026
990a0f8
test: activate the payout-shares v24 deployment with activate_by_name
knst Nov 15, 2026
852654b
Merge bitcoin/bitcoin#28291: rpc: removed StrFormatInternalBug quote …
knst Sep 5, 2023
2de09c8
refactor: always serialize CDeterministicMN::nType
knst Nov 6, 2026
93e10bc
Merge bitcoin/bitcoin#28428: Hard-code version number value for CBloc…
knst Sep 9, 2023
036f2ed
Merge bitcoin/bitcoin#28458: refactor: Remove unused GetType() from C…
knst Sep 14, 2023
1557a36
Merge bitcoin/bitcoin#27850: test: Add unit & functional test coverag…
knst Sep 14, 2023
5e3b5c1
Merge bitcoin/bitcoin#28450: Add package evaluation fuzzer
knst Sep 28, 2023
d3e6849
test: drop RBF naming from the tx_pool fuzz target
knst Nov 10, 2026
cedd78f
Merge bitcoin/bitcoin#28471: Fix virtual size limit enforcement in tr…
knst Sep 21, 2023
e20b18d
Merge bitcoin/bitcoin#28483: refactor: Return CAutoFile from BlockMan…
knst Sep 26, 2023
33de87c
Merge bitcoin/bitcoin#28545: test: Avoid test failure on Linux root w…
knst Oct 2, 2023
4a690eb
Merge bitcoin/bitcoin#27609: rpc: allow submitpackage to be called ou…
knst Oct 5, 2023
92ccb7b
Merge bitcoin/bitcoin#28392: test: Use pathlib over os path
knst Oct 11, 2023
f1eaecc
CHECKPOINT: https://github.com/dashpay/dash/pull/8072/commits"
knst Nov 15, 2026
176297b
Merge bitcoin/bitcoin#28660: test: enable reindex readonly test on *BSD
knst Oct 24, 2023
564869e
Merge bitcoin/bitcoin#28423: kernel: Remove protocol.h/netaddress.h/c…
knst Sep 14, 2023
e95d803
Merge bitcoin/bitcoin#27861: kernel: Rm ShutdownRequested and AbortNo…
knst Jul 6, 2023
d5ad837
Merge bitcoin/bitcoin#28617: test: Add Wallet Unlock Context Manager
knst Oct 19, 2023
f37e857
Merge bitcoin/bitcoin#27765: test: Throw error when -signetchallenge …
knst May 29, 2023
4d89ca2
Merge bitcoin/bitcoin#27607: index: make startup more efficient
knst Jul 10, 2023
ae51a0a
Merge bitcoin/bitcoin#28053: refactor: Move stopafterblockimport opti…
knst Jul 11, 2023
917b4fb
Merge bitcoin/bitcoin#28048: kernel: Remove StartShutdown calls from …
knst Jul 14, 2023
b94d6a8
Merge bitcoin/bitcoin#27594: refactor: Remove unused GetTimeMillis
knst May 9, 2023
1f68be5
Merge bitcoin/bitcoin#28331: BIP324 integration
knst Oct 3, 2023
9055200
Merge bitcoin/bitcoin#28191: refactor: Remove unused MessageStartChar…
knst Aug 7, 2023
c6456e4
CHECKPOINT: bp-v26-p11
knst Nov 15, 2026
415f7ba
Merge bitcoin/bitcoin#28087: ci: Use qemu-user through container engine
knst Aug 9, 2023
6f8f99e
Merge bitcoin/bitcoin#28244: Break up script/standard.{h/cpp}
knst Aug 17, 2023
e80daed
Merge bitcoin/bitcoin#28284: refactor: Remove confusing static_cast i…
knst Aug 22, 2023
0f56d5e
Merge bitcoin/bitcoin#28195: blockstorage: Drop legacy -txindex check
knst Sep 5, 2023
f2e4242
Merge bitcoin/bitcoin#28246: wallet: Use CTxDestination in CRecipient…
knst Sep 19, 2023
54591c4
ci: retry the macOS SDK download in Guix setup-sdk
knst Nov 15, 2026
c581ad8
fix(rpc): align sendmsgtopeer with upstream bitcoin#28287
knst Nov 15, 2026
8967189
partial Merge bitcoin-core/gui#119: Replace send-to-self with dual se…
knst Sep 22, 2023
a24d735
Merge bitcoin/bitcoin#28575: ci: Print Linux kernel info
knst Oct 3, 2023
940451b
Merge bitcoin/bitcoin#28292: ci: Disable cache save for pull requests…
knst Aug 21, 2023
690dcd1
Merge bitcoin/bitcoin#28595: ci: Avoid cache depends/work/build
knst Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/guix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,14 @@ jobs:
restore-keys: |
depends-sources-

- name: Cache Guix and depends
- name: Restore Guix and depends cache
id: guix-cache-restore
if: github.ref_type != 'tag'
uses: actions/cache@v5
uses: actions/cache/restore@v5
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/dash/depends/built
${{ github.workspace }}/dash/depends/work
/gnu/store
key: ${{ runner.os }}-guix-${{ matrix.build_target }}-${{ github.sha }}
restore-keys: |
Expand Down Expand Up @@ -154,6 +153,16 @@ jobs:
exit 1
fi

- name: Save Guix and depends cache
if: github.ref_type != 'tag' && github.event_name != 'pull_request_target'
uses: actions/cache/save@v5
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/dash/depends/built
/gnu/store
key: ${{ runner.os }}-guix-${{ matrix.build_target }}-${{ github.sha }}

- name: Compute SHA256 checksums
continue-on-error: true # It will complain on depending on only some hosts
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
image: ${{ inputs.container-path }} # zizmor: ignore[unpinned-images] built earlier in this run by build-container.yml
# SYS_PTRACE is required by LeakSanitizer's stop-the-world
# (https://github.com/google/sanitizers/issues/764)
options: --user root --cap-add SYS_PTRACE
# LINUX_IMMUTABLE lets feature_reindex_readonly.py run chattr +i
options: --user root --cap-add LINUX_IMMUTABLE --cap-add SYS_PTRACE
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand Down
2 changes: 2 additions & 0 deletions ci/dash/test_integrationtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ if [ "$RUN_FUNCTIONAL_TESTS" != "true" ]; then
exit 0
fi

echo "System info: $(uname --kernel-name --kernel-release)"

if [ -z "$NO_DEPENDS" ]; then
export LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib
fi
Expand Down
2 changes: 2 additions & 0 deletions ci/dash/test_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ if [ "$RUN_UNIT_TESTS" != "true" ] && [ "$RUN_UNIT_TESTS_SEQUENTIAL" != "true" ]
exit 0
fi

echo "System info: $(uname --kernel-name --kernel-release)"

export BOOST_TEST_RANDOM="${BOOST_TEST_RANDOM:-1}"
if [ -z "$NO_DEPENDS" ]; then
export LD_LIBRARY_PATH="$DEPENDS_DIR/$HOST/lib"
Expand Down
8 changes: 0 additions & 8 deletions ci/test/00_setup_env_aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@
export LC_ALL=C.UTF-8

export HOST=aarch64-linux-gnu
# The host arch is unknown, so we run the tests through qemu.
# If the host is arm64 and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string.
if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-aarch64 -L /usr/aarch64-linux-gnu/"}"; fi
export DPKG_ADD_ARCH="arm64"
export PACKAGES="python3-zmq g++-11-aarch64-linux-gnu busybox libc6:arm64 libstdc++6:arm64 libfontconfig1:arm64 libxcb1:arm64"
if [ -n "$QEMU_USER_CMD" ]; then
# Likely cross-compiling, so install the needed gcc and qemu-user
export PACKAGES="$PACKAGES qemu-user"
fi
export CONTAINER_NAME=ci_aarch64_linux
# Use debian to avoid 404 apt errors when cross compiling
export CHECK_DOC=0
export USE_BUSY_BOX=true
export RUN_UNIT_TESTS=false
Expand Down
9 changes: 0 additions & 9 deletions ci/test/00_setup_env_s390x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,7 @@
export LC_ALL=C.UTF-8

export HOST=s390x-linux-gnu
# The host arch is unknown, so we run the tests through qemu.
# If the host is s390x and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string.
if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-s390x"}"; fi
export PACKAGES="python3-zmq"
if [ -n "$QEMU_USER_CMD" ]; then
# Likely cross-compiling, so install the needed gcc and qemu-user
export DPKG_ADD_ARCH="s390x"
export PACKAGES="$PACKAGES g++-s390x-linux-gnu qemu-user libc6:s390x libstdc++6:s390x"
fi
# Use debian to avoid 404 apt errors
export CONTAINER_NAME=ci_s390x
export RUN_UNIT_TESTS=true
export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
Expand Down
1 change: 1 addition & 0 deletions contrib/containers/ci/ci-slim.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN set -ex; \
build-essential \
ca-certificates \
curl \
e2fsprogs \
g++ \
git \
jq \
Expand Down
2 changes: 1 addition & 1 deletion contrib/containers/guix/scripts/setup-sdk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ ! -d "${SDK_PATH}/${XCODE_ARCHIVE}" ]; then
if [ ! -f "${XCODE_AR_PATH}" ]; then
echo "Downloading macOS SDK..."
mkdir -p "${SDK_SOURCES}"
curl --location --fail "${SDK_URL}/${XCODE_ARCHIVE}.tar" -o "${XCODE_AR_PATH}"
curl --location --fail --retry 3 "${SDK_URL}/${XCODE_ARCHIVE}.tar" -o "${XCODE_AR_PATH}"
fi
echo "Verifying macOS SDK..."
if [ "$(sha256sum "${XCODE_AR_PATH}" | cut -d' ' -f1)" != "${XCODE_AR_HASH}" ]; then
Expand Down
5 changes: 3 additions & 2 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,9 @@ Threads
: Started from `main()` in `bitcoind.cpp`. Responsible for starting up and
shutting down the application.

- [ThreadImport (`d-loadblk`)](https://doxygen.bitcoincore.org/namespacenode.html#ab4305679079866f0f420f7dbf278381d)
: Loads blocks from `blk*.dat` files or `-loadblock=<file>` on startup.
- [Init load (`d-initload`)](https://doxygen.bitcoincore.org/namespacenode.html#ab4305679079866f0f420f7dbf278381d)
: Performs various loading tasks that are part of init but shouldn't block the node from being started: external block import,
reindex, reindex-chainstate, main chain activation, spawn indexes background sync threads and mempool load.

- [CCheckQueue::Loop (`d-scriptch.x`)](https://doxygen.bitcoincore.org/class_c_check_queue.html#a6e7fa51d3a25e7cb65446d4b50e6a987)
: Parallel script validation threads for transactions in blocks.
Expand Down
13 changes: 13 additions & 0 deletions doc/release-notes-27609.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- A new RPC, `submitpackage`, has been added. It can be used to submit a list of raw hex
transactions to the mempool to be evaluated as a package using consensus and mempool policy rules.
These policies include package CPFP, allowing a child with high fees to bump a parent below the
mempool minimum feerate (but not minimum relay feerate).

- Warning: successful submission does not mean the transactions will propagate throughout the
network, as package relay is not supported.

- Not all features are available. The package is limited to a child with all of its
unconfirmed parents, and no parent may spend the output of another parent. Refer to
doc/policy/packages.md for more details on package policies and limitations.

- This RPC is experimental. Its interface may change.
15 changes: 12 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ BITCOIN_CORE_H = \
active/dkgsession.h \
active/dkgsessionhandler.h \
active/masternode.h \
addresstype.h \
addrdb.h \
addrman.h \
addrman_impl.h \
Expand Down Expand Up @@ -300,6 +301,7 @@ BITCOIN_CORE_H = \
kernel/mempool_options.h \
kernel/mempool_persist.h \
kernel/mempool_removal_reason.h \
kernel/messagestartchars.h \
kernel/notifications_interface.h \
kernel/validation_cache_sizes.h \
key.h \
Expand Down Expand Up @@ -351,6 +353,7 @@ BITCOIN_CORE_H = \
netfulfilledman.h \
netgroup.h \
netmessagemaker.h \
node/abort.h \
node/blockmanager_args.h \
node/blockstorage.h \
node/caches.h \
Expand Down Expand Up @@ -409,7 +412,7 @@ BITCOIN_CORE_H = \
script/sigcache.h \
script/sign.h \
script/signingprovider.h \
script/standard.h \
script/solver.h \
shutdown.h \
source_location.h \
spork.h \
Expand Down Expand Up @@ -465,6 +468,7 @@ BITCOIN_CORE_H = \
util/readwritefile.h \
util/result.h \
util/serfloat.h \
util/signalinterrupt.h \
util/sock.h \
util/spanparsing.h \
util/std23.h \
Expand Down Expand Up @@ -639,6 +643,7 @@ libbitcoin_node_a_SOURCES = \
net_processing.cpp \
netfulfilledman.cpp \
netgroup.cpp \
node/abort.cpp \
node/blockmanager_args.cpp \
node/blockstorage.cpp \
node/caches.cpp \
Expand Down Expand Up @@ -994,6 +999,7 @@ libbitcoin_consensus_a_SOURCES = \
libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS)
libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_common_a_SOURCES = \
addresstype.cpp \
base58.cpp \
bech32.cpp \
chainparams.cpp \
Expand Down Expand Up @@ -1041,7 +1047,7 @@ libbitcoin_common_a_SOURCES = \
script/miniscript.cpp \
script/sign.cpp \
script/signingprovider.cpp \
script/standard.cpp \
script/solver.cpp \
warnings.cpp \
$(BITCOIN_CORE_H)
#
Expand Down Expand Up @@ -1085,6 +1091,7 @@ libbitcoin_util_a_SOURCES = \
util/moneystr.cpp \
util/ranges_set.cpp \
util/readwritefile.cpp \
util/signalinterrupt.cpp \
util/serfloat.cpp \
util/sock.cpp \
util/spanparsing.cpp \
Expand Down Expand Up @@ -1349,6 +1356,7 @@ libdashkernel_la_SOURCES = \
messagesigner.cpp \
netaddress.cpp \
netbase.cpp \
node/abort.cpp \
node/blockstorage.cpp \
node/chainstate.cpp \
node/interface_ui.cpp \
Expand All @@ -1371,7 +1379,7 @@ libdashkernel_la_SOURCES = \
script/script.cpp \
script/script_error.cpp \
script/sigcache.cpp \
script/standard.cpp \
script/solver.cpp \
shutdown.cpp \
spork.cpp \
streams.cpp \
Expand All @@ -1394,6 +1402,7 @@ libdashkernel_la_SOURCES = \
util/moneystr.cpp \
util/ranges_set.cpp \
util/serfloat.cpp \
util/signalinterrupt.cpp \
util/sock.cpp \
util/strencodings.cpp \
util/string.cpp \
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ test_fuzz_fuzz_SOURCES = \
test/fuzz/netbase_dns_lookup.cpp \
test/fuzz/node_eviction.cpp \
test/fuzz/p2p_transport_serialization.cpp \
test/fuzz/package_eval.cpp \
test/fuzz/parse_hd_keypath.cpp \
test/fuzz/parse_numbers.cpp \
test/fuzz/parse_script.cpp \
Expand Down
4 changes: 2 additions & 2 deletions src/addrdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ void DeserializeDB(Stream& stream, Data&& data, bool fCheckSum = true)
{
HashVerifier verifier{stream};
// de-serialize file header (network specific magic number) and ..
unsigned char pchMsgTmp[4];
MessageStartChars pchMsgTmp;
verifier >> pchMsgTmp;
// ... verify the network matches ours
if (memcmp(pchMsgTmp, Params().MessageStart(), sizeof(pchMsgTmp))) {
if (pchMsgTmp != Params().MessageStart()) {
throw std::runtime_error{"Invalid network magic number"};
}

Expand Down
109 changes: 109 additions & 0 deletions src/addresstype.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// Copyright (c) 2023 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php.

#include <addresstype.h>

#include <hash.h>
#include <pubkey.h>
#include <script/script.h>
#include <script/solver.h>
#include <uint256.h>
#include <util/hash_type.h>

#include <cassert>
#include <vector>

typedef std::vector<unsigned char> valtype;

ScriptHash::ScriptHash(const CScript& in) : BaseHash(Hash160(in)) {}
ScriptHash::ScriptHash(const CScriptID& in) : BaseHash{in} {}

PKHash::PKHash(const CPubKey& pubkey) : BaseHash(pubkey.GetID()) {}
PKHash::PKHash(const CKeyID& pubkey_id) : BaseHash(pubkey_id) {}

CKeyID ToKeyID(const PKHash& key_hash)
{
return CKeyID{uint160{key_hash}};
}

CScriptID ToScriptID(const ScriptHash& script_hash)
{
return CScriptID{uint160{script_hash}};
}

bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
{
std::vector<valtype> vSolutions;
TxoutType whichType = Solver(scriptPubKey, vSolutions);

switch (whichType) {
case TxoutType::PUBKEY: {
CPubKey pubKey(vSolutions[0]);
if (!pubKey.IsValid()) {
addressRet = CNoDestination(scriptPubKey);
} else {
addressRet = PubKeyDestination(pubKey);
}
return false;
}
case TxoutType::PUBKEYHASH: {
addressRet = PKHash(uint160(vSolutions[0]));
return true;
}
case TxoutType::SCRIPTHASH: {
addressRet = ScriptHash(uint160(vSolutions[0]));
return true;
}
case TxoutType::MULTISIG:
case TxoutType::NULL_DATA:
case TxoutType::NONSTANDARD:
addressRet = CNoDestination(scriptPubKey);
return false;
} // no default case, so the compiler can warn about missing cases
assert(false);
}

namespace {
class CScriptVisitor
{
public:
CScript operator()(const CNoDestination& dest) const
{
return dest.GetScript();
}

CScript operator()(const PubKeyDestination& dest) const
{
return CScript() << ToByteVector(dest.GetPubKey()) << OP_CHECKSIG;
}

CScript operator()(const PKHash& keyID) const
{
return CScript() << OP_DUP << OP_HASH160 << ToByteVector(keyID) << OP_EQUALVERIFY << OP_CHECKSIG;
}

CScript operator()(const ScriptHash& scriptID) const
{
return CScript() << OP_HASH160 << ToByteVector(scriptID) << OP_EQUAL;
}
};

class ValidDestinationVisitor
{
public:
bool operator()(const CNoDestination& dest) const { return false; }
bool operator()(const PubKeyDestination& dest) const { return false; }
bool operator()(const PKHash& dest) const { return true; }
bool operator()(const ScriptHash& dest) const { return true; }
};
} // namespace

CScript GetScriptForDestination(const CTxDestination& dest)
{
return std::visit(CScriptVisitor(), dest);
}

bool IsValidDestination(const CTxDestination& dest) {
return std::visit(ValidDestinationVisitor(), dest);
}
Loading
Loading