My understanding is the following terms which are used in different contexts and applications all refer to the same thing: "genesis hash", "network key", "chain id". I know at least one way of finding out this value for a chain when the chain is up. I do the following rpc call to get the "hash of block 0":
curl --request POST \
--url [NODE_RPC_URL] \
--header 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0","method": "chain_getBlockHash","params": [0],"id": 1}'
I would however prefer using substrate cli to find this key aspect of a chain. From the list of CLI options I see there is a export-genesis-state
which when used together with --chain
should return some information about the genesis. It's however not looking to be same or contain the genesis hash. Is there any other method or command that could be used for this case?