-
Notifications
You must be signed in to change notification settings - Fork 993
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
Defork croaring #3596
Defork croaring #3596
Conversation
Hmm, Windows can't find
I noticed name = "clang-sys"
- version = "0.28.1"
+ version = "1.1.1" I'll look into this later. |
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.
Triggered another build. Also regarding the clang issue maybe worth adding
env:
LIBCLANG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/lib
LLVM_CONFIG_PATH: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }}/bin/llvm-config
in Github actions for test and release.
@@ -2,7 +2,10 @@ steps: | |||
- script: 'cargo test --all' | |||
displayName: Cargo Test All | |||
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' )) | |||
- script: 'cargo build --release' | |||
- script: | | |||
cargo clean |
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.
Why cargo clean
?
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.
The env variable changes the croaring build configuration in a way that cargo isn't smart enough to pick up. This particular script might work without it, but the cargo test
right above makes me nervous, and when the script or build behavior changes in the future, this adds a little bit of safety.
Of course, happy to remove it or implement a different solution if you prefer!
Thanks! I got GHA to work: https://github.com/trevyn/grin/runs/2138862178 - run: choco install -y llvm
- run: refreshenv && cargo test --all
env:
LIBCLANG_PATH: C:\Program Files\LLVM\lib
LLVM_CONFIG_PATH: C:\Program Files\LLVM\bin\llvm-config I'll push a commit in a moment and see if it works on Azure too. And a PR against upstream, they disabled their Windows CI build instead😂 |
is croaring used for the bitmap mmr? what's the likelihood of this causing a possible consensus change? |
My newbie analysis (please educate if any of this is off-base for the question): Assuming we're not newly triggering any LLVM/clang codegen bugs, the only functional effect of this change should be to bump These changes in If there is any concern that consensus change could be caused by bumping If anyone can think of any tests that would help confirm the validity of the change, I'd also be happy to take a whack at trying to write them. |
I found this in the clang docs: https://clang.llvm.org/docs/UsersManual.html#x86
More background, apparently this is a new thing: https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level/ So |
x86-64-v2 is a newer variant, so make sure in the tests that the runners support it.
oh haha, I was just trying to make people confirm it is fine from the consensus point of view - I think we should get into practice of questioning such things even for updates like this one. I'm honestly not qualified enough to answer the question which is why I asked and I'm sorry if this made you dive too deep. It was no my intention, but nevertheless, thanks for doing it! |
@quentinlesceller would be great if you could make a pass when you find the time so we get this in 👍 I'd also suggest we consider archiving the croaring fork in the mimblewimble organization after we confirm everything works well in the release containing these changes |
Testing this locally. |
We use it internally for storage and but we don't use it as part of the hashing implementation. This is how we "write" the bytes as part of the hashing impl - grin/chain/src/txhashset/bitmap_accumulator.rs Lines 234 to 238 in 302c8ec
|
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.
Looking good 👍 LGTM !
We are seeing some cases of "Illegal Instruction" for |
Is it possible the scripts are not correctly setting env vars? It looks like the recommended way is to do something along the lines of -
Rather than what we are doing within the
There is also the option to use I'm not actually sure what the implementation is for a simple |
Replace mimblewimble/croaring-rs /
croaring-mw
fork with upstream while ensuring no new AVX/AVX2 instructions are added in release builds.Bumps the effective version of
croaring-rs
from 0.4.4 to 0.4.6. (details)Unblocks:
Motivation: We want to update
croaring-rs
to unblock the above issues, and at the same time, the upstream merge of RoaringBitmap/croaring-rs#62 makes our fork unnecessary. See comments in #3545 for comments on why we originally forked.Verification
cargo test --all
passes locally.Verification of no new AVX/AVX2 instructions, using Intel XED from http://www.intel.com/software/xed:
I'm not sure where these other AVX instructions are coming from if the existing release is tested to function as we expect. It's possible they're behind runtime checks.