{"record":{"id":"bf125cfd575ee5bb","repo":"ethereum/go-ethereum","slug":"bench-elligatorswift-module-not-enabled-n","errorCode":null,"errorMessage":"./bench: ElligatorSwift module not enabled.\\n","messagePattern":"\\./bench: ElligatorSwift module not enabled\\.\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crypto/secp256k1/libsecp256k1/src/bench.c","lineNumber":229,"sourceCode":"        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\");\n        fprintf(stderr, \"Use ./configure --enable-module-ellswift.\\n\\n\");\n        return EXIT_FAILURE;\n    }\n#endif\n\n    /* ECDSA benchmark */\n    data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE);\n\n    for (i = 0; i < 32; i++) {\n        data.msg[i] = 1 + i;\n    }\n    for (i = 0; i < 32; i++) {\n        data.key[i] = 33 + i;\n    }\n    data.siglen = 72;\n    CHECK(secp256k1_ecdsa_sign(data.ctx, &sig, data.msg, data.key, NULL, NULL));\n    CHECK(secp256k1_ecdsa_signature_serialize_der(data.ctx, data.sig, &data.siglen, &sig));\n    CHECK(secp256k1_ec_pubkey_create(data.ctx, &pubkey, data.key));","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/ethereum/go-ethereum/blob/6bb0588ad8e7f922e4ad5580f51265a4097af08f/crypto/secp256k1/libsecp256k1/src/bench.c#L211-L247","documentation":"Compile-time guard for the ElligatorSwift module: without ENABLE_MODULE_ELLSWIFT, any bench argument mentioning 'ellswift', 'encode', 'decode', 'ellswift_keygen', or 'ellswift_ecdh' makes the tool print this message and exit. ElligatorSwift is used by BIP-324 v2 transport, so this module matters for P2P-encryption-related benchmarking.","triggerScenarios":"Running ./bench with any ellswift-related token on a libsecp256k1 build configured without --enable-module-ellswift. Geth's cgo build of the vendored library enables only the modules it uses, so a manual bench build lacking the flag will refuse these benchmarks.","commonSituations":"Benchmarking v2-transport crypto on a manually built vendored copy; stale bench scripts after upstream added ellswift benchmarks; minimal ./configure builds.","solutions":["Rebuild with ./configure --enable-module-ellswift","Remove ellswift/encode/decode tokens from the invocation","Mirror geth's own cgo flags (see crypto/secp256k1 build tags) when assembling the bench build"],"exampleFix":"# before\n./configure && make && ./src/bench ellswift   # -> module not enabled\n\n# after\n./configure --enable-module-ellswift && make && ./src/bench ellswift","handlingStrategy":"validation","validationCode":"#!/bin/sh\nif grep -q 'ENABLE_MODULE_ELLSWIFT' config.h 2>/dev/null; then\n  ./src/bench ellswift\nelse\n  echo \"ellswift module off; skipping\" >&2\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enable --enable-module-ellswift when benchmarking BIP-324/v2-transport crypto","Note the guard matches plain 'encode'/'decode' too — avoid those tokens unless the module is on","Keep the bench binary built from the same tree as the library being measured"],"tags":["secp256k1","benchmark","build-config","ellswift"],"backgroundTag":null,"analyzedSha":"6bb0588ad8e7f922e4ad5580f51265a4097af08f","analyzedAt":"2026-08-15T10:06:53.996Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}