0

I encountered the following error while simulating a network when running the command:

./target/release/node-template purge-chain --base-path /tmp/alice --chain local

i got error indicating /tmp/alice/chains/local_testnet/db/full did not exist.

https://i.sstatic.net/eenKM.png

1 Answer 1

1

The purge-chain command is trying to remove the folder /tmp/alice/chains/local_testnet/db/full by default, and you don't have anything there. You can explore where are you keeping this data cd tmp && ls

When you have it you can indicate the path in the flag --base-path or delete the folder manually rm -r path

In case you are running the node with the flag --tmp it uses temporary storage and deletes the folder when you stop the chain, which means when you manually go to purge the data, the data has been already deleted.

--tmp: Use temporary storage for chain data (the chain state is deleted on exit)

The --dev flag also set the --tmp flag

--dev
          Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden
8
  • I checked but the folder is not existing
    – Preethi M
    Commented Jul 18, 2023 at 8:57
  • How do you run the node-template?
    – Alex Bean
    Commented Jul 18, 2023 at 8:58
  • By this ./target/release/node-template --dev --tmp --ws-external --rpc-external
    – Preethi M
    Commented Jul 18, 2023 at 9:06
  • Because you are using --dev and --tmp is automatically deleting the chain data when stop the node
    – Alex Bean
    Commented Jul 18, 2023 at 9:32
  • I edited the answer with more information
    – Alex Bean
    Commented Jul 18, 2023 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.