-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI test] Integrate secp256k1lab as subtree #83
base: master
Are you sure you want to change the base?
[CI test] Integrate secp256k1lab as subtree #83
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. Added some comments.
4d38d98
to
3c03e67
Compare
Rebased on master and addressed the review comments above (#83 (comment), #83 (comment), #83 (comment)). I btw thought it might be nice to squash the first three commits into one, but somehow always the rename of the vendored package (src/secp256k1lab => python/secp256k1lab/src/secp256k1lab, apparently happening in the merge commit) gets lost 🤔 |
python/secp256k1lab/pyproject.toml
Outdated
authors = [ | ||
{ name = "Tim Ruffing", email = "[email protected]" }, | ||
{ name = "Jonas Nick", email = "[email protected]" }, | ||
{ name = "Sebastian Falbesoner", email = "[email protected]" } | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be fair to list @sipa as an author:
authors = [ | |
{ name = "Tim Ruffing", email = "[email protected]" }, | |
{ name = "Jonas Nick", email = "[email protected]" }, | |
{ name = "Sebastian Falbesoner", email = "[email protected]" } | |
] | |
authors = [ | |
{ name = "Pieter Wuille", email = "[email protected]" }, | |
{ name = "Tim Ruffing", email = "[email protected]" }, | |
{ name = "Jonas Nick", email = "[email protected]" }, | |
{ name = "Sebastian Falbesoner", email = "[email protected]" } | |
] | |
maintainers = [ | |
{ name = "Tim Ruffing", email = "[email protected]" }, | |
{ name = "Jonas Nick", email = "[email protected]" }, | |
{ name = "Sebastian Falbesoner", email = "[email protected]" } | |
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've added authors
but not maintainers
. Was this intentional? (I also don't like the duplication too much, but well, it's correct...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that was unintentional, missed the maintainers
part of your suggested diff. Done.
I think I've seen this before. Just a shot in the dark but perhaps this helps: https://stackoverflow.com/questions/30136558/how-to-squash-commits-which-have-merge-commit-in-between |
3c03e67
to
def1dfc
Compare
Added the secp256k1lab suggestions in branch https://github.com/theStack/secp256k1lab/tree/secp256k1lab-draft02 and updated the subtree integration in this PR accordingly. Still a bunch of TODOs (#83 (comment), plus determining a reasonable required Python version), I hope to tackle them this week. I guess with the ruff and mypy integration I can pretty much reuse the CI config here with minor adaptions, or is there anything special to be considered if it's a (uv) package? |
This is not strictly necessary, but since we use
Something like |
def1dfc
to
d156391
Compare
Ah nice, that's very handy. Added two GHA jobs that directly run ruff/mypy using uvx (inspired by the warnet repo where they do something similar: https://github.com/bitcoin-dev-project/warnet/blob/296e0ba28b071365872afa28036af298d5c750a8/.github/workflows/test.yml#L15). I kept it very simple for now, but of course happy to pick up suggestions w.r.t. version pinning, caching etc.
That worked and the tests succeeded, so I changed to required minimum version to 3.9. ✔️ They also did with Python 3.8 by the way, but I guess there is not much point in requiring a minimum version that's not supported anymore (according to https://endoflife.date/python). Added the secp256k1lab suggestions in branch https://github.com/theStack/secp256k1lab/tree/secp256k1lab-draft03 and updated the subtree integration in this PR accordingly. #77 is still unadressed, will look into that within the next days. |
d156391
to
fccddee
Compare
Another push, based on https://github.com/theStack/secp256k1lab/tree/secp256k1lab-draft04, where #77 has been adressed (see also discussion in #79). The last two commits here can be squashed if we want to avoid situations where intermediate commits don't pass the tests. I think we are quite close, once regarding code/CI there's no outstanding comments anymore, what's left to do in the secp256k1lab repo is
|
Great! I didn't have a proper look but two quick nits:
|
I think this is good. Another good candidate for a test are the BIP340 test vectors (see https://github.com/bitcoin/bips/blob/master/bip-0340/reference.py#L147) but let's add this later then. |
git-subtree-dir: python/secp256k1lab git-subtree-split: bc0318e4110791062a6f2f270399b09b5b8ab29b
Co-authored-by: Sebastian Falbesoner <[email protected]>
fccddee
to
d39e0fa
Compare
Pushed again based on https://github.com/theStack/secp256k1lab/tree/secp256k1lab-draft05, with the COPYING file moved to the repo root and a rudimentary README.md (could use some vamping up for sure...).
Seems that this was done already in an earlier iteration (probably after your suggestion #83 (comment)). The "crypto@" address is still used in the author metadata of your commits though, happy to change those if you want to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog says 1.0 while pyproject.toml says 0.1. Otherwise, looks good to me.
This PR moves the secp256k1lab (formerly called secp256k1proto) folder to an external package (living at https://github.com/theStack/secp256k1lab currently, created with the uv package manager), integrating it as git-subtree here [1]:
Supersedes #81, using the suggested syspath extension approach [1] [2] [3] to avoid the ugly import hack that was used before.
[1] #81 (comment)
[2] #81 (comment)
[3] https://github.com/BlockstreamResearch/bip-frost-dkg/tree/syspath