Page MenuHomePhabricator

validation: mark blocks building on an invalid block as having failed parents
Changes PlannedPublic

Authored by PiRK on Sat, Apr 26, 12:35.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

https://github.com/bitcoin/bitcoin/pull/30666/commits/f5149ddb9b7de3559943d7fda0f440e59413dfb5:

Without doing so, header-only chains building on a chain that
will be marked as invalid would still be eligible for m_best_header.
This improves both getblockchaininfo and getchaintips behavior.

While this adds an iteration over the entire block index, it can only be
triggered by the user (invalidateblock) or by others at a cost (the
header needs to be accepted in the first place, so it needs valid PoW).

Co-authored-by: TheCharlatan <seb.kung@gmail.com>

https://github.com/bitcoin/bitcoin/pull/30666/commits/ccd98ea4c88fc1aa959e41e0686d8dff00a44209
https://github.com/bitcoin/bitcoin/pull/30666/commits/0bd53d913c1c2ffd2d0779f01bc51c81537b6992

test: add test for getchaintips behavior with invalid chains

This test would fail to mark the chain tip as "invalid" instead
of "headers-only" without the previous commit marking the headers
as BLOCK_FAILED_CHILD.

Now the unintuitive behavior revealed and documented in D1987 in abc_feature_parkedchain.py becomes the expected behavior.

This concludes backport of core#30666

Depends on D18000

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Sat, Apr 26, 12:35
PiRK retitled this revision from validation: mark blocks building on an invalid block as BLOCK_FAILED_CHILD to validation: mark blocks building on an invalid block as having failed parents.Sat, Apr 26, 12:42

Failed tests logs:

====== Bitcoin ABC functional tests: p2p_unrequested_blocks.py ======

------- Stdout: -------
2025-04-26T12:59:24.932000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_🏃_20250426_125521_45525/p2p_unrequested_blocks_132
2025-04-26T12:59:26.007000Z TestFramework (INFO): First height 2 block accepted by node0; correctly rejected by node1
2025-04-26T12:59:26.112000Z TestFramework (INFO): Second height 2 block accepted, but not reorg'ed to
2025-04-26T12:59:26.167000Z TestFramework (INFO): Unrequested more-work block accepted
2025-04-26T12:59:27.398000Z TestFramework (INFO): Unrequested block that would complete more-work chain was ignored
2025-04-26T12:59:27.449000Z TestFramework (INFO): Inv at tip triggered getdata for unprocessed block
2025-04-26T12:59:28.453000Z TestFramework (INFO): Successfully reorged to longer chain
2025-04-26T12:59:28.659000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/p2p_unrequested_blocks.py", line 326, in run_test
    test_node.sync_with_ping(timeout=1)
  File "/work/test/functional/test_framework/p2p.py", line 706, in sync_with_ping
    self.wait_until(test_function, timeout=timeout)
  File "/work/test/functional/test_framework/p2p.py", line 582, in wait_until
    wait_until_helper(
  File "/work/test/functional/test_framework/util.py", line 299, in wait_until_helper
    if predicate():
       ^^^^^^^^^^^
  File "/work/test/functional/test_framework/p2p.py", line 579, in test_function
    assert self.is_connected
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 142, in _run_test_internal
    self.run_test()
  File "/work/test/functional/p2p_unrequested_blocks.py", line 330, in run_test
    self.nodes[0].disconnect_p2ps()
  File "/work/test/functional/test_framework/test_node.py", line 970, in disconnect_p2ps
    wait_until_helper(
  File "/work/test/functional/test_framework/util.py", line 302, in wait_until_helper
    if predicate():
       ^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_node.py", line 971, in <lambda>
    lambda: self.num_test_p2p_connections() == 0,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_node.py", line 961, in num_test_p2p_connections
    [peer for peer in self.getpeerinfo() if peer["subver"] == P2P_SUBVERSION]
                      ^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 146, in __call__
    response, status = self._request(
                       ^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 114, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1076, in _send_output
    self.send(chunk)
  File "/usr/lib/python3.11/http/client.py", line 998, in send
    self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
2025-04-26T12:59:28.720000Z TestFramework (INFO): Stopping nodes
2025-04-26T12:59:28.721000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 532, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 146, in __call__
    response, status = self._request(
                       ^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 114, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1293, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.11/http/client.py", line 1119, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
[node 1] Cleaning up leftover process
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/p2p_unrequested_blocks.py", line 357, in <module>
    AcceptBlockTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 175, in main
    exit_code = self.shutdown()
                ^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_framework.py", line 404, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 659, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 544, in stop_node
    raise AssertionError(f"Unexpected stderr {stderr} != {expected_stderr}")
AssertionError: Unexpected stderr bitcoind: /work/src/validation.cpp:6128: void ChainstateManager::CheckBlockIndex(): Assertion `!pindex->nStatus.isInvalid()' failed. !=

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_unrequested_blocks.py

Failed tests logs:

====== Bitcoin ABC functional tests: p2p_unrequested_blocks.py ======

------- Stdout: -------
2025-04-26T12:58:35.806000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_🏃_20250426_125645_25088/p2p_unrequested_blocks_132
2025-04-26T12:58:36.393000Z TestFramework (INFO): First height 2 block accepted by node0; correctly rejected by node1
2025-04-26T12:58:36.496000Z TestFramework (INFO): Second height 2 block accepted, but not reorg'ed to
2025-04-26T12:58:36.549000Z TestFramework (INFO): Unrequested more-work block accepted
2025-04-26T12:58:37.139000Z TestFramework (INFO): Unrequested block that would complete more-work chain was ignored
2025-04-26T12:58:37.190000Z TestFramework (INFO): Inv at tip triggered getdata for unprocessed block
2025-04-26T12:58:37.342000Z TestFramework (INFO): Successfully reorged to longer chain
2025-04-26T12:58:37.496000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/p2p_unrequested_blocks.py", line 326, in run_test
    test_node.sync_with_ping(timeout=1)
  File "/work/test/functional/test_framework/p2p.py", line 706, in sync_with_ping
    self.wait_until(test_function, timeout=timeout)
  File "/work/test/functional/test_framework/p2p.py", line 582, in wait_until
    wait_until_helper(
  File "/work/test/functional/test_framework/util.py", line 299, in wait_until_helper
    if predicate():
       ^^^^^^^^^^^
  File "/work/test/functional/test_framework/p2p.py", line 579, in test_function
    assert self.is_connected
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 142, in _run_test_internal
    self.run_test()
  File "/work/test/functional/p2p_unrequested_blocks.py", line 330, in run_test
    self.nodes[0].disconnect_p2ps()
  File "/work/test/functional/test_framework/test_node.py", line 970, in disconnect_p2ps
    wait_until_helper(
  File "/work/test/functional/test_framework/util.py", line 302, in wait_until_helper
    if predicate():
       ^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_node.py", line 971, in <lambda>
    lambda: self.num_test_p2p_connections() == 0,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_node.py", line 961, in num_test_p2p_connections
    [peer for peer in self.getpeerinfo() if peer["subver"] == P2P_SUBVERSION]
                      ^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 146, in __call__
    response, status = self._request(
                       ^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 114, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1076, in _send_output
    self.send(chunk)
  File "/usr/lib/python3.11/http/client.py", line 998, in send
    self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
2025-04-26T12:58:37.557000Z TestFramework (INFO): Stopping nodes
2025-04-26T12:58:37.557000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 532, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 146, in __call__
    response, status = self._request(
                       ^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 114, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1293, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.11/http/client.py", line 1119, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
[node 1] Cleaning up leftover process
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/p2p_unrequested_blocks.py", line 357, in <module>
    AcceptBlockTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 175, in main
    exit_code = self.shutdown()
                ^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_framework.py", line 404, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 659, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 544, in stop_node
    raise AssertionError(f"Unexpected stderr {stderr} != {expected_stderr}")
AssertionError: Unexpected stderr bitcoind: /work/src/validation.cpp:6128: void ChainstateManager::CheckBlockIndex(): Assertion `!pindex->nStatus.isInvalid()' failed. !=
====== Bitcoin ABC functional tests with the next upgrade activated: p2p_unrequested_blocks.py ======

------- Stdout: -------
2025-04-26T13:00:19.383000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_🏃_20250426_125852_33339/p2p_unrequested_blocks_132
2025-04-26T13:00:19.948000Z TestFramework (INFO): First height 2 block accepted by node0; correctly rejected by node1
2025-04-26T13:00:20.051000Z TestFramework (INFO): Second height 2 block accepted, but not reorg'ed to
2025-04-26T13:00:20.104000Z TestFramework (INFO): Unrequested more-work block accepted
2025-04-26T13:00:20.686000Z TestFramework (INFO): Unrequested block that would complete more-work chain was ignored
2025-04-26T13:00:20.757000Z TestFramework (INFO): Inv at tip triggered getdata for unprocessed block
2025-04-26T13:00:20.909000Z TestFramework (INFO): Successfully reorged to longer chain
2025-04-26T13:00:21.113000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/p2p_unrequested_blocks.py", line 326, in run_test
    test_node.sync_with_ping(timeout=1)
  File "/work/test/functional/test_framework/p2p.py", line 706, in sync_with_ping
    self.wait_until(test_function, timeout=timeout)
  File "/work/test/functional/test_framework/p2p.py", line 582, in wait_until
    wait_until_helper(
  File "/work/test/functional/test_framework/util.py", line 299, in wait_until_helper
    if predicate():
       ^^^^^^^^^^^
  File "/work/test/functional/test_framework/p2p.py", line 579, in test_function
    assert self.is_connected
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 142, in _run_test_internal
    self.run_test()
  File "/work/test/functional/p2p_unrequested_blocks.py", line 330, in run_test
    self.nodes[0].disconnect_p2ps()
  File "/work/test/functional/test_framework/test_node.py", line 970, in disconnect_p2ps
    wait_until_helper(
  File "/work/test/functional/test_framework/util.py", line 302, in wait_until_helper
    if predicate():
       ^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_node.py", line 971, in <lambda>
    lambda: self.num_test_p2p_connections() == 0,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_node.py", line 961, in num_test_p2p_connections
    [peer for peer in self.getpeerinfo() if peer["subver"] == P2P_SUBVERSION]
                      ^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 146, in __call__
    response, status = self._request(
                       ^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 114, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1076, in _send_output
    self.send(chunk)
  File "/usr/lib/python3.11/http/client.py", line 998, in send
    self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
2025-04-26T13:00:21.166000Z TestFramework (INFO): Stopping nodes
2025-04-26T13:00:21.166000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 532, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 146, in __call__
    response, status = self._request(
                       ^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 114, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1293, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.11/http/client.py", line 1119, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
[node 1] Cleaning up leftover process
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/p2p_unrequested_blocks.py", line 357, in <module>
    AcceptBlockTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 175, in main
    exit_code = self.shutdown()
                ^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_framework.py", line 404, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 659, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 544, in stop_node
    raise AssertionError(f"Unexpected stderr {stderr} != {expected_stderr}")
AssertionError: Unexpected stderr bitcoind: /work/src/validation.cpp:6128: void ChainstateManager::CheckBlockIndex(): Assertion `!pindex->nStatus.isInvalid()' failed. !=

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_unrequested_blocks.py
Bitcoin ABC functional tests with the next upgrade activated: p2p_unrequested_blocks.py

Failed tests logs:

====== Bitcoin ABC functional tests: p2p_unrequested_blocks.py ======

------- Stdout: -------
2025-04-26T13:01:52.065000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_🏃_20250426_130031_26195/p2p_unrequested_blocks_132
2025-04-26T13:01:52.632000Z TestFramework (INFO): First height 2 block accepted by node0; correctly rejected by node1
2025-04-26T13:01:52.737000Z TestFramework (INFO): Second height 2 block accepted, but not reorg'ed to
2025-04-26T13:01:52.789000Z TestFramework (INFO): Unrequested more-work block accepted
2025-04-26T13:01:53.439000Z TestFramework (INFO): Unrequested block that would complete more-work chain was ignored
2025-04-26T13:01:53.490000Z TestFramework (INFO): Inv at tip triggered getdata for unprocessed block
2025-04-26T13:01:53.692000Z TestFramework (INFO): Successfully reorged to longer chain
2025-04-26T13:01:53.847000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/p2p_unrequested_blocks.py", line 326, in run_test
    test_node.sync_with_ping(timeout=1)
  File "/work/test/functional/test_framework/p2p.py", line 706, in sync_with_ping
    self.wait_until(test_function, timeout=timeout)
  File "/work/test/functional/test_framework/p2p.py", line 582, in wait_until
    wait_until_helper(
  File "/work/test/functional/test_framework/util.py", line 299, in wait_until_helper
    if predicate():
       ^^^^^^^^^^^
  File "/work/test/functional/test_framework/p2p.py", line 579, in test_function
    assert self.is_connected
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 142, in _run_test_internal
    self.run_test()
  File "/work/test/functional/p2p_unrequested_blocks.py", line 330, in run_test
    self.nodes[0].disconnect_p2ps()
  File "/work/test/functional/test_framework/test_node.py", line 970, in disconnect_p2ps
    wait_until_helper(
  File "/work/test/functional/test_framework/util.py", line 302, in wait_until_helper
    if predicate():
       ^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_node.py", line 971, in <lambda>
    lambda: self.num_test_p2p_connections() == 0,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_node.py", line 961, in num_test_p2p_connections
    [peer for peer in self.getpeerinfo() if peer["subver"] == P2P_SUBVERSION]
                      ^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 146, in __call__
    response, status = self._request(
                       ^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 114, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1076, in _send_output
    self.send(chunk)
  File "/usr/lib/python3.11/http/client.py", line 998, in send
    self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
2025-04-26T13:01:53.901000Z TestFramework (INFO): Stopping nodes
2025-04-26T13:01:53.901000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 532, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 146, in __call__
    response, status = self._request(
                       ^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 114, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1293, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.11/http/client.py", line 1119, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
[node 1] Cleaning up leftover process
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/p2p_unrequested_blocks.py", line 357, in <module>
    AcceptBlockTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 175, in main
    exit_code = self.shutdown()
                ^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/test_framework.py", line 404, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 659, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 544, in stop_node
    raise AssertionError(f"Unexpected stderr {stderr} != {expected_stderr}")
AssertionError: Unexpected stderr bitcoind: /work/src/validation.cpp:6128: void ChainstateManager::CheckBlockIndex(): Assertion `!pindex->nStatus.isInvalid()' failed. !=

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_unrequested_blocks.py

PiRK planned changes to this revision.Sat, Apr 26, 15:27