Page MenuHomePhabricator

[avalanche] Send invs for known transactions.
AbandonedPublic

Authored by Mengerian on Apr 20 2022, 13:19.

Details

Reviewers
Fabien
tyler-smith
Group Reviewers
Restricted Project
Summary

Makes the Processor add in-progress transaction VoteRecords to the invs list when building a list of
items to poll for.

Depends on D11371 and D11372.

Test Plan

ninja check-avalanche

Event Timeline

Failed tests logs:

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

------- Stdout: -------
2022-04-20T13:26:57.186000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20220420_132416/abc_p2p_avalanche_proof_voting_26
2022-04-20T13:27:29.860000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/authproxy.py", line 187, in _get_response
    http_response = self.__conn.getresponse()
  File "/usr/lib/python3.7/http/client.py", line 1352, in getresponse
    response.begin()
  File "/usr/lib/python3.7/http/client.py", line 310, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.7/http/client.py", line 271, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_avalanche_proof_voting.py", line 111, in run_test
    blockhash = node.generatetoaddress(10, addrkey0.address)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 117, in _request
    return self._get_response()
  File "/work/test/functional/test_framework/authproxy.py", line 194, in _get_response
    self.__conn.timeout)})
test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30 seconds. Consider using larger timeout for calls that take longer to return. (-344)
2022-04-20T13:27:29.911000Z TestFramework (INFO): Stopping nodes
2022-04-20T13:27:29.911000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 438, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 116, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.7/http/client.py", line 1260, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1271, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.7/http/client.py", line 1112, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
2022-04-20T13:28:29.942000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
'''
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_p2p_avalanche_proof_voting.py", line 420, in <module>
    AvalancheProofVotingTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 156, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 286, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 524, in stop_nodes
    node.wait_until_stopped()
  File "/work/test/functional/test_framework/test_node.py", line 486, in wait_until_stopped
    timeout_factor=self.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
''' not true after 60.0 seconds
====== Bitcoin ABC functional tests: abc_p2p_getavaaddr.py ======

------- Stdout: -------
2022-04-20T13:25:54.228000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20220420_132416/abc_p2p_getavaaddr_18
2022-04-20T13:25:56.985000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21152 due to [Errno 104] Connection reset by peer
2022-04-20T13:26:28.544000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/authproxy.py", line 187, in _get_response
    http_response = self.__conn.getresponse()
  File "/usr/lib/python3.7/http/client.py", line 1352, in getresponse
    response.begin()
  File "/usr/lib/python3.7/http/client.py", line 310, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.7/http/client.py", line 271, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 381, in run_test
    self.address_test(maxaddrtosend=3, num_proof=2, num_avanode=8)
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 156, in address_test
    master_privkey, proof = gen_proof(node)
  File "/work/test/functional/test_framework/avatools.py", line 292, in gen_proof
    blockhashes = node.generate(coinbase_utxos)
  File "/work/test/functional/test_framework/test_node.py", line 405, in generate
    nblocks=nblocks, address=self.get_deterministic_priv_key().address, maxtries=maxtries)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 117, in _request
    return self._get_response()
  File "/work/test/functional/test_framework/authproxy.py", line 194, in _get_response
    self.__conn.timeout)})
test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30 seconds. Consider using larger timeout for calls that take longer to return. (-344)
2022-04-20T13:26:28.596000Z TestFramework (INFO): Stopping nodes
2022-04-20T13:26:28.596000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 438, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 116, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.7/http/client.py", line 1260, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1271, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.7/http/client.py", line 1112, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
2022-04-20T13:27:28.632000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
'''
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 391, in <module>
    AvaAddrTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 156, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 286, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 524, in stop_nodes
    node.wait_until_stopped()
  File "/work/test/functional/test_framework/test_node.py", line 486, in wait_until_stopped
    timeout_factor=self.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
''' not true after 60.0 seconds
====== Bitcoin ABC functional tests: abc_p2p_getavaaddr.py --nolegacyavaproof ======

------- Stdout: -------
2022-04-20T13:25:50.760000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20220420_132416/abc_p2p_getavaaddr_17
2022-04-20T13:25:53.531000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21088 due to [Errno 104] Connection reset by peer
2022-04-20T13:26:26.324000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/authproxy.py", line 187, in _get_response
    http_response = self.__conn.getresponse()
  File "/usr/lib/python3.7/http/client.py", line 1352, in getresponse
    response.begin()
  File "/usr/lib/python3.7/http/client.py", line 310, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.7/http/client.py", line 271, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 381, in run_test
    self.address_test(maxaddrtosend=3, num_proof=2, num_avanode=8)
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 188, in address_test
    self.wait_until(poll_all_for_block)
  File "/work/test/functional/test_framework/test_framework.py", line 677, in wait_until
    timeout_factor=self.options.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 271, in wait_until_helper
    if predicate():
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 185, in poll_all_for_block
    node.generate(1)
  File "/work/test/functional/test_framework/test_node.py", line 405, in generate
    nblocks=nblocks, address=self.get_deterministic_priv_key().address, maxtries=maxtries)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 117, in _request
    return self._get_response()
  File "/work/test/functional/test_framework/authproxy.py", line 194, in _get_response
    self.__conn.timeout)})
test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30 seconds. Consider using larger timeout for calls that take longer to return. (-344)
2022-04-20T13:26:26.376000Z TestFramework (INFO): Stopping nodes
2022-04-20T13:26:26.376000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 438, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 116, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.7/http/client.py", line 1260, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1271, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.7/http/client.py", line 1112, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
2022-04-20T13:27:26.411000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
'''
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 391, in <module>
    AvaAddrTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 156, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 286, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 524, in stop_nodes
    node.wait_until_stopped()
  File "/work/test/functional/test_framework/test_node.py", line 486, in wait_until_stopped
    timeout_factor=self.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
''' not true after 60.0 seconds

Each failure log is accessible here:
Bitcoin ABC functional tests: abc_p2p_avalanche_proof_voting.py
Bitcoin ABC functional tests: abc_p2p_getavaaddr.py
Bitcoin ABC functional tests: abc_p2p_getavaaddr.py --nolegacyavaproof

Failed tests logs:

====== Bitcoin ABC functional tests: abc_p2p_getavaaddr.py --nolegacyavaproof ======

------- Stdout: -------
2022-04-20T13:32:35.067000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20220420_133159/abc_p2p_getavaaddr_17
2022-04-20T13:32:37.537000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21088 due to [Errno 104] Connection reset by peer
2022-04-20T13:33:10.023000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/authproxy.py", line 187, in _get_response
    http_response = self.__conn.getresponse()
  File "/usr/lib/python3.7/http/client.py", line 1352, in getresponse
    response.begin()
  File "/usr/lib/python3.7/http/client.py", line 310, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.7/http/client.py", line 271, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 381, in run_test
    self.address_test(maxaddrtosend=3, num_proof=2, num_avanode=8)
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 188, in address_test
    self.wait_until(poll_all_for_block)
  File "/work/test/functional/test_framework/test_framework.py", line 677, in wait_until
    timeout_factor=self.options.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 271, in wait_until_helper
    if predicate():
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 185, in poll_all_for_block
    node.generate(1)
  File "/work/test/functional/test_framework/test_node.py", line 405, in generate
    nblocks=nblocks, address=self.get_deterministic_priv_key().address, maxtries=maxtries)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 117, in _request
    return self._get_response()
  File "/work/test/functional/test_framework/authproxy.py", line 194, in _get_response
    self.__conn.timeout)})
test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30 seconds. Consider using larger timeout for calls that take longer to return. (-344)
2022-04-20T13:33:10.074000Z TestFramework (INFO): Stopping nodes
2022-04-20T13:33:10.074000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 438, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 116, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.7/http/client.py", line 1260, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1271, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.7/http/client.py", line 1112, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
2022-04-20T13:34:10.107000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
'''
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 391, in <module>
    AvaAddrTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 156, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 286, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 524, in stop_nodes
    node.wait_until_stopped()
  File "/work/test/functional/test_framework/test_node.py", line 486, in wait_until_stopped
    timeout_factor=self.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
''' not true after 60.0 seconds

Each failure log is accessible here:
Bitcoin ABC functional tests: abc_p2p_getavaaddr.py --nolegacyavaproof

Failed tests logs:

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

------- Stdout: -------
2022-04-20T13:33:53.701000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20220420_133242/abc_p2p_getavaaddr_18
2022-04-20T13:33:55.972000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21152 due to [Errno 104] Connection reset by peer
2022-04-20T13:34:28.400000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/authproxy.py", line 187, in _get_response
    http_response = self.__conn.getresponse()
  File "/usr/lib/python3.7/http/client.py", line 1352, in getresponse
    response.begin()
  File "/usr/lib/python3.7/http/client.py", line 310, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.7/http/client.py", line 271, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 381, in run_test
    self.address_test(maxaddrtosend=3, num_proof=2, num_avanode=8)
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 188, in address_test
    self.wait_until(poll_all_for_block)
  File "/work/test/functional/test_framework/test_framework.py", line 677, in wait_until
    timeout_factor=self.options.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 271, in wait_until_helper
    if predicate():
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 185, in poll_all_for_block
    node.generate(1)
  File "/work/test/functional/test_framework/test_node.py", line 405, in generate
    nblocks=nblocks, address=self.get_deterministic_priv_key().address, maxtries=maxtries)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 117, in _request
    return self._get_response()
  File "/work/test/functional/test_framework/authproxy.py", line 194, in _get_response
    self.__conn.timeout)})
test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30 seconds. Consider using larger timeout for calls that take longer to return. (-344)
2022-04-20T13:34:28.452000Z TestFramework (INFO): Stopping nodes
2022-04-20T13:34:28.453000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 438, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 116, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.7/http/client.py", line 1260, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1271, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.7/http/client.py", line 1112, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
2022-04-20T13:35:28.464000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
'''
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 391, in <module>
    AvaAddrTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 156, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 286, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 524, in stop_nodes
    node.wait_until_stopped()
  File "/work/test/functional/test_framework/test_node.py", line 486, in wait_until_stopped
    timeout_factor=self.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
''' not true after 60.0 seconds
====== Bitcoin ABC functional tests with the next upgrade activated: abc_p2p_getavaaddr.py ======

------- Stdout: -------
2022-04-20T13:38:12.341000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20220420_133654/abc_p2p_getavaaddr_18
2022-04-20T13:38:14.616000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21152 due to [Errno 104] Connection reset by peer
2022-04-20T13:38:47.693000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/authproxy.py", line 187, in _get_response
    http_response = self.__conn.getresponse()
  File "/usr/lib/python3.7/http/client.py", line 1352, in getresponse
    response.begin()
  File "/usr/lib/python3.7/http/client.py", line 310, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.7/http/client.py", line 271, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 381, in run_test
    self.address_test(maxaddrtosend=3, num_proof=2, num_avanode=8)
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 188, in address_test
    self.wait_until(poll_all_for_block)
  File "/work/test/functional/test_framework/test_framework.py", line 677, in wait_until
    timeout_factor=self.options.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 271, in wait_until_helper
    if predicate():
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 185, in poll_all_for_block
    node.generate(1)
  File "/work/test/functional/test_framework/test_node.py", line 405, in generate
    nblocks=nblocks, address=self.get_deterministic_priv_key().address, maxtries=maxtries)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 117, in _request
    return self._get_response()
  File "/work/test/functional/test_framework/authproxy.py", line 194, in _get_response
    self.__conn.timeout)})
test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30 seconds. Consider using larger timeout for calls that take longer to return. (-344)
2022-04-20T13:38:47.749000Z TestFramework (INFO): Stopping nodes
2022-04-20T13:38:47.750000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 438, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 116, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.7/http/client.py", line 1260, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1271, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.7/http/client.py", line 1112, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
2022-04-20T13:39:47.785000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
'''
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 391, in <module>
    AvaAddrTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 156, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 286, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 524, in stop_nodes
    node.wait_until_stopped()
  File "/work/test/functional/test_framework/test_node.py", line 486, in wait_until_stopped
    timeout_factor=self.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
''' not true after 60.0 seconds
====== Bitcoin ABC functional tests with the next upgrade activated: abc_p2p_getavaaddr.py --nolegacyavaproof ======

------- Stdout: -------
2022-04-20T13:38:10.724000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20220420_133654/abc_p2p_getavaaddr_17
2022-04-20T13:38:12.991000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:21088 due to [Errno 104] Connection reset by peer
2022-04-20T13:38:45.653000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/authproxy.py", line 187, in _get_response
    http_response = self.__conn.getresponse()
  File "/usr/lib/python3.7/http/client.py", line 1352, in getresponse
    response.begin()
  File "/usr/lib/python3.7/http/client.py", line 310, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.7/http/client.py", line 271, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 381, in run_test
    self.address_test(maxaddrtosend=3, num_proof=2, num_avanode=8)
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 188, in address_test
    self.wait_until(poll_all_for_block)
  File "/work/test/functional/test_framework/test_framework.py", line 677, in wait_until
    timeout_factor=self.options.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 271, in wait_until_helper
    if predicate():
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 185, in poll_all_for_block
    node.generate(1)
  File "/work/test/functional/test_framework/test_node.py", line 405, in generate
    nblocks=nblocks, address=self.get_deterministic_priv_key().address, maxtries=maxtries)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 117, in _request
    return self._get_response()
  File "/work/test/functional/test_framework/authproxy.py", line 194, in _get_response
    self.__conn.timeout)})
test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 30 seconds. Consider using larger timeout for calls that take longer to return. (-344)
2022-04-20T13:38:45.709000Z TestFramework (INFO): Stopping nodes
2022-04-20T13:38:45.710000Z TestFramework.node0 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 438, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/coverage.py", line 47, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
  File "/work/test/functional/test_framework/authproxy.py", line 161, in __call__
    'POST', self.__url.path, postdata.encode('utf-8'))
  File "/work/test/functional/test_framework/authproxy.py", line 116, in _request
    self.__conn.request(method, path, postdata, headers)
  File "/usr/lib/python3.7/http/client.py", line 1260, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1271, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.7/http/client.py", line 1112, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent
2022-04-20T13:39:45.729000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
'''
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 391, in <module>
    AvaAddrTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 156, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 286, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 524, in stop_nodes
    node.wait_until_stopped()
  File "/work/test/functional/test_framework/test_node.py", line 486, in wait_until_stopped
    timeout_factor=self.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
    def is_node_stopped(self):
        """Checks whether the node has stopped.

        Returns True if the node has stopped. False otherwise.
        This method is responsible for freeing resources (self.process)."""
        if not self.running:
            return True
        return_code = self.process.poll()
        if return_code is None:
            return False

        # process has stopped. Assert that it didn't return an error code.
        assert return_code == 0, self._node_msg(
            "Node returned non-zero exit code ({}) when stopping".format(return_code))
        self.running = False
        self.process = None
        self.rpc_connected = False
        self.rpc = None
        self.log.debug("Node stopped")
        return True
''' not true after 60.0 seconds

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

Fabien requested changes to this revision.Apr 21 2022, 07:51
Fabien added a subscriber: Fabien.

Tests are failing, back on your queue.
I have the feeling that you created a deadlock.

This revision now requires changes to proceed.Apr 21 2022, 07:51

Remove code that is no longer necessary given the removal of IsWorthPolling(), and which is likely the cause of the test failures.

Fabien requested changes to this revision.May 2 2022, 09:02
Fabien added inline comments.
src/avalanche/processor.cpp
657

Need to bail out if the inv vector is full

710

Keep ordering consistent, and factorize the logic

This revision now requires changes to proceed.May 2 2022, 09:02
Mengerian abandoned this revision.
Mengerian added a reviewer: tyler-smith.