-
Notifications
You must be signed in to change notification settings - Fork 269
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 vendored libsecp to 0.4.0 #652
Closed
tcharding
wants to merge
10
commits into
rust-bitcoin:master
from
tcharding:09-12-update-libsecp-0.4.0
Closed
Update vendored libsecp to 0.4.0 #652
tcharding
wants to merge
10
commits into
rust-bitcoin:master
from
tcharding:09-12-update-libsecp-0.4.0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream libsecp now has a CMakeLists.txt file. Many years ago we added some things to .gitignore which appear to be local developers committing the names of their own stray files, and now this is causing the revendoring script to lose track of vendored files.
This is just a bad test. It constructs a preallocated context object by starting from a non-preallocated context object, in a way that can't be done by users (since it directly constructs a `Secp256k1` struct) and a way that is very difficult to unwind, because you wind up with two pointers to the same underlying context object, one a "preallocated" one and one a normal one. If you then drop the preallocated one, it will call `secp256k1_context_destroy`, forcing you to manually deallocate the other one. If you drop the normally-allocated one, you need to mem::forget the preallocated one to avoid calling `secp256k1_context_destroy` twice. The whole thing is pretty fragile. There is another unit test, `test_raw_ctx`, which gets into the same situation but using the public API, and demonstrates a few ways to get out of it.
I'm not sure how these came to be committed, but they shouldn't be. Running the vendoring script results in them being deleted.
tcharding
force-pushed
the
09-12-update-libsecp-0.4.0
branch
from
September 12, 2023 14:25
0d12a44
to
577d722
Compare
Update the `util.h.patch` file in preparation for running the vendor script. Done by guess work.
tcharding
force-pushed
the
09-12-update-libsecp-0.4.0
branch
from
September 12, 2023 14:27
577d722
to
a653fa0
Compare
@apoelstra want to put me out of my misery please and tell me whats going on here? Running |
Nothing off the top of my head, sorry. |
No sweat, thanks for checking. |
tcharding
force-pushed
the
09-12-update-libsecp-0.4.0
branch
from
September 14, 2023 13:04
a653fa0
to
1c10948
Compare
Gee wiz, @Davidson-Souza already di this in #627, very unobservant of me. |
apoelstra
added a commit
that referenced
this pull request
Sep 30, 2023
80b2a8d Update vendored libsecp to v0.4.0 (Davidson Souza) d2285c9 ci: Remove MIPS* from CI (Davidson Souza) 0d58f50 ci: generalize grp in "illegal callback" test (Andrew Poelstra) acf9ac1 delete `test_manual_create_destroy` test (Andrew Poelstra) 04ce508 lib: fix bad unit test (Andrew Poelstra) e4cca90 gitignore: remove things that shouldn't be there (Andrew Poelstra) Pull request description: Replaces #645 and #652. Precedes #627. I'm basically using #652 but resolving the linking problems, My local CI is erring on windows cross-test, but I can compile without issue with `cargo build --target x86_64-pc-windows-gnu`. Some MIPS jobs failed before even installing cross, I think those aren't really related to this PR. Any ideas on what can be happening? ACKs for top commit: apoelstra: ACK 80b2a8d Tree-SHA512: 62c2e04348110e3995111fa666f10dcc403b963770d047361f9209cf45b45db8744a7eb6d9ee3278d18007412dab5131ac3e1dd3e3d704963c6a6f232d57199a
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This replaces #645 and includes patches from that PR as well as two additional patches to update to v0.4.0
FTR I always forget how to do this and just hack my way around, what I did was:
Question please: is there a way to do (3) using git?