Skip to content
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

Vendor Bitcoin Core v22.1 #83

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Jan 14, 2024

Run the vendoring script:

./contrib/vendor-bitcoin-core.sh v22.1

(Please note, the branch name is incorrect, .1 not .0)

@tcharding
Copy link
Member Author

tcharding commented Jan 14, 2024

CI fail is: cargo:warning=depend/bitcoin/src/pubkey.h:16:20: fatal error: optional: No such file or directory. I don't know what is going on here, I did notice that

  • The optioal header is used in the last release without an issue in various other files
  • The pubkey.h file changes to use #include <optional> in Core 22.1

EDIT: I had previously written #include <optional.h> which is wrong (yes I am not a C++ developer :)

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 10ea770

@apoelstra
Copy link
Member

Maybe we should try patching out that #include?

I suspect the s390x compiler is just broken/outdated in some subtle way.

@tcharding
Copy link
Member Author

It seems unusual that this error just showed up, the optional header is used all over the place and the s390x build has always worked?

@apoelstra
Copy link
Member

Yes, but if the explicit #include is new then maybe we are tripping over some weird path misconfiguration or something.

I think we should start by just removing the line and seeing if CI will pass. (This will break my local CI, but that's fine, we're just trying to experiment.)

@tcharding
Copy link
Member Author

I didn't really get where you were coming from with removing the include line, I did it anyways and the C++ code does not build because that include is needed. Am I misunderstanding your suggestion?

@apoelstra
Copy link
Member

Sometimes #includes aren't necessary (because the relevant files are transitively included somewhere else).

But ok, what if you change it from optional.h to just #include <optional>?

(I'm just guessing random stuff here, feel free to ignore me if it doesn't make sense.)

@tcharding
Copy link
Member Author

I was wrong it never was, or is anywhere else in the depend/ directory, optional.h. Any other ideas, I'm happy to try them out.

@apoelstra
Copy link
Member

optional.h is part of the STL since C++17.

But normally you include it as #include <optional> which does some different path resolution and something to do with namespaces or whatever. If you use optional.h this is the "C way" of doing it which you're Not Supposed To Do, presumably because it's too transparent or efficient.

@tcharding
Copy link
Member Author

Yesterday I checked we were using C++ 17, I tried using experimental/optional, and I tried using/removing optional.h in various places. One anomaly I noticed was that there was a 5 in the path of an error I got /some/path/C++/5? But that doesn't explain why this failure shows up with the upgrade of the vendored code, optional (and optional.h) is used in a bunch of places in the current Core version?

@apoelstra
Copy link
Member

apoelstra commented Jan 18, 2024

So, because this is a build failure on a particular CI box and not a test failure, and because we have scripts that confirm we're vendoring the code correctly, maybe let's see if v23 works, and if so, we'll merge/release this and just add a warning in the CHANGELOG that we weren't able to test it on s390. And then move on to v23 and forget about it.

@tcharding
Copy link
Member Author

Nice plan! I'm on it.

@tcharding tcharding force-pushed the 01-15-vendor-core-22.0 branch 2 times, most recently from 7aba210 to 434a221 Compare January 22, 2024 00:01
The cross test job fails to build Bitcoin Core v22.1 (and v23). For now
just skip the job by commenting it out.
Run the vendoring script:

   `./contrib/vendor-bitcoin-core.sh v22.1`
@tcharding tcharding force-pushed the 01-15-vendor-core-22.0 branch from 434a221 to 0050787 Compare January 22, 2024 02:40
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 0050787

@apoelstra apoelstra merged commit b22c93f into rust-bitcoin:master Jan 22, 2024
5 checks passed
@tcharding tcharding deleted the 01-15-vendor-core-22.0 branch January 22, 2024 23:27
@apoelstra apoelstra mentioned this pull request Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants