Page MenuHomePhabricator

[avalanche] Get rid of the compact proof cleanup log
ClosedPublic

Authored by Fabien on Jul 6 2022, 13:30.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABC9c5bc52366a6: [avalanche] Get rid of the compact proof cleanup log
Summary

During the compact proof exchange a opy of the radix tree containing the proofs is made, and needs to be cleanup up. This happens when the missing indices are requested, or after some timeout elapsed. In the latter case a message is printed in the log.

The cleanup happens even in the case of an empty tree, or if the tree has been previously cleaned due to a normal proof request. In this case this is a no-op, but the log is still printed which is confusing. D11698 attempted to fix this by avoiding the cleanup and the log if the tree was null, but this is creating a special case just for the sake of fixing the log, as the behavior is otherwise correct.

This diff removes the log which is not very helpful and was introduced to make the associated test more explicit. The test is adapted to use another event indicating the cleanup happened.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jul 6 2022, 13:30

Failed tests logs:

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

------- Stdout: -------
2022-07-06T13:34:40.190000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20220706_133338/abc_p2p_avalanche_proof_voting_13
2022-07-06T13:34:42.622000Z TestFramework (INFO): Trigger polling from the node...
2022-07-06T13:34:42.818000Z TestFramework (INFO): Check we poll for valid proof
2022-07-06T13:34:43.593000Z TestFramework (INFO): Check we don't poll for subsequent proofs if the cooldown is not elapsed, proof not the favorite
2022-07-06T13:34:43.644000Z TestFramework (INFO): Check we don't poll for subsequent proofs if the cooldown is not elapsed, proof is the favorite
2022-07-06T13:34:43.695000Z TestFramework (INFO): Check we poll for conflicting proof if the proof is not the favorite
2022-07-06T13:34:44.281000Z TestFramework (INFO): Check we poll for conflicting proof if the proof is the favorite
2022-07-06T13:34:44.478000Z TestFramework (INFO): Check we don't poll for orphans
2022-07-06T13:34:44.530000Z TestFramework (INFO): Check we don't poll for proofs that get rejected
2022-07-06T13:34:44.582000Z TestFramework (INFO): Check we don't poll for invalid proofs and get banned
2022-07-06T13:34:44.683000Z TestFramework (INFO): We don't poll for proofs if replacement is disabled
2022-07-06T13:34:47.935000Z TestFramework (INFO): Test proof acceptance
2022-07-06T13:34:48.335000Z TestFramework (INFO): Test the peer replacement rate limit
2022-07-06T13:34:50.088000Z TestFramework (INFO): Test proof rejection
2022-07-06T13:34:50.415000Z TestFramework (INFO): Test proof invalidation
2022-07-06T13:34:52.073000Z TestFramework (INFO): The node will now ignore the invalid proof
2022-07-06T13:34:52.897000Z TestFramework (INFO): Trigger polling from the node...
2022-07-06T13:34:52.951000Z TestFramework (INFO): Trigger polling from the node...
2022-07-06T13:34:53.007000Z TestFramework (INFO): Trigger polling from the node...
2022-07-06T13:34:53.061000Z TestFramework (INFO): Trigger polling from the node...
2022-07-06T13:34:53.115000Z TestFramework (INFO): Trigger polling from the node...
2022-07-06T13:34:53.169000Z TestFramework (INFO): Trigger polling from the node...
2022-07-06T13:35:07.648000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
                    self.wait_until(lambda: not self.can_find_proof_in_poll(
                        proofid_seq1, response=AvalancheProofVoteResponse.UNKNOWN), timeout=10)
'''
2022-07-06T13:35:13.738000Z TestFramework (ERROR): Assertion failed
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 119, in run_test
    self.stale_proof_tests(node)
  File "/work/test/functional/abc_p2p_avalanche_proof_voting.py", line 469, in stale_proof_tests
    assert_greater_than(retry, 0)
  File "/work/test/functional/test_framework/util.py", line 65, in assert_greater_than
    raise AssertionError("{} <= {}".format(str(thing1), str(thing2)))
AssertionError: 0 <= 0
2022-07-06T13:35:13.789000Z TestFramework (INFO): Stopping nodes
2022-07-06T13:35:13.892000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20220706_133338/abc_p2p_avalanche_proof_voting_13
2022-07-06T13:35:13.892000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20220706_133338/abc_p2p_avalanche_proof_voting_13/test_framework.log
2022-07-06T13:35:13.892000Z TestFramework (ERROR): 
2022-07-06T13:35:13.892000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20220706_133338/abc_p2p_avalanche_proof_voting_13' to consolidate all logs
2022-07-06T13:35:13.892000Z TestFramework (ERROR): 
2022-07-06T13:35:13.892000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-07-06T13:35:13.892000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2022-07-06T13:35:13.893000Z TestFramework (ERROR):

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

sdulfari requested changes to this revision.Jul 7 2022, 04:09
sdulfari added a subscriber: sdulfari.

Back to you for the test failure also

test/functional/abc_p2p_compactproofs.py
610 ↗(On Diff #34276)

Cleanup

This revision now requires changes to proceed.Jul 7 2022, 04:09
This revision is now accepted and ready to land.Jul 8 2022, 03:59