Cardano 测试网中的魔术 ID 或魔术数字是什么?
What is magic id or magic number in Cardano testnet?
Cardano CLI 中有很多教程使用 --testnet-magic 3
或 --testnet-magic 4
来读取地址中的值、生成本机令牌等。但是其中 none 详细解释了有关幻数到底是什么?我们如何确定要使用的幻数?
作为参考,有一个使用幻数 42 的 official doc,但我在试图理解它时迷路了。
正如我在评论中提到的,它是网络标识符。如果你去 https://hydra.iohk.io/build/5822084/download/1/index.html, you'll see the config and genesis files for current networks: testnet
and mainnet
. You can find the networkMagic
parameter in the testnet Shelley genesis https://hydra.iohk.io/build/5822084/download/1/testnet-shelley-genesis.json:
...
"maxLovelaceSupply": 45000000000000000,
"networkMagic": 1097911063, // <- network identifier / magic number
"epochLength": 432000,
"systemStart": "2019-07-24T20:20:16Z",
...
Cardano CLI 中有很多教程使用 --testnet-magic 3
或 --testnet-magic 4
来读取地址中的值、生成本机令牌等。但是其中 none 详细解释了有关幻数到底是什么?我们如何确定要使用的幻数?
作为参考,有一个使用幻数 42 的 official doc,但我在试图理解它时迷路了。
正如我在评论中提到的,它是网络标识符。如果你去 https://hydra.iohk.io/build/5822084/download/1/index.html, you'll see the config and genesis files for current networks: testnet
and mainnet
. You can find the networkMagic
parameter in the testnet Shelley genesis https://hydra.iohk.io/build/5822084/download/1/testnet-shelley-genesis.json:
...
"maxLovelaceSupply": 45000000000000000,
"networkMagic": 1097911063, // <- network identifier / magic number
"epochLength": 432000,
"systemStart": "2019-07-24T20:20:16Z",
...