Page MenuHomePhabricator

Eliminate scratch memory used when generating contexts
ClosedPublic

Authored by deadalnix on Jan 17 2020, 00:55.

Details

Summary
  • ecmult_gen_impl: eliminate scratch memory used when generating context
    • ecmult_impl: eliminate scratch memory used when generating context
    • ecmult_impl: save one fe_inv_var
    • add secp256k1_ge_set_all_gej_var test which deals with many infinite points
    • Store z-ratios in the 'x' coord they'll recover
    • ecmult_impl: expand comment to explain how effective affine interacts with everything

This is a backport of secp256k1's PR557

Test Plan
ninja check-secp256k1

Diff Detail

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

Event Timeline

Snippet of first build failure:

[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_keypool_topup.py                 | ✓ Passed  | 4 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_labels.py                        | ✓ Passed  | 4 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_listreceivedby.py                | ✓ Passed  | 8 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_listsinceblock.py                | ✓ Passed  | 3 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_listtransactions.py              | ✓ Passed  | 9 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_multiwallet.py                   | ✓ Passed  | 8 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_multiwallet.py --usecli          | ✓ Passed  | 14 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_resendwallettransactions.py      | ✓ Passed  | 1 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_txn_clone.py                     | ✓ Passed  | 3 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_txn_clone.py --mineblock         | ✓ Passed  | 3 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_txn_doublespend.py               | ✓ Passed  | 3 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_txn_doublespend.py --mineblock   | ✓ Passed  | 2 s
[00:58:38] :	 [Step 1/1]  [0m [0;34mwallet_zapwallettxes.py                 | ✓ Passed  | 2 s
[00:58:38] :	 [Step 1/1]  [0m [1m
[00:58:38] :	 [Step 1/1] ALL                                     | ✓ Passed  | 479 s (accumulated) 
[00:58:38] :	 [Step 1/1]  [0mRuntime: 109 s
[00:58:38] :	 [Step 1/1] 
[00:58:38] :	 [Step 1/1] [91/445] cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/contrib/devtools/chainparams && /usr/bin/python3 ./test_make_chainparams.py
[00:58:38] :	 [Step 1/1] .....
[00:58:38] :	 [Step 1/1] ----------------------------------------------------------------------
[00:58:38] :	 [Step 1/1] Ran 5 tests in 0.001s
[00:58:38] :	 [Step 1/1] 
[00:58:38] :	 [Step 1/1] OK
[00:58:38] :	 [Step 1/1] [113/445] Running univalue test suite
[00:58:38] :	 [Step 1/1] PASSED: univalue test suite
[00:58:38] :	 [Step 1/1] [186/445] Running secp256k1 test suite
[00:58:38] :	 [Step 1/1] PASSED: secp256k1 test suite
[00:58:38] :	 [Step 1/1] [210/445] Running leveldb test suite
[00:58:38] :	 [Step 1/1] PASSED: leveldb test suite
[00:58:38] :	 [Step 1/1] [216/445] Running bitcoin-seeder-upgrade-activated test suite
[00:58:38] :	 [Step 1/1] PASSED: bitcoin-seeder-upgrade-activated test suite
[00:58:38] :	 [Step 1/1] [217/445] Running bitcoin-seeder test suite
[00:58:38] :	 [Step 1/1] PASSED: bitcoin-seeder test suite
[00:58:38] :	 [Step 1/1] [242/445] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
[00:58:38] :	 [Step 1/1] In file included from /usr/include/boost/test/unit_test.hpp:19,
[00:58:38] :	 [Step 1/1]                  from ../src/test/script_tests.cpp:29:
[00:58:38] :	 [Step 1/1] ../src/test/script_tests.cpp: In member function ‘void script_tests::script_build::test_method()’:
[00:58:38] :	 [Step 1/1] ../src/test/script_tests.cpp:575:22: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
[00:58:38] :	 [Step 1/1]  BOOST_AUTO_TEST_CASE(script_build) {
[00:58:38] :	 [Step 1/1]                       ^~~~~~~~~~~~
[00:58:38] :	 [Step 1/1] [268/445] bitcoin-upgrade-activated: testing util_tests
[00:58:38] :	 [Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-upgrade-activated-util_tests 
[00:58:38] :	 [Step 1/1] cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/build/src/test && /home/teamcity/buildAgent/work/c4a5708f2bae7929/build/src/test/run-util_tests.sh
[00:58:38] :	 [Step 1/1] Running 37 test cases...
[00:58:38] :	 [Step 1/1] Running 37 test cases...
[00:58:38] :	 [Step 1/1] 
[00:58:38] :	 [Step 1/1] *** No errors detected
[00:58:38] :	 [Step 1/1] error: in "util_tests/test_LockDirectory": check LockDirectory(dirname, lockname, true) == true has failed [false != true]
[00:58:38] :	 [Step 1/1] 
[00:58:38] :	 [Step 1/1] *** 1 failure is detected in the test module "Bitcoin Test Suite"
[00:58:38] :	 [Step 1/1] [280/445] bitcoin-upgrade-activated: testing transaction_tests
[00:58:38] :	 [Step 1/1] ninja: build stopped: subcommand failed.
[00:58:38]W:	 [Step 1/1] ++ print_sanitizers_log
[00:58:38]W:	 [Step 1/1] ++ for log in "${SAN_LOG_DIR}"/*.log.*
[00:58:38]W:	 [Step 1/1] ++ echo '*** Output of /tmp/sanitizer_logs/*.log.* ***'
[00:58:38]W:	 [Step 1/1] ++ cat '/tmp/sanitizer_logs/*.log.*'
[00:58:38]W:	 [Step 1/1] cat: '/tmp/sanitizer_logs/*.log.*': No such file or directory
[00:58:38] :	 [Step 1/1] *** Output of /tmp/sanitizer_logs/*.log.* ***
[00:58:38]W:	 [Step 1/1] Process exited with code 1
[00:58:38]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)
Fabien added a subscriber: Fabien.

I need to investigate the unrelated build failure, it looks like there is a flaky test.

This revision is now accepted and ready to land.Jan 17 2020, 09:55
This revision was landed with ongoing or failed builds.Jan 17 2020, 11:49
This revision was automatically updated to reflect the committed changes.