{"record":{"id":"95e3cc79e6929658","repo":"ethereum/go-ethereum","slug":"bench-public-key-recovery-module-not-enabled-n","errorCode":null,"errorMessage":"./bench: Public key recovery module not enabled.\\n","messagePattern":"\\./bench: Public key recovery module not enabled\\.\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crypto/secp256k1/libsecp256k1/src/bench.c","lineNumber":211,"sourceCode":"        } else if (invalid_args) {\n            fprintf(stderr, \"./bench: unrecognized argument.\\n\\n\");\n            help(default_iters);\n            return EXIT_FAILURE;\n        }\n    }\n\n/* Check if the user tries to benchmark optional module without building it */\n#ifndef ENABLE_MODULE_ECDH\n    if (have_flag(argc, argv, \"ecdh\")) {\n        fprintf(stderr, \"./bench: ECDH module not enabled.\\n\");\n        fprintf(stderr, \"Use ./configure --enable-module-ecdh.\\n\\n\");\n        return EXIT_FAILURE;\n    }\n#endif\n\n#ifndef ENABLE_MODULE_RECOVERY\n    if (have_flag(argc, argv, \"recover\") || have_flag(argc, argv, \"ecdsa_recover\")) {\n        fprintf(stderr, \"./bench: Public key recovery module not enabled.\\n\");\n        fprintf(stderr, \"Use ./configure --enable-module-recovery.\\n\\n\");\n        return EXIT_FAILURE;\n    }\n#endif\n\n#ifndef ENABLE_MODULE_SCHNORRSIG\n    if (have_flag(argc, argv, \"schnorrsig\") || have_flag(argc, argv, \"schnorrsig_sign\") || have_flag(argc, argv, \"schnorrsig_verify\")) {\n        fprintf(stderr, \"./bench: Schnorr signatures module not enabled.\\n\");\n        fprintf(stderr, \"Use ./configure --enable-module-schnorrsig.\\n\\n\");\n        return EXIT_FAILURE;\n    }\n#endif\n\n#ifndef ENABLE_MODULE_ELLSWIFT\n    if (have_flag(argc, argv, \"ellswift\") || have_flag(argc, argv, \"ellswift_encode\") || have_flag(argc, argv, \"ellswift_decode\") ||\n        have_flag(argc, argv, \"encode\") || have_flag(argc, argv, \"decode\") || have_flag(argc, argv, \"ellswift_keygen\") ||\n        have_flag(argc, argv, \"ellswift_ecdh\")) {\n        fprintf(stderr, \"./bench: ElligatorSwift module not enabled.\\n\");","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/ethereum/go-ethereum/blob/6bb0588ad8e7f922e4ad5580f51265a4097af08f/crypto/secp256k1/libsecp256k1/src/bench.c#L193-L229","documentation":"Same compile-time module guard as the ECDH one, but for public-key recovery: if ENABLE_MODULE_RECOVERY is not defined and you pass 'recover' or 'ecdsa_recover' to ./bench, the tool prints this message and exits. Recovery is optional because it pulls in extra code paths, so builds that skip it must fail fast when asked to benchmark it.","triggerScenarios":"Running './bench recover' or './bench ecdsa_recover' against a libsecp256k1 build configured without --enable-module-recovery. Note geth's production cgo build of the vendored libsecp256k1 does enable recovery (secp256k1.go needs it), but a hand-rolled ./configure without the flag will not.","commonSituations":"Building the vendored library manually with plain './configure' (modules off by default); CI benchmark images built from minimal configure lines; version updates where recovery stopped being default.","solutions":["Rebuild with ./configure --enable-module-recovery","Compare with the flags geth itself uses in crypto/secp256k1/schnorr/* and build/cgo configuration to keep the bench build equivalent","Remove the 'recover'/'ecdsa_recover' tokens from the invocation if you don't need that benchmark"],"exampleFix":"# before\n./configure && make && ./src/bench recover   # -> module not enabled\n\n# after\n./configure --enable-module-recovery && make && ./src/bench recover","handlingStrategy":"validation","validationCode":"#!/bin/sh\nif grep -q 'ENABLE_MODULE_RECOVERY' config.h 2>/dev/null; then\n  ./src/bench recover\nelse\n  echo \"recovery module off; skipping\" >&2\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build bench from the same configure invocation as the library under test","When building geth's vendored lib manually, mirror the --enable-module-recovery flag geth uses in production","Automate the config.h check in benchmark harness scripts"],"tags":["secp256k1","benchmark","build-config","recovery"],"backgroundTag":null,"analyzedSha":"6bb0588ad8e7f922e4ad5580f51265a4097af08f","analyzedAt":"2026-08-15T10:06:53.996Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}