Skip to content

Commit f6fc0b7

Browse files
Merge branch 'develop' of https://github.com/dashpay/dash into develop
2 parents eed3956 + 351f0f8 commit f6fc0b7

79 files changed

Lines changed: 1806 additions & 624 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-depends.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description: "Path to built container at registry"
1212
required: true
1313
type: string
14+
base-image-digest:
15+
description: "Short hash of the CI base image manifest for cache busting"
16+
required: true
17+
type: string
1418
runs-on:
1519
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
1620
required: true
@@ -33,6 +37,7 @@ jobs:
3337
outputs:
3438
cache-hit: ${{ steps.cache-check.outputs.cache-hit }}
3539
cache-key: ${{ steps.setup.outputs.cache-key }}
40+
cache-key-prefix: ${{ steps.setup.outputs.cache-key-prefix }}
3641
host: ${{ steps.setup.outputs.HOST }}
3742
dep-opts: ${{ steps.setup.outputs.DEP_OPTS }}
3843
steps:
@@ -62,7 +67,9 @@ jobs:
6267
echo "DEP_HASH=${DEP_HASH}" >> "${GITHUB_OUTPUT}"
6368
DOCKERFILE_HASH="${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'contrib/containers/ci/ci-slim.Dockerfile') }}"
6469
PACKAGES_HASH="${{ hashFiles('depends/packages/*', 'depends/Makefile') }}"
65-
CACHE_KEY="depends-${DOCKERFILE_HASH}-${{ inputs.runs-on }}-${{ inputs.build-target }}-${DEP_HASH}-${PACKAGES_HASH}"
70+
CACHE_KEY_PREFIX="depends-${DOCKERFILE_HASH}-${{ inputs.base-image-digest }}-${{ inputs.runs-on }}-${{ inputs.build-target }}"
71+
CACHE_KEY="${CACHE_KEY_PREFIX}-${DEP_HASH}-${PACKAGES_HASH}"
72+
echo "cache-key-prefix=${CACHE_KEY_PREFIX}" >> "${GITHUB_OUTPUT}"
6673
echo "cache-key=${CACHE_KEY}" >> "${GITHUB_OUTPUT}"
6774
echo "Cache key: ${CACHE_KEY}"
6875
shell: bash
@@ -124,7 +131,7 @@ jobs:
124131
path: depends/built/${{ needs.check-cache.outputs.host }}
125132
key: ${{ needs.check-cache.outputs.cache-key }}
126133
restore-keys: |
127-
depends-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'contrib/containers/ci/ci-slim.Dockerfile') }}-${{ inputs.build-target }}-
134+
${{ needs.check-cache.outputs.cache-key-prefix }}-
128135
129136
- name: Build depends
130137
run: |

.github/workflows/build.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ concurrency:
2121
jobs:
2222
check-skip:
2323
name: Check skip conditions
24-
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
24+
# Keep the bootstrap job cheap; RUNNER_CHECK_SKIP can point to a small Blacksmith ARM runner.
25+
runs-on: ${{ vars.RUNNER_CHECK_SKIP || 'ubuntu-24.04-arm' }}
2526
outputs:
2627
skip: ${{ steps.skip-check.outputs.skip }}
2728
runner-amd64: ${{ steps.select-runner.outputs.runner_amd64 }}
2829
runner-arm64: ${{ steps.select-runner.outputs.runner_arm64 }}
2930
use-blacksmith: ${{ steps.select-runner.outputs.use_blacksmith }}
3031
backlog-count: ${{ steps.select-runner.outputs.backlog_count }}
3132
decision-reason: ${{ steps.select-runner.outputs.decision_reason }}
33+
base-image-digest: ${{ steps.base-image.outputs.digest }}
3234
steps:
3335
- name: Check skip environment variables
3436
id: skip-check
@@ -58,6 +60,26 @@ jobs:
5860
run: |
5961
python3 .github/workflows/select_dynamic_runner.py
6062
63+
- name: Get base image digest
64+
id: base-image
65+
if: ${{ steps.skip-check.outputs.skip == 'false' }}
66+
run: |
67+
# Fetch the canonical manifest digest for ubuntu:noble so the
68+
# depends cache key changes when Canonical pushes base image
69+
# updates (which may bump compiler versions).
70+
# Falls back to "unknown" on failure so CI is not blocked.
71+
TOKEN="$(curl -fsSL --max-time 10 \
72+
'https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/ubuntu:pull' \
73+
| jq -r '.token')" || true
74+
if [ -n "$TOKEN" ] && [ "$TOKEN" != "null" ]; then
75+
DIGEST="$(curl -fsSL --max-time 10 \
76+
-H "Authorization: Bearer $TOKEN" \
77+
-H 'Accept: application/vnd.docker.distribution.manifest.list.v2+json' \
78+
'https://registry-1.docker.io/v2/library/ubuntu/manifests/noble' \
79+
-o /dev/null -D - | grep -i docker-content-digest | awk '{print $2}' | tr -d '\r' | sed 's/^sha256://')" || true
80+
fi
81+
echo "digest=${DIGEST:-unknown}" >> "$GITHUB_OUTPUT"
82+
6183
cache-sources:
6284
name: Cache depends sources
6385
needs: [check-skip]
@@ -98,6 +120,7 @@ jobs:
98120
with:
99121
build-target: aarch64-linux
100122
container-path: ${{ needs.container.outputs.path }}
123+
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
101124
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
102125

103126
depends-linux64:
@@ -112,6 +135,7 @@ jobs:
112135
with:
113136
build-target: linux64
114137
container-path: ${{ needs.container.outputs.path }}
138+
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
115139
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
116140

117141
depends-linux64_multiprocess:
@@ -124,6 +148,7 @@ jobs:
124148
with:
125149
build-target: linux64_multiprocess
126150
container-path: ${{ needs.container.outputs.path }}
151+
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
127152
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
128153

129154
depends-linux64_nowallet:
@@ -134,6 +159,7 @@ jobs:
134159
with:
135160
build-target: linux64_nowallet
136161
container-path: ${{ needs.container.outputs.path }}
162+
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
137163
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
138164

139165
depends-mac:
@@ -144,6 +170,7 @@ jobs:
144170
with:
145171
build-target: mac
146172
container-path: ${{ needs.container.outputs.path }}
173+
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
147174
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
148175

149176
depends-win64:
@@ -154,6 +181,7 @@ jobs:
154181
with:
155182
build-target: win64
156183
container-path: ${{ needs.container.outputs.path }}
184+
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
157185
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
158186

159187
lint:

doc/policy/packages.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,37 @@ test accepts):
6868
If any transactions in the package are already in the mempool, they are not submitted again
6969
("deduplicated") and are thus excluded from this calculation.
7070

71-
To meet the two feerate requirements of a mempool, i.e., the pre-configured minimum relay feerate
72-
(`minRelayTxFee`) and the dynamic mempool minimum feerate, the total package feerate is used instead
73-
of the individual feerate. The individual transactions are allowed to be below the feerate
74-
requirements if the package meets the feerate requirements. For example, the parent(s) in the
75-
package can pay no fees but be paid for by the child.
76-
77-
*Rationale*: This can be thought of as "CPFP within a package," solving the issue of a parent not
78-
meeting minimum fees on its own. This would allow contracting applications to adjust their fees at
79-
broadcast time instead of overshooting or risking becoming stuck or pinned.
80-
81-
*Rationale*: It would be incorrect to use the fees of transactions that are already in the mempool, as
82-
we do not want a transaction's fees to be double-counted.
71+
To meet the dynamic mempool minimum feerate, i.e., the feerate determined by the transactions
72+
evicted when the mempool reaches capacity (not the static minimum relay feerate), the total package
73+
feerate instead of individual feerate can be used. For example, if the mempool minimum feerate is
74+
5sat/vB and a 1sat/vB parent transaction has a high-feerate child, it may be accepted if
75+
submitted as a package.
76+
77+
*Rationale*: This can be thought of as "CPFP within a package," solving the issue of a presigned
78+
transaction (i.e. in which a replacement transaction with a higher fee cannot be signed) being
79+
rejected from the mempool when transaction volume is high and the mempool minimum feerate rises.
80+
81+
Note: Package feerate cannot be used to meet the minimum relay feerate (`-minrelaytxfee`)
82+
requirement. For example, if the mempool minimum feerate is 5sat/vB and the minimum relay feerate is
83+
set to 5satvB, a 1sat/vB parent transaction with a high-feerate child will not be accepted, even if
84+
submitted as a package.
85+
86+
*Rationale*: Avoid situations in which the mempool contains non-bumped transactions below min relay
87+
feerate (which we consider to have pay 0 fees and thus receiving free relay). While package
88+
submission would ensure these transactions are bumped at the time of entry, it is not guaranteed
89+
that the transaction will always be bumped. For example, a later transaction could replace the
90+
fee-bumping child without still bumping the parent. These no-longer-bumped transactions should be
91+
removed during a replacement, but we do not have a DoS-resistant way of removing them or enforcing a
92+
limit on their quantity. Instead, prevent their entry into the mempool.
8393

8494
Implementation Note: Transactions within a package are always validated individually first, and
8595
package validation is used for the transactions that failed. Since package feerate is only
8696
calculated using transactions that are not in the mempool, this implementation detail affects the
8797
outcome of package validation.
8898

99+
*Rationale*: It would be incorrect to use the fees of transactions that are already in the mempool, as
100+
we do not want a transaction's fees to be double-counted.
101+
89102
*Rationale*: We must not allow a low-feerate child to prevent its parent from being accepted; fees
90103
of children should not negatively impact their parents, since they are not necessary for the parents
91104
to be mined. More generally, if transaction B is not needed in order for transaction A to be mined,

doc/release-notes-26076.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
RPC
2+
---
3+
4+
- The `listdescriptors`, `decodepsbt` and similar RPC methods now show `h` rather than apostrophe (`'`) to indicate
5+
hardened derivation. This does not apply when using the `private` parameter, which
6+
matches the marker used when descriptor was generated or imported. Newly created
7+
wallets use `h`. This change makes it easier to handle descriptor strings manually.
8+
E.g. the `importdescriptors` RPC call is easiest to use `h` as the marker: `'["desc": ".../0h/..."]'`.
9+
With this change `listdescriptors` will use `h`, so you can copy-paste the result,
10+
without having to add escape characters or switch `'` to 'h' manually.
11+
Note that this changes the descriptor checksum.
12+
For legacy wallets the `hdkeypath` field in `getaddressinfo` is unchanged,
13+
nor is the serialization format of wallet dumps. (#26076)

doc/release-process.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Before every major release:
3636
`nBlocks` of 4096 (28 days) and a `bestblockhash` of RPC `getbestblockhash`; see
3737
[this pull request](https://github.com/dashpay/dash/pull/5692) for an example. Reviewers can verify the results by running
3838
`getchaintxstats <window_block_count> <window_final_block_hash>` with the `window_block_count` and `window_final_block_hash` from your output.
39+
* [ ] Prune inputs from the qa-assets repo (See [pruning
40+
inputs](https://github.com/bitcoin-core/qa-assets#pruning-inputs)).
3941

4042
### First time / New builders
4143

src/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ BITCOIN_CORE_H = \
270270
instantsend/lock.h \
271271
instantsend/net_instantsend.h \
272272
instantsend/signing.h \
273+
kernel/blockmanager_opts.h \
273274
kernel/coinstats.h \
274275
key.h \
275276
key_io.h \

src/Makefile.test.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ test_fuzz_fuzz_SOURCES = \
375375
test/fuzz/tx_pool.cpp \
376376
test/fuzz/txorphan.cpp \
377377
test/fuzz/utxo_snapshot.cpp \
378+
test/fuzz/utxo_total_supply.cpp \
378379
test/fuzz/validation_load_mempool.cpp \
379380
test/fuzz/versionbits.cpp
380381
endif # ENABLE_FUZZ_BINARY

src/bench/block_assemble.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static void AssembleBlock(benchmark::Bench& bench)
3232
std::array<CTransactionRef, NUM_BLOCKS - COINBASE_MATURITY + 1> txs;
3333
for (size_t b{0}; b < NUM_BLOCKS; ++b) {
3434
CMutableTransaction tx;
35-
tx.vin.push_back(MineBlock(test_setup->m_node, SCRIPT_PUB));
35+
tx.vin.emplace_back(MineBlock(test_setup->m_node, SCRIPT_PUB));
3636
tx.vin.back().scriptSig = scriptSig;
3737
tx.vout.emplace_back(1337, SCRIPT_PUB);
3838
if (NUM_BLOCKS - b >= COINBASE_MATURITY)

src/bench/coin_selection.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <bench/bench.h>
66
#include <interfaces/chain.h>
77
#include <node/context.h>
8+
#include <policy/policy.h>
89
#include <wallet/coinselection.h>
910
#include <wallet/spend.h>
1011
#include <wallet/wallet.h>
@@ -111,7 +112,7 @@ static void BnBExhaustion(benchmark::Bench& bench)
111112
bench.run([&] {
112113
// Benchmark
113114
CAmount target = make_hard_case(17, utxo_pool);
114-
SelectCoinsBnB(utxo_pool, target, 0); // Should exhaust
115+
SelectCoinsBnB(utxo_pool, target, 0, MAX_STANDARD_TX_SIZE); // Should exhaust
115116

116117
// Cleanup
117118
utxo_pool.clear();

src/kernel/blockmanager_opts.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) 2022 The Bitcoin Core developers
2+
// Distributed under the MIT software license, see the accompanying
3+
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4+
5+
#ifndef BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H
6+
#define BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H
7+
8+
class CChainParams;
9+
10+
namespace kernel {
11+
12+
/**
13+
* An options struct for `BlockManager`, more ergonomically referred to as
14+
* `BlockManager::Options` due to the using-declaration in `BlockManager`.
15+
*/
16+
struct BlockManagerOpts {
17+
const CChainParams& chainparams;
18+
};
19+
20+
} // namespace kernel
21+
22+
#endif // BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H

0 commit comments

Comments
 (0)