Repository navigation
Conversation
git-subtree-dir: test/secp256k1lab git-subtree-split: b2033d507f7855fe1670e58d80d481fd156554d1
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34287. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
That would be my main concern. Having worked with the library for BIP specification I would be happy if we use it here too but test code is the part of the code base where we still manage to move relatively quickly and it would be a shame if adding test coverage here would be blocked by changes in secp256k1lab. The maintainers of secp256k1lab are also maintainers of secp256k1 and they a pretty busy usually so I would feel better about this if there was at least one other maintainer for lab, maybe with a Bitcoin Core focus. Alternatively maybe there can be a solution where we have a wrapper/companion to the library and the functionality that is not provided from it goes in there and in can be ported to lab whenever. That way we could at least not be blocked on conversations if a
It should be at least in |
|
🐙 This pull request conflicts with the target branch and needs rebase. |
|
I was going to comment here earlier, but I will still put it here for documentation purposes: I found that I do need secp256k1lab in here for my CISA PoC implementation because I have now based the BIPs reference code on the library. I thought about different avenues for CISA functional tests but I don't see any reasonable alternative. Probably CISA will not be the first such BIP to make it into Bitcoin Core but eventually we will need it in here when we implement BIPs that have used the lab for their reference code. So this turns my skepticism from above into a concept ack. But it's still the most reasonable move for now to keep this closed and wait until one of these BIPs that require lab make it into Bitcoin Core. Until then, the maintenance burden isn't worth it IMO due to the (for now) limited upside. |
This PR adds secp256k1lab as a subtree and uses it for low-level secp256k1 field and group arithmetic (i.e. replacing the contents of secp256k1.py) as a first step, primarily for demonstration purposes. Keeping it as a draft right now, to assess if there is conceptual support. The goal would be to keep the test framework code maintained here to Bitcoin Core specific parts and develop secp256k1-specific parts (e.g. MuSig, Silent Payments, FROST etc., to name a few upcoming ones) in secp256k1lab. I'm not sure if that's a clear win from a maintenance perspective (it could e.g. add friction, having to depend on and coordinate with secp256k1lab maintainers), but I'm curious to hear opinions. Suggested e.g. in #32642 (review).
Also, there are still some problems and open questions:
key.pyuses special testing parameters likeflip_pandflip_rthat aren't available in secp256k1lab)test_framework/cryptobut moved it up directly totest, for not having to add a linter mypy exception, as it only targetstest/functional/*; maybe adding the subtree to a new folder liketest/libswould be better for clarity