-
Notifications
You must be signed in to change notification settings - Fork 1
Omnibus #4
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
Omnibus #4
Conversation
Thanks! Tested ACK 50ab8c2 |
This is good to merge, unless you want to delete the commented-out line. Not really relatedly, I am using this locally diff --git a/elements.nix b/elements.nix
index d5c1a58..7951f09 100644
--- a/elements.nix
+++ b/elements.nix
@@ -1,5 +1,5 @@
args@
-{ stdenv, fetchFromGitHub ? null, pkg-config, autoreconfHook, db48, boost, zeromq
+{ stdenv, fetchFromGitHub ? null, fetchpatch, pkg-config, autoreconfHook, db48, boost, zeromq
, zlib, miniupnpc, qtbase ? null, qttools ? null, util-linux ? null, hexdump ? null, protobuf, python3, qrencode, libevent
, lcov ? null
, lib, writeText
@@ -33,7 +33,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-UNjYkEZBjGuhkwBxSkNXjBBcLQqoan/afCLhoR2lOY4=";
};
- patches = [ ./elements-lcov.patch ];
+ patches = [
+ ./elements-lcov.patch
+ (fetchpatch "https://github.com/bitcoin/bitcoin/commit/398768769f85cc1b6ff212ed931646b59fa1acd6.patch")
+ (fetchpatch "https://github.com/bitcoin/bitcoin/commit/af862661654966d5de614755ab9bd1b5913e0959.patch")
+ ];
postPatch = optionals (doCheck)
'' which pulls in the two patches from Bitcoin that are needed for Elements master to build. Doing this in elements.nix is much easier than keeping track of these patches and cherry-picking them onto every single branch. I guess, to do this properly we should hide these behind some boolean flag, since they might not apply to all branches. |
boost175 is no longer in nixpkgs, and elements seems to currently build without it. We can readd a copy of boost175 later if we end up with branches of elements that we want to compile that need it.
Remove boost and /nix/store stuff from the coverage report. I think there is a better way of fixing the boost stuf using geninfo_adjust_src_path, but I couldn't get it to work.
2d533d2
to
9cd4a8d
Compare
I've added your fetchpatch stuff to this PR. |
@roconnor-blockstream can you add a boolean flag to allow disabling these patches? When I run this with a branch that already has them, it detects that the patch is already applied but then fails. (And my local branches still need the patches, annoyingly, so that I can develop interactively in a nix-shell using the actual git repo as source. If I run |
9cd4a8d
to
d1fa204
Compare
Done. |
Also, on line https://github.com/roconnor-blockstream/elements-nix/blob/main/elements.nix#L57 we set
For fast fuzzing (i.e. trying to get high coverage without trying to fail quickly) we want this to be
and then for running the seeds we really want
which matches what's in Elements CI. |
Maybe |
With |
Also would like a option to add the |
In postPatch we should use sed -i to replace It seems like something similar should be able to fix the issue with lcov thinking that include files are in |
A while back I spend quite a bit of time fiddling with clang's |
I have
When running |
I think so. I see this too, before and after this change, on Elements master. |
Should we drop the GCC13Patches from this PR? |
No, they're still needed for Elements 0.21. But we should turn them off by default I think. |
...we also need boost 1.75 for 0.21. It may just not be worth trying to support 0.21 anymore. I use in it my local CI but I can maintain local patches for that. |
Allow the withFuzz parmeter to take multiple values for controling the santizers options. Also allow a custom set of sanitizers to be passed in.
a76577a
to
8f55670
Compare
I'm willing to accept a PR for boost 1.75, but I'm not willing to construct it myself. |
I think we are good to merge if you are happy with 8f55670. |
Code looks great -- have not tried the fuzz stuff yet. Let me try the basic functionality with 0.21, 22 and 23 and then I'll ack. |
ACK 8f55670 Was able to build 3 different major versions of Elements with it. Played with the sanitizers a bit -- turned on asan but it was too slow to work with the rust-elements tests. But it did build and had an observable effect, which is pretty cool. |
Remove boost and /nix/store stuff from the coverage report.
I think there is a better way of fixing the boost stuf using
geninfo_adjust_src_path, but I couldn't get it to work.