Page MenuHomePhabricator

[tests] remove bignum.py
ClosedPublic

Authored by PiRK on Jan 8 2021, 17:08.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABCa5d817fae887: [tests] remove bignum.py
Summary

The helper module bignum.py in the functional test framework provides only one function that is used outside the module (bn2vch) and it is used only in script.py, Remove bignum.py and move the function to script.py

PR17319 introduced a bug, so I had to merge also a commit from PR18378 which rewrites entirely the function bn2vch

This is a backport of Core PR17319

Additional bugfix commit:
https://github.com/bitcoin/bitcoin/pull/18378/commits/a3ad6459b77e9b7156e486a9e4a37dbfdc35e324

The rest of PR18378 will be in a separate diff.

Test Plan

ninja check-functional-extended

Diff Detail

Event Timeline

PiRK requested review of this revision.Jan 8 2021, 17:08
PiRK planned changes to this revision.Jan 8 2021, 17:16

investigating a failure in extended functional tests

Failed tests logs:

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

------- Stdout: -------
2021-01-08T17:15:56.190000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20210108_171436/feature_csv_activation_28
2021-01-08T17:15:56.555000Z TestFramework (INFO): Generate blocks in the past for coinbase outputs.
2021-01-08T17:15:59.491000Z TestFramework (INFO): Not yet activated, height = 574 (will activate for block 576, not 575)
2021-01-08T17:15:59.925000Z TestFramework (INFO): TESTING
2021-01-08T17:15:59.925000Z TestFramework (INFO): Pre-Soft Fork Tests. All txs should pass.
2021-01-08T17:15:59.925000Z TestFramework (INFO): Test version 1 txs
2021-01-08T17:16:00.130000Z TestFramework (INFO): Test version 2 txs
2021-01-08T17:16:00.451000Z TestFramework (INFO): Post-Soft Fork Tests.
2021-01-08T17:16:00.451000Z TestFramework (INFO): BIP 113 tests
2021-01-08T17:16:00.989000Z TestFramework (INFO): BIP 68 tests
2021-01-08T17:16:00.989000Z TestFramework (INFO): Test version 1 txs - all should still pass
2021-01-08T17:16:01.113000Z TestFramework (INFO): Test version 2 txs
2021-01-08T17:16:02.954000Z TestFramework (INFO): BIP 112 tests
2021-01-08T17:16:02.954000Z TestFramework (INFO): Test version 1 txs
2021-01-08T17:16:08.178000Z TestFramework (INFO): Test version 2 txs
2021-01-08T17:17:13.001000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
                wait_until(lambda: node.getbestblockhash() ==
                           blocks[-1].hash, timeout=timeout)
'''
2021-01-08T17:17:13.001000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 120, in main
    self.run_test()
  File "/work/test/functional/feature_csv_activation.py", line 639, in run_test
    self.send_blocks([self.create_test_block(spend_txs)])
  File "/work/test/functional/feature_csv_activation.py", line 229, in send_blocks
    blocks, self.nodes[0], success=success)
  File "/work/test/functional/test_framework/mininode.py", line 694, in send_blocks_and_test
    test()
  File "/work/test/functional/test_framework/mininode.py", line 686, in test
    blocks[-1].hash, timeout=timeout)
  File "/work/test/functional/test_framework/util.py", line 276, in wait_until
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
                wait_until(lambda: node.getbestblockhash() ==
                           blocks[-1].hash, timeout=timeout)
''' not true after 60 seconds
2021-01-08T17:17:13.052000Z TestFramework (INFO): Stopping nodes
2021-01-08T17:17:13.503000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20210108_171436/feature_csv_activation_28
2021-01-08T17:17:13.504000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20210108_171436/feature_csv_activation_28/test_framework.log
2021-01-08T17:17:13.504000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20210108_171436/feature_csv_activation_28' to consolidate all logs

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

Failed tests logs:

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

------- Stdout: -------
2021-01-08T17:18:08.120000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210108_171710/feature_csv_activation_601
2021-01-08T17:18:08.482000Z TestFramework (INFO): Generate blocks in the past for coinbase outputs.
2021-01-08T17:18:09.339000Z TestFramework (INFO): Not yet activated, height = 574 (will activate for block 576, not 575)
2021-01-08T17:18:09.584000Z TestFramework (INFO): TESTING
2021-01-08T17:18:09.584000Z TestFramework (INFO): Pre-Soft Fork Tests. All txs should pass.
2021-01-08T17:18:09.584000Z TestFramework (INFO): Test version 1 txs
2021-01-08T17:18:09.773000Z TestFramework (INFO): Test version 2 txs
2021-01-08T17:18:10.088000Z TestFramework (INFO): Post-Soft Fork Tests.
2021-01-08T17:18:10.088000Z TestFramework (INFO): BIP 113 tests
2021-01-08T17:18:10.644000Z TestFramework (INFO): BIP 68 tests
2021-01-08T17:18:10.644000Z TestFramework (INFO): Test version 1 txs - all should still pass
2021-01-08T17:18:10.770000Z TestFramework (INFO): Test version 2 txs
2021-01-08T17:18:12.565000Z TestFramework (INFO): BIP 112 tests
2021-01-08T17:18:12.566000Z TestFramework (INFO): Test version 1 txs
2021-01-08T17:18:17.897000Z TestFramework (INFO): Test version 2 txs
2021-01-08T17:19:22.615000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
                wait_until(lambda: node.getbestblockhash() ==
                           blocks[-1].hash, timeout=timeout)
'''
2021-01-08T17:19:22.615000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 120, in main
    self.run_test()
  File "/work/test/functional/feature_csv_activation.py", line 639, in run_test
    self.send_blocks([self.create_test_block(spend_txs)])
  File "/work/test/functional/feature_csv_activation.py", line 229, in send_blocks
    blocks, self.nodes[0], success=success)
  File "/work/test/functional/test_framework/mininode.py", line 694, in send_blocks_and_test
    test()
  File "/work/test/functional/test_framework/mininode.py", line 686, in test
    blocks[-1].hash, timeout=timeout)
  File "/work/test/functional/test_framework/util.py", line 276, in wait_until
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
                wait_until(lambda: node.getbestblockhash() ==
                           blocks[-1].hash, timeout=timeout)
''' not true after 60 seconds
2021-01-08T17:19:22.666000Z TestFramework (INFO): Stopping nodes
2021-01-08T17:19:22.869000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210108_171710/feature_csv_activation_601
2021-01-08T17:19:22.869000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210108_171710/feature_csv_activation_601/test_framework.log
2021-01-08T17:19:22.869000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210108_171710/feature_csv_activation_601' to consolidate all logs
====== Bitcoin ABC functional tests with the next upgrade activated: feature_csv_activation.py ======

------- Stdout: -------
2021-01-08T17:21:29.754000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210108_172031/feature_csv_activation_590
2021-01-08T17:21:30.407000Z TestFramework (INFO): Generate blocks in the past for coinbase outputs.
2021-01-08T17:21:31.936000Z TestFramework (INFO): Not yet activated, height = 574 (will activate for block 576, not 575)
2021-01-08T17:21:32.633000Z TestFramework (INFO): TESTING
2021-01-08T17:21:32.633000Z TestFramework (INFO): Pre-Soft Fork Tests. All txs should pass.
2021-01-08T17:21:32.633000Z TestFramework (INFO): Test version 1 txs
2021-01-08T17:21:32.787000Z TestFramework (INFO): Test version 2 txs
2021-01-08T17:21:33.080000Z TestFramework (INFO): Post-Soft Fork Tests.
2021-01-08T17:21:33.080000Z TestFramework (INFO): BIP 113 tests
2021-01-08T17:21:33.638000Z TestFramework (INFO): BIP 68 tests
2021-01-08T17:21:33.638000Z TestFramework (INFO): Test version 1 txs - all should still pass
2021-01-08T17:21:33.767000Z TestFramework (INFO): Test version 2 txs
2021-01-08T17:21:35.574000Z TestFramework (INFO): BIP 112 tests
2021-01-08T17:21:35.575000Z TestFramework (INFO): Test version 1 txs
2021-01-08T17:21:40.947000Z TestFramework (INFO): Test version 2 txs
2021-01-08T17:22:45.770000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
                wait_until(lambda: node.getbestblockhash() ==
                           blocks[-1].hash, timeout=timeout)
'''
2021-01-08T17:22:45.770000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 120, in main
    self.run_test()
  File "/work/test/functional/feature_csv_activation.py", line 639, in run_test
    self.send_blocks([self.create_test_block(spend_txs)])
  File "/work/test/functional/feature_csv_activation.py", line 229, in send_blocks
    blocks, self.nodes[0], success=success)
  File "/work/test/functional/test_framework/mininode.py", line 694, in send_blocks_and_test
    test()
  File "/work/test/functional/test_framework/mininode.py", line 686, in test
    blocks[-1].hash, timeout=timeout)
  File "/work/test/functional/test_framework/util.py", line 276, in wait_until
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
                wait_until(lambda: node.getbestblockhash() ==
                           blocks[-1].hash, timeout=timeout)
''' not true after 60 seconds
2021-01-08T17:22:45.820000Z TestFramework (INFO): Stopping nodes
2021-01-08T17:22:46.022000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210108_172031/feature_csv_activation_590
2021-01-08T17:22:46.022000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210108_172031/feature_csv_activation_590/test_framework.log
2021-01-08T17:22:46.022000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210108_172031/feature_csv_activation_590' to consolidate all logs

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

This revision is now accepted and ready to land.Jan 9 2021, 05:02
This revision was automatically updated to reflect the committed changes.