Repository: hashgraph/hedera-local-node (ts)

Issue:
Deprecate `debug [timestamp]` command
### Problem

The local node had supported the `debug [timestamp]` command which returned the parsed record file for that timestamp. It used service's classes from the mono repo. After the modularization, the command stopped working due to changing/deleting the parser files.

### Solution

The command can be deprecated because all the data is available in the mirror node explorer. This will reduce the local-node's complexity and codebase, making it more lightweight.

### Alternatives

_No response_

Pull request:
feat: deprecate `debug [timestamp]` command
**Description**:
<!--
One or two line summary of what this PR does and why it is needed, followed by a list
of changes in imperative, present tense for use in the commit message or changelog. Example:

This PR modifies ... in order to support ...
* Add config property
* Change column name
* Remove ...
-->


The local node had supported the `debug [timestamp]` command which returned the parsed record file for that timestamp. It used service's classes from the mono repo. After the modularization, the command stopped working due to changing/deleting the parser files.

**Solution**:

The command can be deprecated because all the data is available in the mirror node explorer. This will reduce the local-node's complexity and codebase, making it more lightweight.



**Related issue(s)**:

Fixes #862 

**Notes for reviewer**:
<!-- Provide logs, performance numbers or screenshots of the new functionality -->

**Checklist**

- [ ] Documented (Code comments, README, etc.)
- [ ] Tested (unit, integration, etc.)


Patch:
diff --git a/.env b/.env
index f5e30f7..fac0ecf 100644
--- a/.env
+++ b/.env
@@ -16,7 +16,6 @@ PLATFORM_JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Xlog:gc*:gc.lo
 NETWORK_NODE_LOGS_ROOT_PATH=./network-logs/node
 APPLICATION_ROOT_PATH=./compose-network/network-node
 APPLICATION_CONFIG_PATH=./compose-network/network-node/data/config
-RECORD_PARSER_ROOT_PATH=./src/services/record-parser
 MIRROR_NODE_CONFIG_PATH=.
 
 #### Network Node Memory Limits ####
diff --git a/.github/workflows/flow-pull-request-checks.yaml b/.github/workflows/flow-pull-request-checks.yaml
index 49f824d..79df389 100644
--- a/.github/workflows/flow-pull-request-checks.yaml
+++ b/.github/workflows/flow-pull-request-checks.yaml
@@ -158,6 +158,6 @@ jobs:
 
       - name: Upload coverage report
         if: ${{ always() && !cancelled() }}
-        uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
+        uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5.0.2
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/README.md b/README.md
index 4ead81c..83a6439 100644
--- a/README.md
+++ b/README.md
@@ -121,7 +121,6 @@ Available commands:
             --balance to set starting hbar balance of the created accounts.
             --async to enable or disable asynchronous creation of accounts.
             --b or --blocklist to enable or disable account blocklisting. Depending on how many private keys are blocklisted, this will affect the generated on startup accounts.
-            --enable-debug to enable or disable debugging of the local node [boolean] [default: false]
             --network-tag to select custom network node tag [string] [defaults: predefined selected configuration]
             --mirror-tag to select custom mirror node tag [string] [defaults: predefined selected configuration]
             --relay-tag to select custom hedera-json-rpc relay tag [string] [defaults: predefined selected configuration]
@@ -133,9 +132,6 @@ Available commands:
             --h or --host to override the default host.
             --balance to set starting hbar balance of the created accounts.
             --async to enable or disable asynchronous creation of accounts.
-    debug [timestamp] - Parses and prints the contents of the record file that has been created
-                        during the selected timestamp.
-                        Important: Local node must be started with the -g, --enable-debug flag to enable this feature
 ```
 
 Note: Generated accounts are 3 types (ECDSA, Alias ECDSA and ED25519). All of them are usable via HederaSDK. Only Alias ECDSA accounts can be imported into wallet like Metamask or used in ethers.
diff --git a/compose-network/mirror-node/application.yml b/compose-network/mirror-node/application.yml
index bd9e30f..fc4d984 100644
--- a/compose-network/mirror-node/application.yml
+++ b/compose-network/mirror-node/application.yml
@@ -1,5 +1,26 @@
 hedera:
   mirror:
+    restJava:
+      db:
+        host: 127.0.0.1
+        name: mirror_node
+        password: mirror_rest_java_pass
+        port: 5432
+        sslMode: DISABLE
+        statementTimeout: 10000
+        username: mirror_rest_java
+      response:
+        headers:
+          defaults:
+            # Headers set by default unless overridden in specific request mapping paths defined below.
+            "Access-Control-Allow-Origin": "*"
+            "Cache-Control": "public, max-age=1"
+          path:
+            # Override inherited defaults and define additional headers for individual controller request mappings.
+            # "[]" around the path preserves special characters. Multiple header name/value pairs may be defined per path.
+            "[/api/v1/topics/{id}]":
+              "Cache-Control": "public, max-age=5"
+
     grpc:
       listener:
         type: SHARED_POLL
diff --git a/docker-compose-state-migration.yml b/docker-compose-state-migration.yml
index 233abc1..c635422 100644
--- a/docker-compose-state-migration.yml
+++ b/docker-compose-state-migration.yml
@@ -56,7 +56,6 @@ services:
       - "${APPLICATION_ROOT_PATH}/log4j2.xml:/opt/hgcapp/services-hedera/HapiApp2.0/log4j2.xml"
       - "${APPLICATION_ROOT_PATH}/hedera.crt:/opt/hgcapp/services-hedera/HapiApp2.0/hedera.crt"
       - "${APPLICATION_ROOT_PATH}/hedera.key:/opt/hgcapp/services-hedera/HapiApp2.0/hedera.key"
-      - "${RECORD_PARSER_ROOT_PATH}:/opt/hgcapp/recordParser"
 
   minio:
     image: minio/minio
diff --git a/docker-compose.multinode.yml b/docker-compose.multinode.yml
index 7994b8a..aaf9ef4 100644
--- a/docker-compose.multinode.yml
+++ b/docker-compose.multinode.yml
@@ -66,7 +66,6 @@ services:
       - "${APPLICATION_ROOT_PATH}/log4j2.xml:/opt/hgcapp/services-hedera/HapiApp2.0/log4j2.xml"
       - "${APPLICATION_ROOT_PATH}/hedera.crt:/opt/hgcapp/services-hedera/HapiApp2.0/hedera.crt"
       - "${APPLICATION_ROOT_PATH}/hedera.key:/opt/hgcapp/services-hedera/HapiApp2.0/hedera.key"
-      - "${RECORD_PARSER_ROOT_PATH}:/opt/hgcapp/recordParser"
 
   network-node-2:
     <<: *network-node-definition
diff --git a/docker-compose.yml b/docker-compose.yml
index 4e72e32..48fd748 100755
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -56,7 +56,6 @@ services:
       - "${APPLICATION_ROOT_PATH}/log4j2.xml:/opt/hgcapp/services-hedera/HapiApp2.0/log4j2.xml"
       - "${APPLICATION_ROOT_PATH}/hedera.crt:/opt/hgcapp/services-hedera/HapiApp2.0/hedera.crt"
       - "${APPLICATION_ROOT_PATH}/hedera.key:/opt/hgcapp/services-hedera/HapiApp2.0/hedera.key"
-      - "${RECORD_PARSER_ROOT_PATH}:/opt/hgcapp/recordParser"
 
   record-streams-uploader:
     image: "${UPLOADER_IMAGE_PREFIX}uploader-mirror:${UPLOADER_IMAGE_TAG}"
@@ -279,6 +278,29 @@ services:
     restart: unless-stopped
     tty: false
 
+  rest-java:
+    image: "${MIRROR_IMAGE_PREFIX}hedera-mirror-rest-java:${MIRROR_REST_IMAGE_TAG:-${MIRROR_IMAGE_TAG}}"
+    container_name: mirror-node-rest-java
+    mem_swappiness: 0
+    mem_limit: "${MIRROR_REST_MEM_LIMIT}"
+    memswap_limit: "${MIRROR_REST_MEM_LIMIT}"
+    depends_on:
+      importer:
+        condition: service_started
+      db:
+        condition: service_started
+    environment:
+      HEDERA_MIRROR_RESTJAVA_DB_HOST: db
+      SPRING_CONFIG_ADDITIONAL_LOCATION: file:/usr/etc/hedera-mirror-rest-java/
+    networks:
+      - mirror-node
+    ports:
+      - 8084:8084
+    restart: unless-stopped
+    tty: true
+    volumes:
+      - ./application.yml:/usr/etc/hedera-mirror-rest-java/application.yml
+
   explorer:
     container_name: hedera-explorer
     image: "${MIRROR_NODE_EXPLORER_IMAGE_PREFIX}hedera-mirror-node-explorer:${MIRROR_NODE_EXPLORER_IMAGE_TAG}"
diff --git a/src/Errors/LocalNodeErrors.ts b/src/Errors/LocalNodeErrors.ts
index e88c651..ad2c746 100644
--- a/src/Errors/LocalNodeErrors.ts
+++ b/src/Errors/LocalNodeErrors.ts
@@ -72,22 +72,4 @@ export const Errors = {
      * @returns {LocalNodeErrors} The client error.
      */
     CLEINT_ERROR: (msg?: string) => new LocalNodeErrors("Client Error", `Something went wrong, while trying to create SDK Client${msg ? `: ${msg}` : ``}`),
-    
-    /**
-     * Create a no record file found error.
-     * @returns {LocalNodeErrors} The no record file found error.
-     */
-    NO_RECORD_FILE_FOUND_ERROR: () => new LocalNodeErrors('No record file found Error', "This record file doesn't not exist, check if timestamp is correct and local-node was started in debug mode using --enable-debug option"),
-    
-    /**
-     * Create an invalid timestamp error.
-     * @returns {LocalNodeErrors} The invalid timestamp error.
-     */
-    INVALID_TIMESTAMP_ERROR: () => new LocalNodeErrors('Invalid Timestamp Error', 'Invalid timestamp string. Accepted formats are: 0000000000.000000000 and 0000000000-000000000'),
-    
-    /**
-     * Create a debug mode check error.
-     * @returns {LocalNodeErrors} The debug mode check error.
-     */
-    DEBUG_MODE_CHECK_ERROR: () => new LocalNodeErrors('Debug Mode check Error', 'Debug mode is not enabled to use this command. Please use the --enable-debug flag to enable it.'),
 }
diff --git a/src/constants.ts b/src/constants.ts
index ba7bc38..beb1365 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -50,9 +50,6 @@ export const UNKNOWN_VERSION = "Unknown";
 export const NECESSARY_PORTS = [5551, 8545, 5600, 5433, 50211, 8082, 6379];
 export const OPTIONAL_PORTS = [7546, 8080, 3000];
 export const EVM_ADDRESSES_BLOCKLIST_FILE_RELATIVE_PATH = '../../compose-network/network-node'
-export const RELATIVE_TMP_DIR_PATH = 'services/record-parser/temp';
-export const RELATIVE_RECORDS_DIR_PATH = 'network-logs/node/recordStreams/record0.0.3';
-export const RECORD_PARSER_SOURCE_REL_PATH = '../../src/services/record-parser';
 export const NETWORK_NODE_CONFIG_DIR_PATH = 'compose-network/network-node/data/config';
 export const APPLICATION_YML_RELATIVE_PATH = 'compose-network/mirror-node/application.yml';
 export const MIN_MEMORY_SINGLE_MODE = 4;
@@ -127,10 +124,6 @@ export const INIT_STATE_MIRROR_PROP_SET = `${CHECK_SUCCESS} Needed mirror node p
 export const INIT_STATE_NO_NODE_CONF_NEEDED = `${CHECK_SUCCESS} No additional node configuration needed.`;
 export const INIT_STATE_NO_ENV_VAR_CONFIGURED = `${CHECK_SUCCESS} No new environment variables were configured.`;
 
-// Debug state
-export const DEBUG_STATE_INIT_MESSAGE = `${CHECK_SUCCESS} Debug State Initialized!`;
-export const DEBUG_STATE_STARTING_MESSAGE = `${LOADING} Debug State Starting...`;
-
 // StateController
 export const STATE_CONTROLLER_MISSING_STATE_CONFIG_ERROR = `${CHECK_FAIL} Something is wrong with state configuration!`;
 
diff --git a/src/data/StateData.ts b/src/data/StateData.ts
index 0933e9b..47afb4b 100644
--- a/src/data/StateData.ts
+++ b/src/data/StateData.ts
@@ -26,7 +26,6 @@ import { NetworkPrepState } from '../state/NetworkPrepState';
 import { StartState } from '../state/StartState';
 import { StopState } from '../state/StopState';
 import { StateConfiguration } from '../types/StateConfiguration';
-import { DebugState } from '../state/DebugState';
 import { ResourceCreationState } from '../state/ResourceCreationState';
 
 /**
@@ -51,8 +50,6 @@ export class StateData {
                 return this.getAccountCreationConfiguration();
             case 'resourceCreation':
                 return this.getResourceCreationConfiguration();
-            case 'debug':
-                return this.getDebugConfiguration();
             default:
                 return undefined;
         }
@@ -141,18 +138,4 @@ export class StateData {
             ]
         };
     }
-
-    /**
-     * Get the configuration for the debug state.
-     * @returns {StateConfiguration} The configuration for the debug state.
-     * @private
-     */
-    private getDebugConfiguration(): StateConfiguration {
-        return {
-            'stateMachineName' : 'debug',
-            'states' : [
-                new DebugState()
-            ]
-        };
-    }
 }
diff --git a/src/index.ts b/src/index.ts
index 7bed92c..361fcda 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -63,14 +63,6 @@ yargs(hideBin(process.argv))
         },
         async () => await new StateController("accountCreation").startStateMachine()
     )
-    .command(
-        "debug [timestamp]",
-        "Parses and prints the contents of the record file that has been created during the selected timestamp.",
-        (yargs: yargs.Argv<{}>) => {
-            CLIService.loadDebugOptions(yargs);
-        },
-        async () => await new StateController("debug").startStateMachine()
-    )
     .middleware(Bootstrapper.initialize)
     .demandCommand()
     .strictCommands()
diff --git a/src/services/CLIService.ts b/src/services/CLIService.ts
index 1fbd7e4..f463f62 100644
--- a/src/services/CLIService.ts
+++ b/src/services/CLIService.ts
@@ -83,22 +83,12 @@ export class CLIService implements IService{
         CLIService.userComposeOption(yargs);
         CLIService.userComposeDirOption(yargs);
         CLIService.blocklistingOption(yargs);
-        CLIService.enableDebugOption(yargs);
         CLIService.selectNetworkTag(yargs);
         CLIService.selectMirrorTag(yargs);
         CLIService.selectRelayTag(yargs);
         CLIService.createInitialResources(yargs);
     }
 
-    /**
-     * Loads debug options for the CLI service.
-     * @param {yargs.Argv<{}>} yargs - The yargs instance.
-     */
-    public static loadDebugOptions(yargs: Argv<{}>): void {
-        CLIService.loadCommonOptions(yargs)
-        CLIService.timestampOption(yargs);
-    }
-
     /**
      * Loads the account options for the CLI.
      * @param {yargs.Argv<{}>} yargs - The yargs instance.
@@ -149,8 +139,6 @@ export class CLIService implements IService{
         const blocklisting = argv.blocklist as boolean;
         const startup = argv.startup as boolean;
         const verbose = CLIService.resolveVerboseLevel(argv.verbose as string);
-        const timestamp = argv.timestamp as string;
-        const enableDebug = argv.enableDebug as boolean;
         const networkTag = argv.networkTag as string;
         const mirrorTag = argv.mirrorTag as string;
         const relayTag = argv.relayTag as string;
@@ -171,8 +159,6 @@ export class CLIService implements IService{
             blocklisting,
             startup,
             verbose,
-            timestamp,
-            enableDebug,
             networkTag,
             mirrorTag,
             relayTag,
@@ -213,8 +199,6 @@ export class CLIService implements IService{
                 return false;
             case 'generate-accounts':
                 return false;
-            case 'debug':
-                return false;
             default:
                 return true;
         };
@@ -276,23 +260,6 @@ export class CLIService implements IService{
         });
     }
 
-    /**
-     * Adds the 'timestamp' option to the command line arguments.
-     * This option is a string that records the file timestamp.
-     * It is required.
-     * 
-     * @param {yargs.Argv<{}>} yargs - The yargs instance to which the option is added.
-     * @private
-     * @static
-     */
-    private static timestampOption(yargs: Argv<{}>): void {
-        yargs.option('timestamp', {
-            type: 'string',
-            describe: 'Record file timestamp',
-            demandOption: true
-        });
-    }
-
     /**
      * Adds the 'dev' option to the command line arguments.
      * This option is a boolean that enables or disables developer mode.
@@ -469,24 +436,6 @@ export class CLIService implements IService{
             default: 'info',
         })
     }
-    
-    /**
-     * Adds the 'enable-debug' option to the command line arguments.
-     * This option is a boolean that enables or disables debugging of the local node.
-     * It is not required and defaults to false.
-     * 
-     * @param {yargs.Argv<{}>} yargs - The yargs instance to which the option is added.
-     * @private
-     * @static
-     */
-    private static enableDebugOption(yargs: Argv<{}>): void {
-        yargs.option('enable-debug', {
-            type: 'boolean',
-            describe: 'Enable or disable debugging of the local node',
-            demandOption: false,
-            default: false
-        });
-    }
 
     /**
      * Adds the 'network-tag' option to the command line arguments.
diff --git a/src/services/record-parser/parse.sh b/src/services/record-parser/parse.sh
deleted file mode 100644
index b4a53f8..0000000
--- a/src/services/record-parser/parse.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-function join_by { local IFS="$1"; shift; echo "$*"; }
-
-cd /opt/hgcapp/recordParser
-
-classPaths=(
-  /opt/hgcapp/recordParser/out
-  /opt/hgcapp/services-hedera/HapiApp2.0/data/apps/HederaNode.jar
-)
-
-libDir=/opt/hgcapp/services-hedera/HapiApp2.0/data/lib/
-for file in "$libDir"*
-do
-  classPaths+=($file)
-done
-
-classPath=$(printf ":%s" "${classPaths[@]}")
-classPath=${classPath:1}
-
-BUILD=out/Parser.class
-if ! ( test -f "$BUILD" ) ; then
-  javac -classpath $classPath -d out src/Parser.java
-fi
-
-java -classpath $classPath Parser
\ No newline at end of file
diff --git a/src/services/record-parser/record-parser.iml b/src/services/record-parser/record-parser.iml
deleted file mode 100644
index 9cce14a..0000000
--- a/src/services/record-parser/record-parser.iml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module-library" exported="">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/HederaNode.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="library" name="com.hedera" level="project" />
-    <orderEntry type="module-library" exported="">
-      <library>
-        <CLASSES>
-          <root url="file://$MODULE_DIR$/lib" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-        <jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" />
-      </library>
-    </orderEntry>
-  </component>
-</module>
\ No newline at end of file
diff --git a/src/services/record-parser/src/META-INF/MANIFEST.MF b/src/services/record-parser/src/META-INF/MANIFEST.MF
deleted file mode 100644
index 37197ef..0000000
--- a/src/services/record-parser/src/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Main-Class: Main
-
diff --git a/src/services/record-parser/src/Parser.java b/src/services/record-parser/src/Parser.java
deleted file mode 100644
index 5866a00..0000000
--- a/src/services/record-parser/src/Parser.java
+++ /dev/null
@@ -1,12 +0,0 @@
-import static com.hedera.node.app.service.mono.utils.forensics.RecordParsers.parseV6RecordStreamEntriesIn;
-public class Parser {
-    public static void main(String[] args) {
-        try {
-            final var entries = parseV6RecordStreamEntriesIn("temp");
-            entries.stream().forEach(System.out::println);
-        }
-        catch(Exception e) {
-            System.out.println(e.toString());
-        }
-    }
-}
diff --git a/src/services/record-parser/temp/.gitignore b/src/services/record-parser/temp/.gitignore
deleted file mode 100644
index d6b7ef3..0000000
--- a/src/services/record-parser/temp/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/src/state/DebugState.ts b/src/state/DebugState.ts
deleted file mode 100644
index f6cb834..0000000
--- a/src/state/DebugState.ts
+++ /dev/null
@@ -1,215 +0,0 @@
-/*-
- *
- * Hedera Local Node
- *
- * Copyright (C) 2023-2024 Hedera Hashgraph, LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import { resolve } from 'path';
-import { readdirSync, copyFileSync, unlinkSync } from 'fs';
-import shell from 'shelljs';
-import { IOBserver } from '../controller/IObserver';
-import { LoggerService } from '../services/LoggerService';
-import { ServiceLocator } from '../services/ServiceLocator';
-import { IState } from './IState';
-import { CLIService } from '../services/CLIService';
-import { Errors } from '../Errors/LocalNodeErrors';
-import { DEBUG_STATE_INIT_MESSAGE, DEBUG_STATE_STARTING_MESSAGE, RELATIVE_RECORDS_DIR_PATH, RELATIVE_TMP_DIR_PATH } from '../constants';
-
-/**
- * Represents the debug state of the Hedera Local Node.
- * @implements {IState}
- * @property {LoggerService} logger - The logger service.
- * @property {string} stateName - The name of the state.
- * @property {string} recordExt - The file extension for the record file. This is a static property.
- * @property {string} sigExt - The file extension for the signature file. This is a static property.
- */
-export class DebugState implements IState{
-    private logger: LoggerService;
-    
-    private stateName: string;
-
-    private static readonly recordExt = `.${process.env.STREAM_EXTENSION}`;
-    private static readonly sigExt = `.${process.env.STREAM_SIG_EXTENSION}`;
-    
-    constructor() {
-        this.stateName = DebugState.name;
-        this.logger = ServiceLocator.Current.get<LoggerService>(LoggerService.name);
-        this.logger.trace(DEBUG_STATE_INIT_MESSAGE, this.stateName);
-    }
-
-    public subscribe(observer: IOBserver): void {
-    }
-
-    /**
-     * Starts the DebugState.
-     * 
-     * This method performs the following steps:
-     * 1. Retrieves the current timestamp from the command line arguments.
-     * 2. Validates the timestamp.
-     * 3. Resolves the paths for the temporary directory and the record files directory.
-     * 4. Finds and copies the record file to the temporary directory based on the timestamp.
-     * 5. Executes a shell command to parse the record file using a Docker container.
-     * 
-     * @public
-     * @async
-     * @returns {Promise<void>} A Promise that resolves when the DebugState has started and the record file has been parsed.
-     */
-    public async onStart(): Promise<void> {
-        try {
-            const { timestamp, workDir } = ServiceLocator.Current.get<CLIService>(CLIService.name).getCurrentArgv();
-            // DebugState.checkForDebugMode();
-            this.logger.trace(DEBUG_STATE_STARTING_MESSAGE, this.stateName);
-            const jsTimestampNum = DebugState.getAndValidateTimestamp(timestamp);
-
-            const tempDir = resolve(workDir, RELATIVE_TMP_DIR_PATH);
-            const recordFilesDirPath = resolve(workDir, RELATIVE_RECORDS_DIR_PATH);
-            this.findAndCopyRecordFileToTmpDir(jsTimestampNum, recordFilesDirPath, tempDir);
-            // Perform the parsing
-            await shell.exec(
-                'docker exec network-node bash /opt/hgcapp/recordParser/parse.sh'
-            );
-      
-            DebugState.cleanTempDir(tempDir);
-        } catch (error: any) {
-            this.logger.error(error.message);
-            return
-        }
-    }
-
-    /**
-     * Cleans the temporary directory.
-     * 
-     * This method iterates over all the files in the specified directory and deletes them, except for the '.gitignore' file.
-     * 
-     * @static
-     * @param {string} dirPath - The path to the directory to clean.
-     */
-    private static cleanTempDir(dirPath: string): void {
-        for (const tempFile of readdirSync(dirPath)) {
-            if (tempFile !== '.gitignore') {
-              unlinkSync(resolve(dirPath, tempFile));
-            }
-        }
-    }
-
-    /**
-     * Gets and validates the timestamp.
-     * 
-     * This method checks if the provided timestamp matches the expected format. If it does, it parses the timestamp into a number and returns it.
-     * 
-     * @static
-     * @param {string} timestamp - The timestamp to validate.
-     * @returns {number} The parsed timestamp.
-     * @throws {Error} Throws an error if the timestamp does not match the expected format.
-     */
-    private static getAndValidateTimestamp(timestamp: string): number {
-        const timestampRegEx = /^\d{10}[.-]\d{9}$/;
-        if (!timestampRegEx.test(timestamp)) {          
-          throw Errors.INVALID_TIMESTAMP_ERROR();
-        }
-    
-        // Parse the timestamp to a record file filename
-        let jsTimestamp = timestamp
-          .replace('.', '')
-          .replace('-', '')
-          .substring(0, 13);
-        return parseInt(jsTimestamp);
-    }
-
-    /**
-     * Finds and copies the record file to the temporary directory.
-     * 
-     * This method iterates over all the files in the record files directory and finds the first file,
-     * whose timestamp is greater than or equal to the provided timestamp.
-     * It then copies this file and the previous file to the temporary directory.
-     * 
-     * @param {number} jsTimestampNum - The timestamp to compare against.
-     * @param {string} recordFilesDirPath - The path to the directory containing the record files.
-     * @param {string} tmpDirPath - The path to the temporary directory.
-     * @throws {Error} Throws an error if no record file can be found.
-     */
-    private findAndCopyRecordFileToTmpDir(jsTimestampNum: number, recordFilesDirPath: string, tmpDirPath: string): void {
-        // Copy the record file to a temp directory
-          const files = readdirSync(recordFilesDirPath);
-          
-          for (let i = 1; i < files.length; i++) {
-            const file = files[i];
-            const recordFileName = file.replace(DebugState.recordExt, '');
-            const fileTimestamp = new Date(recordFileName.replace(/_/g, ':')).getTime();
-            if (fileTimestamp >= jsTimestampNum) {
-              const fileToCopy = [
-                files[i - 2],
-                files[i]
-              ];
-
-              this.copyFilesToTmpDir(fileToCopy, tmpDirPath, recordFilesDirPath);
-              return;
-            }
-          }
-            
-          throw Errors.NO_RECORD_FILE_FOUND_ERROR();
-    }
-
-    /**
-     * Copies files to the temporary directory.
-     * 
-     * This method takes a list of files or a single file and copies them from the record files directory to the temporary directory.
-     * 
-     * @param {Array<string>} filesToCopy - The file or files to copy.
-     * @param {string} tmpDirPath - The path to the temporary directory.
-     * @param {string} recordFilesDirPath - The path to the directory containing the record files.
-     */
-    private copyFilesToTmpDir(
-      filesToCopy: Array<string>,
-      tmpDirPath: string,
-      recordFilesDirPath: string
-    ): void {
-       for (const file of filesToCopy) {
-         this.copyFileToDir(file, recordFilesDirPath, tmpDirPath)
-       }
-    }
-
-    /**
-     * Copies a file to a directory.
-     * 
-     * This method takes a file and copies it from the source path to the destination path.
-     * 
-     * @param {string} fileToCopy - The name of the file to copy.
-     * @param {string} srcPath - The source path of the file.
-     * @param {string} destinationPath - The destination path where the file should be copied.
-     */
-    private copyFileToDir(
-      fileToCopy: string,
-      srcPath: string,
-      destinationPath: string,
-    ): void {
-        if (fileToCopy.endsWith(DebugState.recordExt)) {
-          this.logger.trace(`Parsing record file [${fileToCopy}]\n`);
-        }
-        
-        const fileToCopyName = fileToCopy.replace(DebugState.recordExt, '');
-        const sigFile = fileToCopyName + DebugState.sigExt;
-        copyFileSync(
-          resolve(srcPath, fileToCopy),
-          resolve(destinationPath, fileToCopy)
-        );
-        copyFileSync(
-          resolve(srcPath, sigFile),
-          resolve(destinationPath, sigFile)
-        );
-    }
-}
diff --git a/src/state/InitState.ts b/src/state/InitState.ts
index cc92852..ce6874a 100644
--- a/src/state/InitState.ts
+++ b/src/state/InitState.ts
@@ -51,8 +51,7 @@ import {
     LOADING,
     NECESSARY_PORTS,
     NETWORK_NODE_CONFIG_DIR_PATH,
-    OPTIONAL_PORTS,
-    RECORD_PARSER_SOURCE_REL_PATH
+    OPTIONAL_PORTS
 } from '../constants';
 
 configDotenv({ path: path.resolve(__dirname, '../../.env') });
@@ -137,7 +136,6 @@ export class InitState implements IState{
             { key: 'NETWORK_NODE_LOGS_ROOT_PATH', value: join(this.cliOptions.workDir, 'network-logs', 'node') },
             { key: 'APPLICATION_CONFIG_PATH', value: join(this.cliOptions.workDir, 'compose-network', 'network-node', 'data', 'config') },
             { key: 'MIRROR_NODE_CONFIG_PATH', value: this.cliOptions.workDir },
-            { key: 'RECORD_PARSER_ROOT_PATH', value: join(this.cliOptions.workDir, 'services','record-parser') },
         ];
         configurationData.envConfiguration = (configurationData.envConfiguration ?? []).concat(workDirConfiguration);
         
@@ -183,12 +181,10 @@ export class InitState implements IState{
         FileSystemUtils.createEphemeralDirectories(this.cliOptions.workDir);
         const configDirSource = join(__dirname, `../../${NETWORK_NODE_CONFIG_DIR_PATH}`);
         const configPathMirrorNodeSource = join(__dirname, `../../${APPLICATION_YML_RELATIVE_PATH}`);
-        const recordParserSource = join(__dirname, RECORD_PARSER_SOURCE_REL_PATH);
 
         const configFiles = {
             [configDirSource]: `${this.cliOptions.workDir}/${NETWORK_NODE_CONFIG_DIR_PATH}`,
             [configPathMirrorNodeSource]: `${this.cliOptions.workDir}/${APPLICATION_YML_RELATIVE_PATH}`,
-            [recordParserSource]: `${this.cliOptions.workDir}/services/record-parser`
         };
         FileSystemUtils.copyPaths(configFiles);
     }
@@ -286,10 +282,9 @@ export class InitState implements IState{
      * 
      * @private
      */
-    // TODO: finish off multi node
     private configureMirrorNodeProperties(): void {
         this.logger.trace('Configuring required mirror node properties, depending on selected configuration...', this.stateName);
-        const { enableDebug, fullMode, multiNode, persistTransactionBytes, workDir } = this.cliOptions;
+        const {fullMode, multiNode, persistTransactionBytes, workDir } = this.cliOptions;
 
         const propertiesFilePath = join(workDir, 'compose-network/mirror-node/application.yml');
         const application = yaml.load(readFileSync(propertiesFilePath).toString()) as any;
@@ -299,10 +294,6 @@ export class InitState implements IState{
             application.hedera.mirror.importer.downloader.sources = originalNodeConfiguration.turboNodeProperties.sources;
         }
 
-        if (enableDebug) {
-            application.hedera.mirror.importer.downloader.local = originalNodeConfiguration.local;
-        }
-
         if (multiNode) {
             application.hedera.mirror.monitor.nodes = originalNodeConfiguration.multiNodeProperties;
             process.env.RELAY_HEDERA_NETWORK = '{"network-node:50211":"0.0.3","network-node-1:50211":"0.0.4","network-node-2:50211":"0.0.5","network-node-3:50211":"0.0.6"}';
diff --git a/src/types/CLIOptions.ts b/src/types/CLIOptions.ts
index de842d3..cfbc9dd 100644
--- a/src/types/CLIOptions.ts
+++ b/src/types/CLIOptions.ts
@@ -36,8 +36,6 @@
  * @property {boolean} blocklisting - Whether to enable blocklisting.
  * @property {boolean} startup - Whether to start up.
  * @property {number} verbose - The level of verbosity.
- * @property {string} timestamp - The timestamp for debugging.
- * @property {boolean} enableDebug - Whether to enable debugging.
  * @property {string} networkTag - The tag for the network.
  * @property {string} mirrorTag - The tag for the mirror.
  * @property {string} relayTag - The tag for the relay.
@@ -59,8 +57,6 @@ export interface CLIOptions {
     blocklisting: boolean,
     startup: boolean,
     verbose: number,
-    timestamp: string,
-    enableDebug: boolean,
     networkTag: string,
     mirrorTag: string,
     relayTag: string,


Test patch:
diff --git a/test/unit/states/DebugState.spec.ts b/test/unit/states/DebugState.spec.ts
deleted file mode 100644
index 9a81e1d..0000000
--- a/test/unit/states/DebugState.spec.ts
+++ /dev/null
@@ -1,265 +0,0 @@
-/*-
- *
- * Hedera Local Node
- *
- * Copyright (C) 2024 Hedera Hashgraph, LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import { expect } from 'chai';
-import fs from 'fs';
-import { SinonSandbox, SinonStub, SinonStubbedInstance } from 'sinon';
-import { LoggerService } from '../../../src/services/LoggerService';
-import { CLIService } from '../../../src/services/CLIService';
-import { DebugState } from '../../../src/state/DebugState';
-import { getTestBed } from '../testBed';
-import {
-    DEBUG_STATE_INIT_MESSAGE,
-    DEBUG_STATE_STARTING_MESSAGE,
-    RELATIVE_TMP_DIR_PATH,
-    RELATIVE_RECORDS_DIR_PATH
-} from '../../../src/constants';
-import { resolve } from 'path';
-import { Errors } from '../../../src/Errors/LocalNodeErrors';
-
-describe('DebugState tests', () => {
-    let debugState: DebugState,
-        testSandbox: SinonSandbox, 
-        loggerService: SinonStubbedInstance<LoggerService>,
-        serviceLocator: SinonStub,
-        shellTestBed: {[key: string]: SinonStub},
-        cliService: SinonStubbedInstance<CLIService>;
-
-    before(() => {
-        const { 
-            sandbox,
-            loggerServiceStub,
-            serviceLocatorStub,
-            shellStubs,
-            cliServiceStub,
-        } = getTestBed({
-            workDir: 'testDir',
-            timestamp: '1234567890.987654321'
-        });
-    
-        testSandbox = sandbox
-        loggerService = loggerServiceStub
-        serviceLocator = serviceLocatorStub
-        shellTestBed = shellStubs
-        cliService = cliServiceStub
-
-        debugState = new DebugState();
-    });
-
-    after(() => {
-        testSandbox.resetHistory();
-        loggerService.trace.resetHistory();
-    });
-
-    it('should initialize the Debug State', async () => {
-        expect(debugState).to.be.instanceOf(DebugState);
-        testSandbox.assert.calledWith(serviceLocator, 'LoggerService');
-        testSandbox.assert.calledOnce(loggerService.trace);
-        testSandbox.assert.calledWith(loggerService.trace, DEBUG_STATE_INIT_MESSAGE, DebugState.name);
-    })
-
-    it('should have a subscribe method', async () => {
-        expect(debugState.subscribe).to.be.a('function');
-    })
-
-    describe('onStart', () => {
-        let findAndCopyRecordFileToTmpDirStub: SinonStub;
-        let cleanTempDirStub: SinonStub;
-
-        before(() => {
-            findAndCopyRecordFileToTmpDirStub = testSandbox.stub(DebugState.prototype, <any>'findAndCopyRecordFileToTmpDir');
-            findAndCopyRecordFileToTmpDirStub.returns({})
-            cleanTempDirStub = testSandbox.stub(DebugState, <any>'cleanTempDir');
-        })
-
-        after(() => {
-            findAndCopyRecordFileToTmpDirStub.restore();
-            cleanTempDirStub.restore();
-        })
-
-        it('should execute onStart properly', async () => {
-            const { shellExecStub } = shellTestBed;
-            const shellCommand = 'docker exec network-node bash /opt/hgcapp/recordParser/parse.sh';
-            const getAndValidateTimestampSub = testSandbox.stub(DebugState, <any>'getAndValidateTimestamp');
-
-            await debugState.onStart();
-            
-            testSandbox.assert.calledWith(shellExecStub, shellCommand);
-            testSandbox.assert.calledTwice(loggerService.trace)
-            testSandbox.assert.calledWith(loggerService.trace, DEBUG_STATE_INIT_MESSAGE, DebugState.name);
-            testSandbox.assert.calledWith(loggerService.trace, DEBUG_STATE_STARTING_MESSAGE, DebugState.name);
-
-            getAndValidateTimestampSub.restore();
-        })
-    })
-
-    describe('utility methods', () => {
-        let unlinkSyncStub: SinonStub,
-            getAndValidateTimestampStub: SinonStub,
-            findAndCopyRecordFileToTmpDirStub: SinonStub,
-            readdirSyncStub: SinonStub,
-            tempDir: string,
-            cleanTempDirStub: SinonStub,
-            recordFilesDirPath: string;
-
-        beforeEach(() => {
-            const workDir = cliService.getCurrentArgv().workDir;
-            unlinkSyncStub = testSandbox.stub(fs, <any>'unlinkSync');
-            getAndValidateTimestampStub = testSandbox.stub(DebugState, <any>'getAndValidateTimestamp');
-            findAndCopyRecordFileToTmpDirStub = testSandbox.stub(DebugState.prototype, <any>'findAndCopyRecordFileToTmpDir');
-            readdirSyncStub = testSandbox.stub(fs, <any>'readdirSync');
-            tempDir = resolve(workDir, RELATIVE_TMP_DIR_PATH);
-            recordFilesDirPath = resolve(workDir, RELATIVE_RECORDS_DIR_PATH);
-            cleanTempDirStub = testSandbox.stub(DebugState, <any>'cleanTempDir');
-        })
-        
-        afterEach(() => {
-            unlinkSyncStub.restore();
-            getAndValidateTimestampStub.restore();
-            findAndCopyRecordFileToTmpDirStub.restore();
-            readdirSyncStub.restore();
-            cleanTempDirStub.restore();
-        })
-
-        it('should test cleanTempDir', async () => {
-            cleanTempDirStub.restore();
-            readdirSyncStub.returns(['folder1', 'folder2']);
-            const unlinkSyncFirstArgument = resolve(tempDir, 'folder1');
-            const unlinkSyncSecondArgument = resolve(tempDir, 'folder2');
-            await debugState.onStart(); 
-
-            testSandbox.assert.calledOnceWithExactly(readdirSyncStub, tempDir);
-            testSandbox.assert.calledTwice(unlinkSyncStub);
-            testSandbox.assert.calledWithExactly(unlinkSyncStub.firstCall, unlinkSyncFirstArgument);
-            testSandbox.assert.calledWithExactly(unlinkSyncStub.secondCall, unlinkSyncSecondArgument);
-        })
-
-        it('should test cleanTempDir when tempfile is gitignore', async () => {
-            cleanTempDirStub.restore();
-            readdirSyncStub.returns(['.gitignore']);
-
-            await debugState.onStart(); 
-
-            testSandbox.assert.calledOnceWithExactly(readdirSyncStub, tempDir);
-            testSandbox.assert.notCalled(unlinkSyncStub) ;
-        })
-
-        it('should test getAndValidateTimestamp', async () => {
-            getAndValidateTimestampStub.restore();
-            const errorSpy = testSandbox.spy(Errors, 'INVALID_TIMESTAMP_ERROR');
-
-            await (DebugState as any).getAndValidateTimestamp("1234567890.987654321");
-
-            testSandbox.assert.notCalled(errorSpy);
-
-            errorSpy.restore();
-        })
-
-        it('should test getAndValidateTimestamp with wrong timestamp', async () => {
-            getAndValidateTimestampStub.restore();
-            cliService.getCurrentArgv.returns({
-                async: false,
-                blocklisting: false,
-                balance: 1000,
-                accounts: 10,
-                startup: false,
-                timestamp: 124544,
-                workDir: 'testDir'
-            } as any);
-            const errorSpy = testSandbox.spy(Errors, 'INVALID_TIMESTAMP_ERROR');
-
-            await debugState.onStart();
-
-            testSandbox.assert.called(errorSpy);
-        })
-
-        it('should test findAndCopyRecordFileToTmpDir', async () => {
-            findAndCopyRecordFileToTmpDirStub.restore();
-            getAndValidateTimestampStub.returns(1707081291338);
-            readdirSyncStub.returns(['file1', 'file2', 'file3']);
-            const copyFilesTempDirStub = testSandbox.stub(DebugState.prototype, <any>'copyFilesToTmpDir');
-            const dateStub = testSandbox.stub(Date.prototype, <any>'getTime');
-            dateStub.onSecondCall().returns(1707081291350);
-
-            await debugState.onStart();
-
-            testSandbox.assert.calledOnceWithExactly(copyFilesTempDirStub, ['file1', 'file3'], tempDir, recordFilesDirPath);
-            testSandbox.assert.calledOnceWithExactly(readdirSyncStub, recordFilesDirPath);
-            testSandbox.assert.calledTwice(dateStub);
-
-            copyFilesTempDirStub.restore();
-            dateStub.restore();
-        })
-        
-        it('should test findAndCopyRecordFileToTmpDir throws an error', async () => {
-            findAndCopyRecordFileToTmpDirStub.restore();
-            getAndValidateTimestampStub.returns(1707081291338);
-            readdirSyncStub.returns(['file1', 'file2', 'file3']);
-            const copyFilesTempDirStub = testSandbox.stub(DebugState.prototype, <any>'copyFilesToTmpDir');
-            const dateStub = testSandbox.stub(Date.prototype, <any>'getTime').returns(1707081291337);
-            const errorSpy = testSandbox.spy(Errors, 'NO_RECORD_FILE_FOUND_ERROR');
-
-            await debugState.onStart();
-
-            testSandbox.assert.calledOnceWithExactly(readdirSyncStub, recordFilesDirPath);
-            testSandbox.assert.calledOnce(errorSpy);
-            testSandbox.assert.notCalled(copyFilesTempDirStub);
-            testSandbox.assert.calledTwice(dateStub);
-
-            copyFilesTempDirStub.restore();
-            dateStub.restore();
-            errorSpy.restore();
-        })
-
-        it('should test copyFilesToTmpDir', async () => {
-            findAndCopyRecordFileToTmpDirStub.restore();
-            getAndValidateTimestampStub.returns(1707081291338);
-            readdirSyncStub.returns(['file1', 'file2', 'file3']);
-            const copyFileToDirStub = testSandbox.stub(DebugState.prototype, <any>'copyFileToDir');
-            const dateStub = testSandbox.stub(Date.prototype, <any>'getTime');
-            dateStub.onSecondCall().returns(1707081291350);
-
-            await debugState.onStart();
-
-            testSandbox.assert.calledTwice(copyFileToDirStub);
-            testSandbox.assert.calledWithExactly(copyFileToDirStub.getCall(0), 'file1', recordFilesDirPath, tempDir);
-            testSandbox.assert.calledWithExactly(copyFileToDirStub.getCall(1), 'file3', recordFilesDirPath, tempDir);
-
-            readdirSyncStub.restore();
-            dateStub.restore();
-            copyFileToDirStub.restore();
-        })
-
-        it('should test copyFileToDir', async () => {
-            findAndCopyRecordFileToTmpDirStub.restore();
-            getAndValidateTimestampStub.returns(1707081291338);
-            const copyFileSyncStub = testSandbox.stub(fs, <any>'copyFileSync');
-            readdirSyncStub.returns(['file1', 'file2', 'file3']);
-            const dateStub = testSandbox.stub(Date.prototype, <any>'getTime');
-            dateStub.onSecondCall().returns(1707081291350);
-
-            await debugState.onStart();
-
-            expect(copyFileSyncStub.callCount).to.be.eq(4);
-            dateStub.restore();
-            copyFileSyncStub.restore();
-        })
-    })
-});
diff --git a/test/unit/states/InitState.spec.ts b/test/unit/states/InitState.spec.ts
index d74e3fd..3ec4f3d 100644
--- a/test/unit/states/InitState.spec.ts
+++ b/test/unit/states/InitState.spec.ts
@@ -38,8 +38,7 @@ import {
     INIT_STATE_STARTING_MESSAGE,
     NECESSARY_PORTS,
     NETWORK_NODE_CONFIG_DIR_PATH,
-    OPTIONAL_PORTS,
-    RECORD_PARSER_SOURCE_REL_PATH
+    OPTIONAL_PORTS
 } from '../../../src/constants';
 import { ConfigurationData } from '../../../src/data/ConfigurationData';
 import { CLIService } from '../../../src/services/CLIService';
@@ -196,11 +195,9 @@ describe('InitState tests', () => {
 
         const configDirSource = join(rootDirSource, `../../${NETWORK_NODE_CONFIG_DIR_PATH}`);
         const configPathMirrorNodeSource = join(rootDirSource, `../../${APPLICATION_YML_RELATIVE_PATH}`);
-        const recordParserSource = join(rootDirSource, RECORD_PARSER_SOURCE_REL_PATH);
         const configFiles = {
             [configDirSource]: `testDir/${NETWORK_NODE_CONFIG_DIR_PATH}`,
             [configPathMirrorNodeSource]: `testDir/${APPLICATION_YML_RELATIVE_PATH}`,
-            [recordParserSource]: `testDir/services/record-parser`
         };
 
         before(() => {