Switching from testnet to mainnet

Yeah, but the other pools perhaps have more pledge and/or more stake

You don’t nees to worry… it’s just a formula

Anyone seen this one before? The node was running on the testnet (1.29) prior. I downloaded the latest prereqs.sh and ran it with the force overwrite option. I left the scripts files as-is and only updated the topology.json to set the custom peers to the IOHK server. When I attempt to start the relay node I get an “NetworkMagicMismatch” error.

ubuntu@relay1:/opt/cardano/cnode/scripts$ ./cnode.sh
WARN: A prior running Cardano node was not cleanly shutdown, socket file still exists. Cleaning up.
Listening on http://127.0.0.1:12798

Shutting down…
NetworkMagicMismatch “/opt/cardano/cnode/db/protocolMagicId” (NetworkMagic {unNetworkMagic = 1097911063}) (NetworkMagic {unNetworkMagic = 764824073})

cardano-node: Wrong NetworkMagic in “/opt/cardano/cnode/db/protocolMagicId”: NetworkMagic {unNetworkMagic = 1097911063}, but expected: NetworkMagic {unNetworkMagic = 764824073}

How did u ran the prereqs? With -n (testnet) ?

Perhaps u downloaded the files for mainnet?

Thanks Alex. I manually updated /opt/cardano/cnode/db/protocolMagicId with 764824073 and that fixed the problem. I also renamed the /opt/cardano/cnode dir and ran prereq.sh again just to make sure I had a clean slate. However, the main problem was the 1097911063 value in the protocolMagicId file.

That might be something to add to the list of tasks in converting a pool from testnet to mainnet.

I tried it with no “-n” parameter as well as with “-n mainnet” but neither one solved the problem.

Hmm

./prereqs.sh -f will download all the files for mainnet
Did u used this command?
You will need to edit again:

  • topology file
  • env file
  • topology updater (for relays)

I’m sorry I wasn’t clear. Yes, I did download the mainnet files. However, the db/protocolMagicId file did not get updated simply by running prereq.sh without the “-n” parameter. I had to update the protocolMagicId file manually and replace 1097911063 with 764824073 in order to get the node to start.

1 Like