Refused NodeToClientV_3 "version data mismatch: NodeToClientVersionData {networkMagic

Dear all,

after (more or less) successfully setting up a pool on the so called “shelley testnet” I now tried using the new cardano-node 1.18.0 and the mainnet-candidate-4 configuration files. Also, one hour ago the 1.6.0-STN5-wallet was released which will provide me with test ADA for registering addresses and pools.

After creating wallet & staking keys and addresses I obviously cannot query the (synced) node using

cardano-cli shelley query utxo \
    --address "${ADDRESS}" \

The resulting error is: “cardano-cli: HandshakeError (Refused NodeToClientV_3 “version data mismatch: NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 42}} /= NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 764824073}}”)”

This error does not change. I used --mainnet also for address generation of course. It does not make any difference if I use ----testnet-magic 42 argument again (for both address generation and query).

What am I missing here? :frowning: Anybody with the same problems? I’m trying to avoid CNtools for now to understand what I’m really doing.

Thank you in advance

1 Like

For reference: At the moment it seems one has to “reverse engineer” CNtools :wink:
CNtool’s “env”-contains the hints:

## FROM CNtools
## From "shelley_genesis.json": mainnet-candidate-4: "Mainnet"
#NETWORKID=$(jq -r .networkId $GENESIS_JSON)
## From "shelley_genesis.json": mainnet-candidate-4: 42
#NWMAGIC=$(jq -r .networkMagic < $GENESIS_JSON)
## From "config.jsin":  mainnet-candidate-4: "Cardano"
#PROTOCOL=$(jq -r .Protocol "$CONFIG")
#[[ "${NETWORKID}" = "Mainnet" ]] && HASH_IDENTIFIER="--mainnet" || HASH_IDENTIFIER="--testnet-magic ${NWMAGIC}"
#[[ "${PROTOCOL}" = "Cardano" ]] && PROTOCOL_IDENTIFIER="--cardano-mode" || PROTOCOL_IDENTIFIER="--shelley-mode"
#[[ "${NWMAGIC}" = "764824073" ]] && NETWORK_IDENTIFIER="--mainnet" || NETWORK_IDENTIFIER="--testnet-magic ${NWMAGIC}"

These Identifiers are used within the whole script to invoke cardano-cli. For mainnet-candidate-4: hashing calls use --mainnet, query calls use --cardano-mode --testnet-magic 42. The --testnet-magic 42 is to be replaced with --mainnet in the future.

same issue here… just started the node with testnet config and wanted to check the sync status with cardano-cli shelley query tip --testnet-magic 42 and got the following error:

cardano-cli: HandshakeError (Refused NodeToClientV_3 "version data mismatch: NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 1097911063}} /= NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 42}}")

for me the solution was to use the mainnet configs I used the candidate and testnet - but that is probably not working with 1.18.0

For mc4 include --cardano-mode with your testnet magic argument. both have to be used

I’m following this doc to implement a stakepool on testnet and got the same issue. My node is just syncing for about 5 minute then stop as well

Can you put more detail in your solution?

1 Like

My solution was for using the mainnet instead of the mainnet candidate 4 - not the “new/old” testnet. I can only guess that you would have to use the magic as per testnet-shelley-genesis.json (1097911063)…?

1 Like

So seems like the problem with config files? I’m looking for another source :frowning:

~Is it possible that you’re using an older version of cardano-cli?
What does cardano-cli --version say?~
Thought it as a complaint about NodeToClientV_3 in it self, not the network magic.

Use the testnet configuration files instead.
There you will use the same ports as in production and it has a public faucet which you will need to actually setup a stakepool.
The network-magic number you will find in the config file (it is not 42).
Bare in mind that you will be connecting to servers at
A lot of scripts don’t keep that in mind yet.

Hi ThaiTheo, your Idea looks right, while I can’t find network-magic in config file as you suggested, I change my --testnet-magic according to “networkMagic” number in testnet-shelley-genesis.json.

1 Like

Did you get this fully worked out. I just hit the same bump in the road. Just starting to trouble-shoot…

Lead me here, solution: needed to look into testnet-shelley-genesis.json at networkMagic.

cardano-cli query tip --cardano-mode --testnet-magic 1097911063


THIS ONE WORKED, just replace the testnet magic 42 with
–testnet-magic 1097911063


1 Like