Skip to content

Commit b9437ef

Browse files
committed
Introduce flag
Signed-off-by: Luis Mastrangelo <[email protected]>
1 parent b0c8b67 commit b9437ef

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

docs/configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Unless you need to set a non-default value, it is recommended to only populate o
8787
| `MIRROR_NODE_URL` | "" | The Mirror Node API endpoint. Official endpoints are Previewnet (https://previewnet.mirrornode.hedera.com), Testnet (https://testnet.mirrornode.hedera.com), Mainnet (https://mainnet-public.mirrornode.hedera.com). See [Mirror Node REST API](https://docs.hedera.com/hedera/sdks-and-apis/rest-api) |
8888
| `MIRROR_NODE_URL_HEADER_X_API_KEY` | "" | Authentication for a `MIRROR_NODE_URL` that requires authentication via the `x-api-key` header. |
8989
| `MULTI_SET` | "false" | Switch between different implementation of setting multiple K/V pairs in the shared cache. True is mSet, false is pipeline |
90+
| `OPCODELOGGER_ENABLED` | "true" | Whether the `opcodeLogger` tracer is enabled for a call to `debug_traceTransaction`. This setting should match the value `hiero.mirror.web3.opcode.tracer.enabled` in the Mirror Node used. See [HIP-801](https://hips.hedera.com/hip/hip-801) for more information. |
9091
| `JUMBO_TX_ENABLED` | "true" | Controls how large transactions are handled during `eth_sendRawTransaction`. When set to `true`, transactions up to 128KB can be sent directly to consensus nodes without using Hedera File Service (HFS), as long as contract bytecode doesn't exceed 24KB. When set to `false`, all transactions containing contract deployments use the traditional HFS approach. This feature leverages the increased transaction size limit to simplify processing of standard Ethereum transactions. |
9192
| `IP_RATE_LIMIT_STORE` | null | Specifies the rate limit store to use for IP-based rate limiting: valid values are "LRU", "REDIS", with the possibility to be extended with a custom implementation (see [Store Selection](rate-limiting.md#store-selection)). If unset, falls back to Redis when `REDIS_ENABLED=true`, otherwise uses in-memory LRU. |
9293
| `REDIS_ENABLED` | "true" | Enable usage of Redis as shared cache |

packages/config-service/src/services/globalConfig.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,12 @@ const _CONFIG = {
593593
required: true,
594594
defaultValue: null,
595595
},
596+
OPCODELOGGER_ENABLED: {
597+
envName: 'OPCODELOGGER_ENABLED',
598+
type: 'boolean',
599+
required: false,
600+
defaultValue: true,
601+
},
596602
OPERATOR_ID_ETH_SENDRAWTRANSACTION: {
597603
envName: 'OPERATOR_ID_ETH_SENDRAWTRANSACTION',
598604
type: 'string',

packages/relay/src/lib/debug.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ export class DebugImpl implements Debug {
133133
if (tracer === TracerType.CallTracer) {
134134
return await this.callTracer(transactionIdOrHash, tracerConfig as ICallTracerConfig, requestDetails);
135135
}
136+
137+
if (!ConfigService.get('OPCODELOGGER_ENABLED')) {
138+
throw predefined.UNSUPPORTED_METHOD;
139+
}
136140
return await this.callOpcodeLogger(transactionIdOrHash, tracerConfig as IOpcodeLoggerConfig, requestDetails);
137141
} catch (e) {
138142
throw this.common.genericErrorHandler(e);

0 commit comments

Comments
 (0)