guardian icon indicating copy to clipboard operation
guardian copied to clipboard

Guardian should create a new initialization topic if `INITIALIZATION_TOPIC_ID` is not defined

Open Neurone opened this issue 7 months ago • 0 comments

Problem description

Documentation mentions Guardian will create a new topic if the INITIALIZATION_TOPIC_ID is not defined. That does not seem the case, even though the source code seems to contain a function for that in case the network is set as "localnode".

Step to reproduce

  1. Clone the Guardian repo
  2. Configure the environment, set HEDERA_NET="localnode" and INITIALIZATION_TOPIC_ID=""
  3. Start the Guardian, login as Standard Registry, and proceed to initialize the SR account
  4. See the worker-service log for the error:
2025-05-20T22:38:13.185Z [WORKER.2DD84BB695,WORKER]: Task error: 89cebd23-e104-4197-b8f6-7eabad873e9d, receipt for transaction [email protected] contained error status INVALID_TOPIC_ID

Expected behavior

If INITIALIZATION_TOPIC_ID is set to null/void, the topic is automatically created. In addition, this should be true regardless of the network configuration (i.e. mainnet, testnet, previewnet, local-node)

Neurone avatar May 20 '25 22:05 Neurone