From c7302b4ece054878a777766fbc921bca5ed242ee Mon Sep 17 00:00:00 2001 From: Kim De Mey Date: Thu, 6 Jul 2023 18:06:44 +0200 Subject: [PATCH] Compile Fluffy tests and fluffy beacon LC tests together (#1633) This wins some time. Also, remove and move some of the compile time defines to the cfg files. --- fluffy/tests/all_fluffy_tests.nim | 3 ++- nimbus.nimble | 16 ++++++++-------- nimbus_verified_proxy/nim.cfg | 9 +++++++++ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/fluffy/tests/all_fluffy_tests.nim b/fluffy/tests/all_fluffy_tests.nim index d127cedb2..e67470a69 100644 --- a/fluffy/tests/all_fluffy_tests.nim +++ b/fluffy/tests/all_fluffy_tests.nim @@ -18,4 +18,5 @@ import ./test_beacon_chain_block_proof, ./test_beacon_chain_block_proof_capella, ./test_beacon_chain_historical_roots, - ./test_beacon_chain_historical_summaries + ./test_beacon_chain_historical_summaries, + ./beacon_light_client_tests/all_beacon_light_client_tests diff --git a/nimbus.nimble b/nimbus.nimble index 5dd2574d8..356ee3556 100644 --- a/nimbus.nimble +++ b/nimbus.nimble @@ -76,11 +76,11 @@ task fluffy, "Build fluffy": task fluffy_test, "Run fluffy tests": # Need the nimbus_db_backend in state network tests as we need a Hexary to # start from, even though it only uses the MemoryDb. - test "fluffy/tests/portal_spec_tests/mainnet", "all_fluffy_portal_spec_tests", "-d:chronicles_log_level=ERROR -d:chronosStrictException -d:nimbus_db_backend=sqlite -d:PREFER_BLST_SHA256=false" - # Running tests with a low `mergeBlockNumber` to make the tests faster. - # Using the real mainnet merge block number is not realistic for these tests. - test "fluffy/tests", "all_fluffy_tests", "-d:chronicles_log_level=ERROR -d:chronosStrictException -d:nimbus_db_backend=sqlite -d:PREFER_BLST_SHA256=false -d:mergeBlockNumber:38130" - test "fluffy/tests/beacon_light_client_tests", "all_beacon_light_client_tests", "-d:chronicles_log_level=ERROR -d:chronosStrictException -d:nimbus_db_backend=sqlite -d:PREFER_BLST_SHA256=false" + test "fluffy/tests/portal_spec_tests/mainnet", "all_fluffy_portal_spec_tests", "-d:chronicles_log_level=ERROR -d:nimbus_db_backend=sqlite" + # Seperate build for these tests as they are run with a low `mergeBlockNumber` + # to make the tests faster. Using the real mainnet merge block number is not + # realistic for these tests. + test "fluffy/tests", "all_fluffy_tests", "-d:chronicles_log_level=ERROR -d:nimbus_db_backend=sqlite -d:mergeBlockNumber:38130" task utp_test_app, "Build uTP test app": buildBinary "utp_test_app", "fluffy/tools/utp_testing/", "-d:chronicles_log_level=TRACE -d:chronosStrictException" @@ -89,12 +89,12 @@ task utp_test, "Run uTP integration tests": test "fluffy/tools/utp_testing", "utp_test", "-d:chronicles_log_level=ERROR -d:chronosStrictException" task fluffy_test_portal_testnet, "Build test_portal_testnet": - buildBinary "test_portal_testnet", "fluffy/scripts/", "-d:chronicles_log_level=DEBUG -d:chronosStrictException -d:unittest2DisableParamFiltering -d:PREFER_BLST_SHA256=false" + buildBinary "test_portal_testnet", "fluffy/scripts/", "-d:chronicles_log_level=DEBUG -d:unittest2DisableParamFiltering" ## Nimbus Verified Proxy tasks task nimbus_verified_proxy, "Build Nimbus verified proxy": - buildBinary "nimbus_verified_proxy", "nimbus_verified_proxy/", "-d:chronicles_log_level=TRACE -d:chronosStrictException -d:PREFER_BLST_SHA256=false -d:libp2p_pki_schemes=secp256k1" + buildBinary "nimbus_verified_proxy", "nimbus_verified_proxy/", "-d:chronicles_log_level=TRACE" task nimbus_verified_proxy_test, "Run Nimbus verified proxy tests": - test "nimbus_verified_proxy/tests", "test_proof_validation", "-d:chronicles_log_level=ERROR -d:chronosStrictException -d:nimbus_db_backend=sqlite -d:PREFER_BLST_SHA256=false" + test "nimbus_verified_proxy/tests", "test_proof_validation", "-d:chronicles_log_level=ERROR -d:nimbus_db_backend=sqlite" diff --git a/nimbus_verified_proxy/nim.cfg b/nimbus_verified_proxy/nim.cfg index 71ca301fb..a78b9b558 100644 --- a/nimbus_verified_proxy/nim.cfg +++ b/nimbus_verified_proxy/nim.cfg @@ -1,7 +1,16 @@ -d:"chronicles_runtime_filtering=on" -d:"chronicles_disable_thread_id" +@if release: + -d:"chronicles_line_numbers:0" +@end + -d:chronosStrictException +-d:PREFER_BLST_SHA256=false + +# Use only `secp256k1` public key cryptography as an identity in LibP2P. +-d:"libp2p_pki_schemes=secp256k1" + --styleCheck:usages --styleCheck:hint --hint[XDeclaredButNotUsed]:off