Page MenuHomePhabricator

Use pure python for functional tests schnorr computation
ClosedPublic

Authored by Fabien on Sep 18 2020, 15:25.

Details

Summary

This is a follow-up for D5965.
It converts our current schnorr.py library to use the framework from
key.py and remove openssl as a dependency for the functional tests.

Test Plan
ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Branch
python_schnorr_no_openssl
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 12797
Build 25667: Build Diffbuild-clang-tidy · build-clang-10 · build-without-wallet · build-diff
Build 25666: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Sep 18 2020, 15:25
deadalnix added inline comments.
test/functional/test_framework/key.py
210

The field size is 256bits, not this humongous number.

399

Is there a reason you implemented this rather than just picking something random like for ecdsa? This seems rather inconsistent, more code, and the benefit is dubious for the test framework.

deadalnix requested changes to this revision.Sep 18 2020, 23:21

At least for the field size thing.

This revision now requires changes to proceed.Sep 18 2020, 23:21

Deduplicate the field prime (and not size...), use a random nonce.

test/functional/test_framework/key.py
399

I ported it so I can keep the built-in test from the original schnorr.py, so not a strong case. I will remove it.

This revision is now accepted and ready to land.Sep 21 2020, 14:07