Quoting myself from #1543 (comment):
I believe we want to build libsecp256k1 with the default
RelWithDebInfo
(-O2 -g
in our case) even when we build it as part of Core. Because (almost) all our testing uses this config.
But now that this has led @hebasto to make or suggest a few changes (https://github.com/hebasto/bitcoin/pull/192#issuecomment-2184085876, #1547), I’m not confident enough, and I think we should discuss what our desired policy is.
To put that in perspective, Core now builds with --with-ecmult-gen-kb=86
as @sipa suggested, but almost all of our testing/CI uses the default value of 22.
If we come to the conclusion that most of our testing should align with what Core uses, then the difference of 86 vs 22 (as some kind of algorithmic change) is probably much more likely to cause trouble than some -g
compiler flag. (On the other hand, stuff like -O3
vs -O2
could make a real difference again.)
cc @fanquake
Independently of that discussion, it would be awesome to have the ability to set something like “–with-ecmult-gen-kb=random” for CI. But this requires someone to implement it. :)