Page MenuHomePhabricator

[avalanche] Move the proof registration time from the peer to the proof pool
AbandonedPublic

Authored by Fabien on Dec 1 2021, 15:09.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Summary

This will make it possible to retrieve the registration time per utxo and use it to implement a cooldown feature when replacing a conflicting proof. This also opens the cooldown feature to the orphans pool. There is currently no change in behavior.

Ref T1854.

Depends on D10524.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_proofpool_registrationtime
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17575
Build 34976: Build Diffbuild-without-wallet · build-clang-tidy · build-debug · build-diff · lint-circular-dependencies · build-clang
Build 34975: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Dec 1 2021, 15:09
deadalnix requested changes to this revision.Dec 7 2021, 16:18
deadalnix added a subscriber: deadalnix.

The registration time is now stored for each UTXO, I don't think this really makes sense.

This revision now requires changes to proceed.Dec 7 2021, 16:18

Use a separated map to store the registration time to avoid duplicating it. Retrieving by utxo will be a 2-step process: first get the conflicting proof, then get its confirmation time. Both accesses are constant time.

Tail of the build log:

[397/455] Running utility command for check-bitcoin-merkleblock_tests
[398/455] Running utility command for check-bitcoin-txvalidationcache_tests
[399/455] bitcoin: testing cuckoocache_tests
[400/455] bitcoin: testing scheduler_tests
[401/455] Running utility command for check-bitcoin-cuckoocache_tests
[402/455] bitcoin: testing bip32_tests
[403/455] Running utility command for check-bitcoin-scheduler_tests
[404/455] bitcoin: testing sync_tests
[405/455] Running utility command for check-bitcoin-bip32_tests
[406/455] Running utility command for check-bitcoin-sync_tests
[407/455] bitcoin: testing torcontrol_tests
[408/455] Running utility command for check-bitcoin-torcontrol_tests
[409/455] bitcoin: testing op_reversebytes_tests
[410/455] bitcoin: testing settings_tests
[411/455] Running utility command for check-bitcoin-op_reversebytes_tests
[412/455] Running utility command for check-bitcoin-settings_tests
[413/455] bitcoin: testing timedata_tests
[414/455] bitcoin: testing streams_tests
[415/455] bitcoin: testing validation_flush_tests
[416/455] Running utility command for check-bitcoin-timedata_tests
[417/455] Running utility command for check-bitcoin-validation_flush_tests
[418/455] Running utility command for check-bitcoin-streams_tests
[419/455] bitcoin: testing compilerbug_tests
[420/455] bitcoin: testing blockcheck_tests
[421/455] bitcoin: testing checkpoints_tests
[422/455] Running utility command for check-bitcoin-compilerbug_tests
[423/455] Running utility command for check-bitcoin-blockcheck_tests
[424/455] bitcoin: testing schnorr_tests
[425/455] Running utility command for check-bitcoin-checkpoints_tests
[426/455] bitcoin: testing script_standard_tests
[427/455] bitcoin: testing serialize_tests
[428/455] Running utility command for check-bitcoin-schnorr_tests
[429/455] bitcoin: testing validationinterface_tests
[430/455] Running utility command for check-bitcoin-script_standard_tests
[431/455] Running utility command for check-bitcoin-serialize_tests
[432/455] Running utility command for check-bitcoin-validationinterface_tests
[433/455] bitcoin: testing wallet_tests
[434/455] bitcoin: testing transaction_tests
[435/455] Running utility command for check-bitcoin-wallet_tests
[436/455] Running utility command for check-bitcoin-transaction_tests
[437/455] bitcoin: testing cashaddr_tests
[438/455] Running utility command for check-bitcoin-cashaddr_tests
[439/455] bitcoin: testing versionbits_tests
[440/455] bitcoin: testing crypto_tests
[441/455] Running utility command for check-bitcoin-versionbits_tests
[442/455] Running utility command for check-bitcoin-crypto_tests
[443/455] bitcoin: testing script_tests
[444/455] Running utility command for check-bitcoin-script_tests
[445/455] bitcoin: testing monolith_opcodes_tests
[446/455] Running utility command for check-bitcoin-monolith_opcodes_tests
[447/455] bitcoin: testing intmath_tests
[448/455] Running utility command for check-bitcoin-intmath_tests
[449/455] bitcoin: testing coinselector_tests
[450/455] Running utility command for check-bitcoin-coinselector_tests
[451/455] bitcoin: testing coins_tests
[452/455] Running utility command for check-bitcoin-coins_tests
[453/455] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Failed tests logs:

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

------- Stdout: -------
2021-12-08T14:30:48.123000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20211208_143011/abc_rpc_avalancheproof_22
2021-12-08T14:30:50.625000Z TestFramework (INFO): Make build a valid proof and restart the node to use it
2021-12-08T14:30:50.628000Z TestFramework (INFO): Test decodeavalancheproof RPC
2021-12-08T14:30:50.630000Z TestFramework (INFO): Testing decodeavalancheproof with legacyavaproof disabled
2021-12-08T14:30:51.641000Z TestFramework (INFO): The proof is registered at first chaintip update
2021-12-08T14:30:51.643000Z TestFramework (INFO): Start a node with an orphan proof
2021-12-08T14:30:52.000000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  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 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)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 132, in main
    self.run_test()
  File "/work/test/functional/abc_rpc_avalancheproof.py", line 188, in run_test
    expect_orphan=True)
  File "/work/test/functional/test_framework/avatools.py", line 152, in wait_for_proof
    wait_until_helper(proof_found, timeout=timeout)
  File "/work/test/functional/test_framework/util.py", line 273, in wait_until_helper
    if predicate():
  File "/work/test/functional/test_framework/avatools.py", line 147, in proof_found
    wait_for_proof.is_orphan = node.getrawavalancheproof(proofid_hex)[
  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 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
2021-12-08T14:30:52.051000Z TestFramework (INFO): Stopping nodes
2021-12-08T14:30:52.052000Z TestFramework.node1 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 422, 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
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_rpc_avalancheproof.py", line 535, in <module>
    LegacyAvalancheProofTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 280, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 514, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 435, in stop_node
    "Unexpected stderr {} != {}".format(stderr, expected_stderr))
AssertionError: Unexpected stderr bitcoind: ../../src/avalanche/proofpool.cpp:51: avalanche::ProofPool::AddProofStatus avalanche::ProofPool::addProofIfNoConflict(const ProofRef&, avalanche::ProofPool::ConflictingProofSet&): Assertion `p.second' failed. !=

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

Tail of the build log:

[390/448] Running utility command for check-bitcoin-merkleblock_tests
[391/448] Running utility command for check-bitcoin-bip32_tests
[392/448] bitcoin: testing txvalidationcache_tests
[393/448] Running utility command for check-bitcoin-txvalidationcache_tests
[394/448] bitcoin: testing sync_tests
[395/448] bitcoin: testing op_reversebytes_tests
[396/448] bitcoin: testing torcontrol_tests
[397/448] bitcoin: testing radix_tests
[398/448] Running utility command for check-bitcoin-sync_tests
[399/448] Running utility command for check-bitcoin-torcontrol_tests
[400/448] Running utility command for check-bitcoin-radix_tests
[401/448] Running utility command for check-bitcoin-op_reversebytes_tests
[402/448] bitcoin: testing transaction_tests
[403/448] bitcoin: testing settings_tests
[404/448] Running utility command for check-bitcoin-transaction_tests
[405/448] Running utility command for check-bitcoin-settings_tests
[406/448] bitcoin: testing schnorr_tests
[407/448] Running utility command for check-bitcoin-schnorr_tests
[408/448] bitcoin: testing validation_flush_tests
[409/448] bitcoin: testing timedata_tests
[410/448] Running utility command for check-bitcoin-validation_flush_tests
[411/448] Running utility command for check-bitcoin-timedata_tests
[412/448] bitcoin: testing compilerbug_tests
[413/448] bitcoin: testing streams_tests
[414/448] bitcoin: testing checkpoints_tests
[415/448] Running utility command for check-bitcoin-streams_tests
[416/448] Running utility command for check-bitcoin-compilerbug_tests
[417/448] Running utility command for check-bitcoin-checkpoints_tests
[418/448] bitcoin: testing serialize_tests
[419/448] bitcoin: testing validationinterface_tests
[420/448] Running utility command for check-bitcoin-serialize_tests
[421/448] Running utility command for check-bitcoin-validationinterface_tests
[422/448] bitcoin: testing script_standard_tests
[423/448] Running utility command for check-bitcoin-script_standard_tests
[424/448] bitcoin: testing cashaddr_tests
[425/448] Running utility command for check-bitcoin-cashaddr_tests
[426/448] bitcoin: testing crypto_tests
[427/448] bitcoin: testing blockcheck_tests
[428/448] Running utility command for check-bitcoin-crypto_tests
[429/448] Running utility command for check-bitcoin-blockcheck_tests
[430/448] bitcoin: testing script_tests
[431/448] bitcoin: testing versionbits_tests
[432/448] Running utility command for check-bitcoin-script_tests
[433/448] Running utility command for check-bitcoin-versionbits_tests
[434/448] bitcoin: testing wallet_tests
[435/448] bitcoin: testing util_tests
[436/448] Running utility command for check-bitcoin-util_tests
[437/448] Running utility command for check-bitcoin-wallet_tests
[438/448] bitcoin: testing intmath_tests
[439/448] Running utility command for check-bitcoin-intmath_tests
[440/448] bitcoin: testing monolith_opcodes_tests
[441/448] Running utility command for check-bitcoin-monolith_opcodes_tests
[442/448] bitcoin: testing coinselector_tests
[443/448] Running utility command for check-bitcoin-coinselector_tests
[444/448] bitcoin: testing coins_tests
[445/448] Running utility command for check-bitcoin-coins_tests
[446/448] Running bitcoin test suite
PASSED: bitcoin test suite
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1
Fabien planned changes to this revision.Dec 8 2021, 14:34

Failed tests logs:

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

------- Stdout: -------
2021-12-08T14:32:03.385000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20211208_142958/abc_rpc_avalancheproof_22
2021-12-08T14:32:04.269000Z TestFramework (INFO): Make build a valid proof and restart the node to use it
2021-12-08T14:32:04.274000Z TestFramework (INFO): Test decodeavalancheproof RPC
2021-12-08T14:32:04.277000Z TestFramework (INFO): Testing decodeavalancheproof with legacyavaproof disabled
2021-12-08T14:32:05.844000Z TestFramework (INFO): The proof is registered at first chaintip update
2021-12-08T14:32:05.849000Z TestFramework (INFO): Start a node with an orphan proof
2021-12-08T14:32:06.445000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  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 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 279, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 132, in main
    self.run_test()
  File "/work/test/functional/abc_rpc_avalancheproof.py", line 188, in run_test
    expect_orphan=True)
  File "/work/test/functional/test_framework/avatools.py", line 152, in wait_for_proof
    wait_until_helper(proof_found, timeout=timeout)
  File "/work/test/functional/test_framework/util.py", line 273, in wait_until_helper
    if predicate():
  File "/work/test/functional/test_framework/avatools.py", line 147, in proof_found
    wait_for_proof.is_orphan = node.getrawavalancheproof(proofid_hex)[
  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 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
2021-12-08T14:32:06.497000Z TestFramework (INFO): Stopping nodes
2021-12-08T14:32:06.498000Z TestFramework.node1 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 422, 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
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_rpc_avalancheproof.py", line 535, in <module>
    LegacyAvalancheProofTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 280, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 514, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 435, in stop_node
    "Unexpected stderr {} != {}".format(stderr, expected_stderr))
AssertionError: Unexpected stderr bitcoind: ../../src/avalanche/proofpool.cpp:51: avalanche::ProofPool::AddProofStatus avalanche::ProofPool::addProofIfNoConflict(const ProofRef&, avalanche::ProofPool::ConflictingProofSet&): Assertion `p.second' failed. !=

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

Failed tests logs:

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

------- Stdout: -------
2021-12-08T14:32:58.461000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20211208_143127/abc_rpc_avalancheproof_22
2021-12-08T14:32:59.215000Z TestFramework (INFO): Make build a valid proof and restart the node to use it
2021-12-08T14:32:59.218000Z TestFramework (INFO): Test decodeavalancheproof RPC
2021-12-08T14:32:59.220000Z TestFramework (INFO): Testing decodeavalancheproof with legacyavaproof disabled
2021-12-08T14:33:00.191000Z TestFramework (INFO): The proof is registered at first chaintip update
2021-12-08T14:33:00.192000Z TestFramework (INFO): Start a node with an orphan proof
2021-12-08T14:33:00.579000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  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 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)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 132, in main
    self.run_test()
  File "/work/test/functional/abc_rpc_avalancheproof.py", line 188, in run_test
    expect_orphan=True)
  File "/work/test/functional/test_framework/avatools.py", line 152, in wait_for_proof
    wait_until_helper(proof_found, timeout=timeout)
  File "/work/test/functional/test_framework/util.py", line 273, in wait_until_helper
    if predicate():
  File "/work/test/functional/test_framework/avatools.py", line 147, in proof_found
    wait_for_proof.is_orphan = node.getrawavalancheproof(proofid_hex)[
  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 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
2021-12-08T14:33:00.631000Z TestFramework (INFO): Stopping nodes
2021-12-08T14:33:00.951000Z TestFramework.node1 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 422, 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
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_rpc_avalancheproof.py", line 535, in <module>
    LegacyAvalancheProofTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 280, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 514, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 435, in stop_node
    "Unexpected stderr {} != {}".format(stderr, expected_stderr))
AssertionError: Unexpected stderr bitcoind: ../../src/avalanche/proofpool.cpp:51: avalanche::ProofPool::AddProofStatus avalanche::ProofPool::addProofIfNoConflict(const ProofRef&, avalanche::ProofPool::ConflictingProofSet&): Assertion `p.second' failed. !=
====== Bitcoin ABC functional tests with the next upgrade activated: abc_rpc_avalancheproof.py ======

------- Stdout: -------
2021-12-08T14:36:48.557000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20211208_143516/abc_rpc_avalancheproof_22
2021-12-08T14:36:49.229000Z TestFramework (INFO): Make build a valid proof and restart the node to use it
2021-12-08T14:36:49.232000Z TestFramework (INFO): Test decodeavalancheproof RPC
2021-12-08T14:36:49.234000Z TestFramework (INFO): Testing decodeavalancheproof with legacyavaproof disabled
2021-12-08T14:36:50.200000Z TestFramework (INFO): The proof is registered at first chaintip update
2021-12-08T14:36:50.210000Z TestFramework (INFO): Start a node with an orphan proof
2021-12-08T14:36:50.557000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  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 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)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 132, in main
    self.run_test()
  File "/work/test/functional/abc_rpc_avalancheproof.py", line 188, in run_test
    expect_orphan=True)
  File "/work/test/functional/test_framework/avatools.py", line 152, in wait_for_proof
    wait_until_helper(proof_found, timeout=timeout)
  File "/work/test/functional/test_framework/util.py", line 273, in wait_until_helper
    if predicate():
  File "/work/test/functional/test_framework/avatools.py", line 147, in proof_found
    wait_for_proof.is_orphan = node.getrawavalancheproof(proofid_hex)[
  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 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
2021-12-08T14:36:50.608000Z TestFramework (INFO): Stopping nodes
2021-12-08T14:36:50.609000Z TestFramework.node1 (ERROR): Unable to stop node.
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_node.py", line 422, 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
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/abc_rpc_avalancheproof.py", line 535, in <module>
    LegacyAvalancheProofTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 152, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 280, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 514, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 435, in stop_node
    "Unexpected stderr {} != {}".format(stderr, expected_stderr))
AssertionError: Unexpected stderr bitcoind: ../../src/avalanche/proofpool.cpp:51: avalanche::ProofPool::AddProofStatus avalanche::ProofPool::addProofIfNoConflict(const ProofRef&, avalanche::ProofPool::ConflictingProofSet&): Assertion `p.second' failed. !=

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

Fabien planned changes to this revision.Dec 8 2021, 19:27