Cardano-cli , testnet, Significance of INTEGER value after "--testnet-magic"

Hi Folks,
Below command runs fine on my Core(BP) Node. I just want to know what is that value (e.g. 1097911063) at the last of the command ?

what can be other possible values ? Is that anyway related with Current Testnet Epoh Number, Slots etc.

cardano-cli query utxo --address addr_test1qp7nx5vpdcamdjlpvp30kyhrt7x0an28583uvag9ge8mkujfhwfazy7fdqk2q99mrt3gyzymkdd6g3szme8uz29czdwq2xkstf --testnet-magic 1097911063

                       TxHash                                 TxIx        Amount

Is the magic ID or magic number ( it defines the testnet)

Does this particular value remain constant through out Eras or keep changing per release basis ?

Constant per network

okay , in that case, which are other Testnet networks ? is testnet-magic one of many Testnet Networks ? Is there any consolidated list of all the networks and corresponding Magic Number values anywhere ?

Only one as far as I know

1 Like

Just to add my 2c.

@NirmalSingh If you open this link https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/index.html if will redirect you to the latest configurations. Checking ShelleyGenesis you will find the current magic number for the testnet.

If you for example go here: https://hydra.iohk.io/build/7416228/download/1/index.html you can find the other alonzo testnets which have different magic numbers.

Btw even mainnet has a magic number.

1 Like

@mcrio - Thanks Nik for answering.

I was checking it and noticed some minor observations related to the same :

  1. byronGenesis and shelleyGenesis maintain same Magic Number value i.e. 1097911063.
  2. However naming convention of this config changes from protocolConsts":{ "protocolMagic (byronGenesis) to networkMagic (shelleyGenesis).
  3. alonzoGenesis does not contain this config at all.

But little confused by this. How come a latest (as you mentioned) build number (https://hydra.iohk.io/build/7370192) behind the other build number (https://hydra.iohk.io/build/7416228) ?

It’s latest like in terms of latest stable. Like for the cardano-node, we were all on latest stable 1.27.0 while there were 1.28.0 and 1.29.0 versions on github.

Regarding the testnet and mainnet configs, I guess theoretically you could use a higher build number than what is the latest supported, and I see people do it, but I’d rather go with https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/index.html whenever fetching configs.

I assume you mean the testnet.

Currently, the testnet versions used are Preview TestNet and Pre-Production TestNet. You have to build according to the prereqs script on the following link and request some testADA from the faucet for test: https://forum.cardano.org/t/setup-a-stake-pool-on-pre-production-or-preview-testnets-with-cntools/106170