Follow-ups to making all tables fully static#1042
Conversation
fd2a2a6 to
7e2eb52
Compare
| /* Recreate the ecmult{,_gen} tables using the right generator (as selected via EXHAUSTIVE_TEST_ORDER) */ | ||
| secp256k1_ecmult_gen_create_prec_table(&secp256k1_ecmult_gen_prec_table[0][0], &secp256k1_ge_const_g, ECMULT_GEN_PREC_BITS); | ||
| secp256k1_ecmult_compute_two_tables(secp256k1_pre_g, secp256k1_pre_g_128, WINDOW_G, &secp256k1_ge_const_g); | ||
|
|
There was a problem hiding this comment.
Just for curiosity: I haven't read the tests in detail now but is there a simple reason why the exhaustive tests worked with the wrong ecmult tables but not with the wrong ecmult_gen tables? The existence of known-output tests?
nit: no need to add a second newline here
There was a problem hiding this comment.
The existing ecmult tables (from #956) contain separate tables for the exhaustive test case. So they're not using wrong tables.
The problem is that this approach isn't really compatible with the separately-compiled .c file with tables, unless there is a separately-compiled module for (each) exhaustive test generator. So instead I'm modifying the code to use the same approach for ecmult as ecmult_gen does since #988.
|
I think so far it was in theory possible to use libsecp by just including the |
7e2eb52 to
e05da9e
Compare
|
@real-or-random Good to point that out, but I don't think it's really a concern. I think we should preserve (and improve) the ability to build without a complex build/config system around it, but whether that involves building one or two modules isn't the end of the world. If there is actual desire for that, it wouldn't be hard to make |
|
ACK e05da9e |
|
During reviewing of the current master branch, I've noticed that But I cannot see any scenario where those headers, i.e., FWIW, no issues are observed when compiling Bitcoin Core after removal of Did I miss something? |
I haven't checked, but maybe those will would be relevant when compiling the |
This PR implements a number of changes to follow up after merging #988:
precomputed_*.*precompute_*.*.*_compute_table.*.precomputed_*.cfiles, which are compiled only once as part of a newlibsecp256k1_precomputed.la, included where relevant. The correspondingprecomputed_*.hfile are normal source files.Retry of #1041.