When I try to run the node in the testnet, gives me this error
This is usually caused by running a node for one network with the blockchain store of another network (ie testnet vs mainnet). The network magic is there to protect against this, eg you should not be able to spend testnet ADA on the mainnet
Are you running nodes for two different networks (eg testnet and mainnet)? If so, you are probably pointing both nodes at the same blockchain store location.
you are right, I think that the relay node I have is exclusive for mainnet, so how can I create another relay node for testnet? There are a guide that explain how to create a node for testnet?
Yes, you will need separate relays for testnet and mainnet.
The only difference between creating a testnet node and creating one for mainnet is which configuration files are used. Where did you get your mainnet configs?
from the documentation but, I have the testnet files too
cardano-node run --topology /home/cardano/cnode/config/testnet-topology.json --database-path /home/cardano/cnode/db --socket-path /home/cardano/cnode/sockets/node.socket --host-addr 0.0.0.0 --port 3001 --config /home/cardano/cnode/config/testnet-config.json
this is the command I used for testnet, I don’t modified the database and socket-path files
But it seems you are using the same database path for mainnet
and testnet
, ie --database-path /home/cardano/cnode/db
.
You should use something like --database-path /home/cardano/mainnet/cnode/db
and --database-path /home/cardano/testnet/cnode/db
Similarly, you will need distinct socket paths.
from where can I download the db and socket paths files for the testnet?
EDIT: I fixed the error, when the testnet node starts, the db and socket files puts automatically
There are not downloaded, they are created by the node. However, if you have a more than one node, they cannot all use the same file path.
I am having a similar issue, I can’t find the db testnet files path only the mainnet ones but i want to make use of the mainnet, how do I get my node to create the testnet file path with the correct network magic number?