-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update rust-secp-zkp to latest upstream and latest rust-secp #46
Update rust-secp-zkp to latest upstream and latest rust-secp #46
Conversation
3dda438
to
eb1fc06
Compare
Now that we have a rust-secp release, I have attempted to take update upstream. However, I am facing errors in WASM build like
See also the CI failure here: https://github.com/ElementsProject/rust-secp256k1-zkp/runs/5543678672?check_suite_focus=true This issue is not faced by upstream rust-secp256k1. I tried a bit to find the differences and to make it work, but at this point I am trying random things basically to make things work. So, it's probably better for someone who knows this to pick this up. Any inputs on trying to fix this appreciated @thomaseizinger, @apoelstra ? |
It seems our hack of reusing the same context is haunting us down now :D From thinking about how things work, my analysis would be:
We should be able to work around this by including a patch in this repository, that removes the offending global symbol from the |
Hmm, that might have been a too quick analysis. I just realized that the error points to the same I am not very proficient in C but shouldn't this header have an |
I tried that but still failed. The interesting thing is that duplicate symbols all point to things that are upstream. And the upstream CI does not fail 😕 🤷 |
Another theory: We fail at link time right? Do we test that we can actually link I did some more digging and the CI for that upstream PR "passed" but it is actually broken: https://github.com/rust-bitcoin/rust-secp256k1/runs/5470259221?check_suite_focus=true#step:5:518 I am almost certain that if that script would actually run, the linking would also fail there. |
I know people feel strongly about not "vendor-locking" into GitHub actions and thus packing all the testing into Personally, I would buy into the GitHub actions ecosystem, using matrix etc to their full advantage and "simply" try to organise all testing such that |
+1. It's really sad that the list slipped past in 0.5.0 upstream release. I don't have any experience with HG actions apart from copying some templates and making them work, but if it is as simple as Speaking of WASM here issue, are you and @apoelstra okay with disabling it in CI so that we can progress on Musig2 PRs like (#29) ? We can re-enable it once upstream has some solution for it. |
12c77d2
to
c1efef9
Compare
I am okay with disabling it for now, we are not relying on the wasm build to work! In regards to GH actions, I may find time to draft something up to show what it would look like. There are also docker-based solutions for running GitHub workflows locally. |
Marked this as ready for review, and opened an issue to keep track fo WASM issue #47 |
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.
LGTM overall.
Should we move the "Comment out Wasm build on CI" commit before we bump the secp256k1
version so that every commit builds on CI? Also, is the patch of the header file necessary for the upgrade? If yes then I think we might want to squash these changes so that the commits are still atomic.
The upstream impl_array_newtype now implements a core::hash::Hash. This caused a breaking changed here :( despite it being a minor release.
See also the changed patch: secp256k1.h.patch
1) SECP256k1_BUILD is already set, so setting to Some("") avoids the duplicate warning 2) Misc rust unused warnings in various feature flag combinations
c1efef9
to
c61a982
Compare
Agreed on all counts. The patch was in separate commit to highlight the changes.
|
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.
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.
utACK c61a982
Reviewed all the code (and redid the all the automated steps). I think we're good to go here.
@apoelstra , @thomaseizinger can any of you merge this? |
Yep, I will |
Merged. Should I publish the new versions of secp-zkp and secp-zkp-sys? |
@apoelstra Yes, please. That would be helpful, the latest published version does not even build... |
Ok, done. |
The upstream impl_array_newtype now implements a core::Hash. This
caused a breaking changed here :( despite it being a minor release.