-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Bump SCRIPT_VERIFY flags to 64 bit #32998
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
base: master
Are you sure you want to change the base?
Conversation
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/32998. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. 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. |
The "introduce script_verify_flags typename" commit is probably best reviewed with |
725dbeb
to
0c82b29
Compare
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
0c82b29
to
e193e9b
Compare
CI failure seems to be due to a bug in qt6 6.4:
The error output also seems to be cutting off the last letter of the filename ("concept" vs "concepts" here, and "stl_relops." vs "stl_relops.h" in the original bug report linked above). |
Although both failed CI job use Clang 20.1.7, the error can also be reproduced with GCC 13.3. |
agreed, build issue also on my end with gcc 13.3.0 |
Minified this is: # podman run -it ubuntu:noble
apt update && apt upgrade -y
apt install g++ qt6-base-dev qt6-tools-dev git
git clone https://github.com/bitcoin/bitcoin
cd bitcoin
git fetch origin pull/32998/head:32998
git checkout 32998
/usr/lib/qt6/libexec/moc -I/usr/include/c++/13 --output-dep-file -o test.moc /bitcoin/src/qt/intro.cpp
usr/include/c++/13/bits/cpp_type_traits.:69:1: error: Parse error at "std" |
Refactoring helps. |
I don't think you need the |
e193e9b
to
81a10f7
Compare
@hebasto how can we move past the GUI build failures here? https://github.com/bitcoin/bitcoin/actions/runs/16538448423/job/46776353144?pr=32998#step:6:3769. |
Sure!
Implemented in bitcoin-core/gui#881. |
…n module 3a03f07 qt: Avoid header circular dependency (Anthony Towns) 25884bd qt, refactor: Move `FreespaceChecker` class into its own module (Hennadii Stepanov) Pull request description: For some reason, the MOC compiler in older versions of Qt 6 fails to parse `qt/intro.cpp`, as noted in [this comment](#32998 (comment)). This PR proposes a move-only refactoring to simplify the source structure by eliminating the need for the inline `#include <qt/intro.moc>`, thereby effectively working around the issue. Required for #32998. ACKs for top commit: ajtowns: ACK 3a03f07 Tree-SHA512: 4a7261f04fff9bd8edd4dc2df619c90e06417e19da672dd688a917cd0b9a324a6db7185a47c48f0385713b5e6c45d2204bef58cbe6c77299386136ed5682bd8d
81a10f7
to
077797c
Compare
077797c
to
b96c1b9
Compare
Concept ACK. |
Moves FormatScriptFlags logic into GetScriptFlagNames which returns a vector of strings. For completeness, also has GetScriptFlagNames report on any bits that do not match a known script flag.
Previously the SCRIPT_VERIFY_* flags were specified as either uint32_t, unsigned int, or unsigned. This converts them to a common type alias in preparation for changing the underlying type.
`using script_verify_flags = uint32_t` allows implicit conversion to and from int, so replace it with a class to have the compiler ensure we use the correct type. Provide from_int and as_int to allow for explicit conversions when desired. Introduces the type `script_verify_flag_name` for the individual flag name enumeration.
Instead of having `SCRIPT_VERIFY_FOO = (1U << n)` just have it be `n` directly, and do the bit shifting when converting it to `script_verify_flags`.
b96c1b9
to
417437e
Compare
Rebased past header conflict with #33116 |
We currently use 21 of 32 possible bits for
SCRIPT_VERIFY_*
flags, with open PRs that may use 8 more (#29247, #31989, #32247, #32453). The mutinynet fork that has included many experimental soft fork features is already reusing bits here. Therefore, bump this to 64 bits.In order to make it easier to update this logic in future, this PR also introduces a dedicated type for the script flags, and disables implicit conversion between that type and the underlying integer type. To make verifying that this change doesn't cause flags to disappear, this PR also resurrects the changes from #28806 so that the script flags that are consensus enforced on each block can be queried via getdeploymentinfo.