Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 16 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,23 @@ jobs:
# block pays 11,000,000, not 500; and importwallet_rescan dated its key
# Bitcoin's two-hour window after the blocks it must find, while this
# chain's window is three minutes, so the rescan began past them.
#
# Three more came off on 2026-11-15, each read case by case. transaction_tests
# failed in tx_invalid alone: its two MAX_MONEY cases spent Bitcoin's
# 21,000,000, a valid amount under this chain's 500,000,000, so
# CheckTransaction let them through and every flag combination reported
# them; they now spend more than this chain's limit, and tx_valid gained
# two cases at the limit itself. denialofservice_tests
# failed in peer_discouragement alone: its peers kept version 0, which the
# protocol floor in SendMessages disconnects, so the peer below the
# discouragement threshold was dropped for its version, not its score; they
# now carry the version a handshake gives them. validation_chainstate_tests
# needed nothing: both its cases pass on this tree, whatever failed there
# when the gate was inverted (#169) has since been fixed elsewhere.
# still to triage: bip324_tests, bip39_tests,
# denialofservice_tests, evo_utils_tests,
# evo_utils_tests,
# governance_validators_tests,
# transaction_tests, util_tests,
# validation_chainstate_tests
# util_tests
#
# The suites run one process each, as many at a time as the runner has
# CPUs (ci/dash/unit_suites.py). In one process, one after another, they
Expand All @@ -559,7 +571,7 @@ jobs:
cd "build-ci/DeFCoN-${{ matrix.build_target }}"
make -j"$(nproc)" -C src test/test_defcon
python3 "$GITHUB_WORKSPACE/ci/dash/unit_suites.py" run --binary ./src/test/test_defcon --jobs "$(nproc)" \
--exclude='bip324_tests:bip39_tests:blockencodings_tests:denialofservice_tests:descriptor_tests:dynamic_activation_thresholds_tests:evo_utils_tests:governance_validators_tests:key_io_tests:miner_tests/CreateNewBlock_validity:transaction_tests:util_tests:validation_chainstate_tests' \
--exclude='bip324_tests:bip39_tests:blockencodings_tests:descriptor_tests:dynamic_activation_thresholds_tests:evo_utils_tests:governance_validators_tests:key_io_tests:miner_tests/CreateNewBlock_validity:util_tests' \
--split=dsl_service_pose_tests \
-- --catch_system_errors=no -l test_suite
shell: bash
Expand Down
8 changes: 5 additions & 3 deletions ci/dash/test_ci_scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,12 +725,14 @@ def test_cache_statistics_are_reported_even_after_a_failed_lane(self):
self.assertIn('tee -a "$GITHUB_STEP_SUMMARY"', report)

def test_original_unit_selection_is_preserved(self):
# The exceptions are the ones the single process was given as '!name' filters, and nothing else selects.
# The exceptions are the ones the single process was given as '!name' filters, less the suites brought back
# since (denialofservice_tests, transaction_tests, validation_chainstate_tests: 2026-11-15), and nothing
# else selects.
unit = run_script(step_text(self.checks, 'Unit suites (all but the named exceptions)'))
self.assertEqual(['bip324_tests:bip39_tests:blockencodings_tests:denialofservice_tests:'
self.assertEqual(['bip324_tests:bip39_tests:blockencodings_tests:'
'descriptor_tests:dynamic_activation_thresholds_tests:evo_utils_tests:'
'governance_validators_tests:key_io_tests:miner_tests/CreateNewBlock_validity:'
'transaction_tests:util_tests:validation_chainstate_tests'],
'util_tests'],
re.findall(r"--exclude='([^']+)'", unit))
self.assertNotIn('--run_test', unit)
self.assertEqual(1, unit.count('./src/test/test_defcon'))
Expand Down
5 changes: 3 additions & 2 deletions src/test/data/tx_invalid.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@
[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xae609aca8061d77c5e111f6bb62501a6bbe2bfdb EQUAL"]],
"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d4830450220063222cbb128731fc09de0d7323746539166544d6c1df84d867ccea84bcc8903022100bf568e8552844de664cd41648a031554327aa8844af34b4f27397c65b92c04de0123210243ec37dee0e2e053a9c976f43147e79bc7d9dc606ea51010af1ac80db6b069e1acffffffff01ffffffffffffffff015100000000", "BADTX"],

["MAX_MONEY here is DeFCoN's, 500,000,000 coins (50000000000000000 satoshis); Bitcoin's 21,000,000 is a valid amount on this chain"],
["MAX_MONEY + 1 output"],
[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x32afac281462b822adbec5094b8d4d337dd5bd6a EQUAL"]],
"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100e1eadba00d9296c743cb6ecc703fd9ddc9b3cd12906176a226ae4c18d6b00796022100a71aef7d2874deff681ba6080f1b278bac7bb99c61b08a85f4311970ffe7f63f012321030c0588dc44d92bdcbf8e72093466766fdc265ead8db64517b0c542275b70fffbacffffffff010140075af0750700015100000000", "BADTX"],
"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100e1eadba00d9296c743cb6ecc703fd9ddc9b3cd12906176a226ae4c18d6b00796022100a71aef7d2874deff681ba6080f1b278bac7bb99c61b08a85f4311970ffe7f63f012321030c0588dc44d92bdcbf8e72093466766fdc265ead8db64517b0c542275b70fffbacffffffff010100c52ebca2b100015100000000", "BADTX"],

["MAX_MONEY output + 1 output"],
[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xb558cbf4930954aa6a344363a15668d7477ae716 EQUAL"]],
"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d483045022027deccc14aa6668e78a8c9da3484fbcd4f9dcc9bb7d1b85146314b21b9ae4d86022100d0b43dece8cfb07348de0ca8bc5b86276fa88f7f2138381128b7c36ab2e42264012321029bb13463ddd5d2cc05da6e84e37536cb9525703cfd8f43afdb414988987a92f6acffffffff020040075af075070001510001000000000000015100000000", "BADTX"],
"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d483045022027deccc14aa6668e78a8c9da3484fbcd4f9dcc9bb7d1b85146314b21b9ae4d86022100d0b43dece8cfb07348de0ca8bc5b86276fa88f7f2138381128b7c36ab2e42264012321029bb13463ddd5d2cc05da6e84e37536cb9525703cfd8f43afdb414988987a92f6acffffffff020000c52ebca2b10001510001000000000000015100000000", "BADTX"],

["Duplicate inputs"],
[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x236d0639db62b0773fd8ac34dc85ae19e9aba80a EQUAL"]],
Expand Down
9 changes: 9 additions & 0 deletions src/test/data/tx_valid.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100c66c9cdf4c43609586d15424c54707156e316d88b0a1534c9e6b0d4f311406310221009c0fe51dbc9c4ab7cc25d3fdbeccf6679fe6827f08edf2b4a9f16ee3eb0e438a0123210338e8034509af564c62644c07691942e0c056752008a173c89f60ab2a88ac2ebfacffffffff010000000000000000015100000000", "LOW_S"],

["Tests for CheckTransaction()"],
["MAX_MONEY in the next two cases is Bitcoin's 21,000,000 coins, a valid amount below DeFCoN's 500,000,000 (their signatures cover the amount); the two after them spend DeFCoN's own limit, 50000000000000000 satoshis, on an output that needs no signature"],
["MAX_MONEY output"],
[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x32afac281462b822adbec5094b8d4d337dd5bd6a EQUAL"]],
"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100e1eadba00d9296c743cb6ecc703fd9ddc9b3cd12906176a226ae4c18d6b00796022100a71aef7d2874deff681ba6080f1b278bac7bb99c61b08a85f4311970ffe7f63f012321030c0588dc44d92bdcbf8e72093466766fdc265ead8db64517b0c542275b70fffbacffffffff010040075af0750700015100000000", "LOW_S"],
Expand All @@ -73,6 +74,14 @@
[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xb558cbf4930954aa6a344363a15668d7477ae716 EQUAL"]],
"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d483045022027deccc14aa6668e78a8c9da3484fbcd4f9dcc9bb7d1b85146314b21b9ae4d86022100d0b43dece8cfb07348de0ca8bc5b86276fa88f7f2138381128b7c36ab2e42264012321029bb13463ddd5d2cc05da6e84e37536cb9525703cfd8f43afdb414988987a92f6acffffffff020040075af075070001510000000000000000015100000000", "LOW_S"],

["DeFCoN MAX_MONEY output"],
[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1"]],
"010000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff010000c52ebca2b100015100000000", "NONE"],

["DeFCoN MAX_MONEY output + 0 output"],
[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1"]],
"010000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff020000c52ebca2b10001510000000000000000015100000000", "NONE"],

["Coinbase of size 2"],
["Note the input is just required to make the tester happy"],
[[["0000000000000000000000000000000000000000000000000000000000000000", -1, "1"]],
Expand Down
5 changes: 5 additions & 0 deletions src/test/denialofservice_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
const CNetAddr other_addr{ip(0xa0b0ff01)}; // Not any of addr[].

std::array<CNode*, 3> nodes;
// Each node gets the version its handshake would have given it: SendMessages disconnects a peer below the
// protocol floor, and a node left at version 0 was disconnected for that rather than for its misbehavior score.

banman->ClearBanned();
NodeId id{0};
Expand All @@ -350,6 +352,7 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
ConnectionType::INBOUND,
/*inbound_onion=*/false};
nodes[0]->SetCommonVersion(PROTOCOL_VERSION);
nodes[0]->nVersion = PROTOCOL_VERSION;
peerLogic->InitializeNode(*nodes[0], NODE_NETWORK);
nodes[0]->fSuccessfullyConnected = true;
connman->AddTestNode(*nodes[0]);
Expand All @@ -369,6 +372,7 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
ConnectionType::INBOUND,
/*inbound_onion=*/false};
nodes[1]->SetCommonVersion(PROTOCOL_VERSION);
nodes[1]->nVersion = PROTOCOL_VERSION;
peerLogic->InitializeNode(*nodes[1], NODE_NETWORK);
nodes[1]->fSuccessfullyConnected = true;
connman->AddTestNode(*nodes[1]);
Expand Down Expand Up @@ -400,6 +404,7 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
ConnectionType::OUTBOUND_FULL_RELAY,
/*inbound_onion=*/false};
nodes[2]->SetCommonVersion(PROTOCOL_VERSION);
nodes[2]->nVersion = PROTOCOL_VERSION;
peerLogic->InitializeNode(*nodes[2], NODE_NETWORK);
nodes[2]->fSuccessfullyConnected = true;
connman->AddTestNode(*nodes[2]);
Expand Down
Loading