This a very basic implementation of the proof download feature via a
getdata message. For now this has zero defense mechanism so it is hidden
behind a flag which disables it by default.
Depends on D9499 for passing the tests.
Differential D9498
[avalanche] Reply to proof invs with getdata requests Fabien on May 11 2021, 14:43. Authored by
Details
This a very basic implementation of the proof download feature via a Depends on D9499 for passing the tests. ./test/functional/test_runner.py abc_p2p_avalanche_inventory.py
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (build-debug) failed.
Failed tests logs: ====== Bitcoin ABC functional tests: abc_p2p_proof_inventory.py ====== ------- Stdout: ------- 2021-05-11T14:52:34.480000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_ _20210511_144836/abc_p2p_proof_inventory_617 2021-05-11T14:52:35.068000Z TestFramework (INFO): Test that we request proofs from all our peers, eventually 2021-05-11T14:52:36.228000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/work/test/functional/test_framework/test_framework.py", line 126, in main self.run_test() File "/work/test/functional/abc_p2p_proof_inventory.py", line 53, in run_test self.test_proof_requests() File "/work/test/functional/abc_p2p_proof_inventory.py", line 43, in test_proof_requests p.send_and_ping(msg) File "/work/test/functional/test_framework/mininode.py", line 567, in send_and_ping self.sync_with_ping(timeout=timeout) File "/work/test/functional/test_framework/mininode.py", line 578, in sync_with_ping self.wait_until(test_function, timeout=timeout) File "/work/test/functional/test_framework/mininode.py", line 470, in wait_until timeout_factor=self.timeout_factor) File "/work/test/functional/test_framework/util.py", line 261, in wait_until if predicate(): File "/work/test/functional/test_framework/mininode.py", line 574, in test_function assert self.is_connected AssertionError 2021-05-11T14:52:36.279000Z TestFramework (INFO): Stopping nodes ------- Stderr: ------- Traceback (most recent call last): 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 1306, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1255, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1069, in _send_output self.send(chunk) File "/usr/lib/python3.7/http/client.py", line 991, in send self.sock.sendall(data) BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/work/test/functional/abc_p2p_proof_inventory.py", line 57, in <module> ProofInventoryTest().main() File "/work/test/functional/test_framework/test_framework.py", line 146, in main exit_code = self.shutdown() File "/work/test/functional/test_framework/test_framework.py", line 272, in shutdown self.stop_nodes() File "/work/test/functional/test_framework/test_framework.py", line 500, in stop_nodes node.stop_node(wait=wait, wait_until_stopped=False) File "/work/test/functional/test_framework/test_node.py", line 412, in stop_node self.stop(wait=wait) File "/work/test/functional/test_framework/coverage.py", line 48, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) File "/work/test/functional/test_framework/authproxy.py", line 157, in __call__ 'POST', self.__url.path, postdata.encode('utf-8')) File "/work/test/functional/test_framework/authproxy.py", line 122, 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 1306, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1255, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1030, in _send_output self.send(msg) File "/usr/lib/python3.7/http/client.py", line 970, in send self.connect() File "/usr/lib/python3.7/http/client.py", line 942, in connect (self.host,self.port), self.timeout, self.source_address) File "/usr/lib/python3.7/socket.py", line 727, in create_connection raise err File "/usr/lib/python3.7/socket.py", line 716, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused Each failure log is accessible here: Comment Actions Build Bitcoin ABC Diffs / Diff Testing (build-debug) failed.
Failed tests logs: ====== Bitcoin ABC functional tests: abc_p2p_proof_inventory.py ====== ------- Stdout: ------- 2021-05-11T14:58:16.037000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_ _20210511_145429/abc_p2p_proof_inventory_437 2021-05-11T14:58:16.619000Z TestFramework (INFO): Test that we request proofs from all our peers, eventually 2021-05-11T14:58:17.907000Z TestFramework.mininode (WARNING): Connection lost to 127.0.0.1:20257 due to [Errno 104] Connection reset by peer 2021-05-11T14:58:17.936000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/work/test/functional/test_framework/test_framework.py", line 126, in main self.run_test() File "/work/test/functional/abc_p2p_proof_inventory.py", line 53, in run_test self.test_proof_requests() File "/work/test/functional/abc_p2p_proof_inventory.py", line 43, in test_proof_requests p.send_and_ping(msg) File "/work/test/functional/test_framework/mininode.py", line 567, in send_and_ping self.sync_with_ping(timeout=timeout) File "/work/test/functional/test_framework/mininode.py", line 578, in sync_with_ping self.wait_until(test_function, timeout=timeout) File "/work/test/functional/test_framework/mininode.py", line 470, in wait_until timeout_factor=self.timeout_factor) File "/work/test/functional/test_framework/util.py", line 261, in wait_until if predicate(): File "/work/test/functional/test_framework/mininode.py", line 574, in test_function assert self.is_connected AssertionError 2021-05-11T14:58:17.988000Z TestFramework (INFO): Stopping nodes [node 0] Cleaning up leftover process ------- Stderr: ------- Traceback (most recent call last): 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 1306, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1255, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1069, in _send_output self.send(chunk) File "/usr/lib/python3.7/http/client.py", line 991, in send self.sock.sendall(data) BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/work/test/functional/abc_p2p_proof_inventory.py", line 57, in <module> ProofInventoryTest().main() File "/work/test/functional/test_framework/test_framework.py", line 146, in main exit_code = self.shutdown() File "/work/test/functional/test_framework/test_framework.py", line 272, in shutdown self.stop_nodes() File "/work/test/functional/test_framework/test_framework.py", line 500, in stop_nodes node.stop_node(wait=wait, wait_until_stopped=False) File "/work/test/functional/test_framework/test_node.py", line 412, in stop_node self.stop(wait=wait) File "/work/test/functional/test_framework/coverage.py", line 48, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) File "/work/test/functional/test_framework/authproxy.py", line 157, in __call__ 'POST', self.__url.path, postdata.encode('utf-8')) File "/work/test/functional/test_framework/authproxy.py", line 122, 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 1306, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1255, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1030, in _send_output self.send(msg) File "/usr/lib/python3.7/http/client.py", line 970, in send self.connect() File "/usr/lib/python3.7/http/client.py", line 942, in connect (self.host,self.port), self.timeout, self.source_address) File "/usr/lib/python3.7/socket.py", line 727, in create_connection raise err File "/usr/lib/python3.7/socket.py", line 716, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused Each failure log is accessible here: Comment Actions Build Bitcoin ABC Diffs / Diff Testing (build-diff) failed.
Failed tests logs: ====== Bitcoin ABC functional tests: abc_mining_basic.py ====== ------- Stdout: ------- 2021-05-11T14:57:43.435000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_ _20210511_145444/abc_mining_basic_342 2021-05-11T14:57:43.911000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/work/test/functional/test_framework/test_framework.py", line 126, in main self.run_test() File "/work/test/functional/abc_mining_basic.py", line 146, in run_test self.run_for_node(self.nodes[1], MINER_FUND_LEGACY_ADDR) File "/work/test/functional/abc_mining_basic.py", line 69, in run_for_node 'minimumvalue': 0, File "/work/test/functional/abc_mining_basic.py", line 58, in assert_getblocktemplate assert_equal(blockTemplate[key], value) File "/work/test/functional/test_framework/util.py", line 60, in assert_equal for arg in (thing1, thing2) + args))) AssertionError: not({'minerfund': {'addresses': ['2MviGxxFciGeWTgkUgYgjqehWt18c4ZsShd'], 'minimumvalue': 200000000}} == {'minerfund': {'addresses': [], 'minimumvalue': 0}}) 2021-05-11T14:57:43.962000Z TestFramework (INFO): Stopping nodes 2021-05-11T14:57:44.164000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_ _20210511_145444/abc_mining_basic_342 2021-05-11T14:57:44.164000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_ _20210511_145444/abc_mining_basic_342/test_framework.log 2021-05-11T14:57:44.164000Z TestFramework (ERROR): 2021-05-11T14:57:44.164000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_ _20210511_145444/abc_mining_basic_342' to consolidate all logs 2021-05-11T14:57:44.164000Z TestFramework (ERROR): 2021-05-11T14:57:44.164000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log. 2021-05-11T14:57:44.164000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues 2021-05-11T14:57:44.164000Z TestFramework (ERROR): Each failure log is accessible here:
Comment Actions Rename the flag, remove the unecessary mutex, make the bool check explicit, move proof between block and tx Comment Actions Build Bitcoin ABC Diffs / Diff Testing (build-debug) failed.
Failed tests logs: ====== Bitcoin ABC functional tests: abc_p2p_proof_inventory.py ====== ------- Stdout: ------- 2021-05-12T12:26:27.557000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_ _20210512_122228/abc_p2p_proof_inventory_220 2021-05-12T12:26:28.116000Z TestFramework (INFO): Test that we request proofs from all our peers, eventually 2021-05-12T12:26:29.370000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/work/test/functional/test_framework/test_framework.py", line 126, in main self.run_test() File "/work/test/functional/abc_p2p_proof_inventory.py", line 53, in run_test self.test_proof_requests() File "/work/test/functional/abc_p2p_proof_inventory.py", line 43, in test_proof_requests p.send_and_ping(msg) File "/work/test/functional/test_framework/mininode.py", line 567, in send_and_ping self.sync_with_ping(timeout=timeout) File "/work/test/functional/test_framework/mininode.py", line 578, in sync_with_ping self.wait_until(test_function, timeout=timeout) File "/work/test/functional/test_framework/mininode.py", line 470, in wait_until timeout_factor=self.timeout_factor) File "/work/test/functional/test_framework/util.py", line 261, in wait_until if predicate(): File "/work/test/functional/test_framework/mininode.py", line 574, in test_function assert self.is_connected AssertionError 2021-05-12T12:26:29.421000Z TestFramework (INFO): Stopping nodes ------- Stderr: ------- Traceback (most recent call last): 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 1306, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1255, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1069, in _send_output self.send(chunk) File "/usr/lib/python3.7/http/client.py", line 991, in send self.sock.sendall(data) BrokenPipeError: [Errno 32] Broken pipe During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/work/test/functional/abc_p2p_proof_inventory.py", line 57, in <module> ProofInventoryTest().main() File "/work/test/functional/test_framework/test_framework.py", line 146, in main exit_code = self.shutdown() File "/work/test/functional/test_framework/test_framework.py", line 272, in shutdown self.stop_nodes() File "/work/test/functional/test_framework/test_framework.py", line 500, in stop_nodes node.stop_node(wait=wait, wait_until_stopped=False) File "/work/test/functional/test_framework/test_node.py", line 412, in stop_node self.stop(wait=wait) File "/work/test/functional/test_framework/coverage.py", line 48, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) File "/work/test/functional/test_framework/authproxy.py", line 157, in __call__ 'POST', self.__url.path, postdata.encode('utf-8')) File "/work/test/functional/test_framework/authproxy.py", line 122, 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 1306, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1255, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1030, in _send_output self.send(msg) File "/usr/lib/python3.7/http/client.py", line 970, in send self.connect() File "/usr/lib/python3.7/http/client.py", line 942, in connect (self.host,self.port), self.timeout, self.source_address) File "/usr/lib/python3.7/socket.py", line 727, in create_connection raise err File "/usr/lib/python3.7/socket.py", line 716, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused Each failure log is accessible here:
|