Blockchain Reference for the Tezos Namespace - Chains

Author Stanly Johnson
Discussions-To https://github.com/ChainAgnostic/CAIPs/pull/36, https://gitlab.com/tezos/tezos/-/issues/1029
Status Draft
Type Standard
Created 2020-12-12
Updated 2022-03-27
Requires CAIP-2

CAIP-2

For context, see the CAIP-2 specification.

Rationale

In CAIP-2 a general blockchain identification scheme is defined. This is the implementation of CAIP-2 for the chain identification system of the Tezos namespace.

Syntax

Blockchains in the “tezos” namespace are identified by their chain ID derived deterministically from a short, prefixed Blake-2B hash of their genesis block.

Reference Definition

The method for calculating the hash of a given chain’s genesis block (for use as a CAIP-2 chain ID) is as follows:

tezosB58CheckEncode('Net',
  firstFourBytes(
    blake2b(msg = tezosB58CheckDecode('B', genesisBlockHash),
            size = 32)))

Backwards Compatibility

Not applicable

Test Cases

This is a list of manually composed examples

# Tezos Mainnet
tezos:NetXdQprcVkpaWU

# Tezos DelphiNet (Current active testnet)
tezos:NetXm8tYqnMWky1

References

Rights

Copyright and related rights waived via CC0.

Citation

Please cite this document as:

Stanly Johnson, "namespaces/tezos: Blockchain Reference for the Tezos Namespace - Chains [DRAFT]," Chain Agnostic Namespaces, tezos, December 2020 / March 2022. [Online serial]. Available: https://github.com/ChainAgnostic/namespaces/tezos.md