Skip to content

Commit

Permalink
editorial pass for minor style guide issues and clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
bumblefudge committed Mar 13, 2024
1 parent 2eb9bff commit d9efbba
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
2 changes: 0 additions & 2 deletions tezos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ updated: 2024-02-20
replaces: CAIP-26
---

# Namespace for Tezos Blockchains

This document defines the applicability of CAIP schemes to the blockchains of the Tezos ecosystem according to the *Namespace Reference Purpose and Guidelines* of [CAIP-104][].

## Syntax
Expand Down
23 changes: 12 additions & 11 deletions tezos/caip10.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,40 @@ updated: 2024-02-28
requires: ["CAIP-2", "CAIP-10"]
---

# CAIP-10

*For context, see the [CAIP-10][] specification.*

## Rationale

Tezos supports the use of multiple public-key signature schemes, so the display address is prefixed with `tz1` ([Ed25519][] curve), `tz2` ([Secp256k1][] curve), `tz3` ([NIST P256][] curve), or `tz4` (BLS12-381 curve from the [BLS family][]) referenced in the [Tezos address types glossary][]. After the prefix, the rest of the account address is a [Base58 Check Encoded Blake2B Hash][] of each key's public key.
Tezos supports the use of multiple public-key signature schemes; for this reason, a given account can have multiple addresses, each of which is prefixed with `tz1` ([Ed25519][] curve), `tz2` ([Secp256k1][] curve), `tz3` ([NIST P256][] curve), or `tz4` (BLS12-381 curve from the [BLS family][]) referenced in the [Tezos address types glossary][].
After the prefix, the rest of the account address is a [Base58 Check Encoded Blake2B Hash][] of a public key of the type corresponding to the prefix.

## Syntax

The syntax of a Tezos address matches the following regular expression (note the 58-character alphabet):
The syntax of a Tezos address matches the following regular expression (note the [58-character alphabet][base58]):

`(tz1|tz2|tz3|tz4) [1-9A-HJ-NP-Za-km-z]{33}`
`(tz1|tz2|tz3|tz4)[1-9A-HJ-NP-Za-km-z]{33}`

## Chain IDs

*For context, see the [CAIP-2][] specification and in particular the `tezos-caip2` profile thereof.*
For how to compute a valid `chainId` segment or a list of examples, see [the CAIP-2 profile](./caip2.md).

| Alias | Chain ID |
| -------------- | -------------------------------- |
| tezos:mainnet | tezos:NetXdQprcVkpaWU |
| tezos:ghostnet | tezos:NetXnHfVqm9iesp |
| tezos mainnet | tezos:NetXdQprcVkpaWU |
| tezos ghostnet | tezos:NetXnHfVqm9iesp |

Tezos addresses are invariable across networks.

## Test Cases

The Tezos namespace, the chain ID and the [Tezos address types][] allow the construction of the [CAIP-10][] compliant `Account ID`:
Manually composed examples follow:

```bash
# Tezos Mainnet
# Ed25519-key address on Tezos Mainnet
# Genesis block hash: BLockGenesisGenesisGenesisGenesisGenesisf79b5d1CoW2
tezos:NetXdQprcVkpaWU:tz1MJx9vhaNRSimcuXPK2rW4fLccQnDAnVKJ

# Tezos Ghostnet (Long-running test network)
# NIST p256-key address on Tezos Ghostnet
# Genesis block hash: BLockGenesisGenesisGenesisGenesisGenesis1db77eJNeJ9
tezos:NetXnHfVqm9iesp:tz3btDQsDkqq2G7eBdrrLqetaAfLVw6BnPez
```
Expand Down
17 changes: 11 additions & 6 deletions tezos/caip2.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ tezosB58CheckEncode('Net',

### Chain ID alias

The Tezos community recognizes the different chains according to human readable names, the so called [Networks][]. The Octez RPC allows you to connect to three predefined networks:
The Tezos community recognizes the different chains according to human readable names, which are called the "[Networks][]". The Octez RPC, for example, allows you to connect to three predefined networks:

```bash
# mainnet (this is the default)
# mainnet (default)
# sandbox
# ghostnet

Expand All @@ -56,11 +56,16 @@ Not applicable.

## Integrity guarantees for the chain ID

The third chapter of the [Tezos Position Paper][] is dedicated to the analysis of potential threats leading to a user connecting to the Tezos network for the first time and not ending up on the `tezos:mainnet`. One of the main features of the technology is the [On-Chain Governance][] including its consensus mechanism based on [Proof-of-Stake][]. In combination with periodical checkpoints - which are created by institutions like e.g. a [Tezos Block Explorer][] or others based on social consensus - and statistical analysis of the chain using TAPOS "transactions as proof of stake" it is considered safe to assume to be connected to the mainnet regarding most given threat models. The current mainnet is running without a security breach since the `30th of June 2018` with enough incentive to attack its security mechanisms indicating the validity of the statement above.
The third chapter of the [Tezos Position Paper][] is dedicated to the analysis of potential threats leading to a user connecting to the Tezos network for the first time and not ending up on the `tezos:mainnet`.
One of the main features of the technology is the [On-Chain Governance][] including its consensus mechanism based on [Proof-of-Stake][].
In combination with social consensus around periodic chain-state "checkpoints" used to bootstrap nodes and anchor shared ground-truth for, e.g. [Tezos Block Explorer][], a statistical analysis of the chain using TAPOS ("transactions as proof of stake") serves as guarantee of the integrity of the mainnet regarding these threat models.
The current mainnet has been running without a pertinent protocol-level security breach or consensus attack since the `30th of June 2018`.

## Test Cases

This is a list of manually composed examples. See [Tezos test network infrastructure][] for available public chains. You can use the [Tezos RPC Interface][] to compute the chain id from a block hash as follows:
This is a list of manually composed examples.
See [Tezos test network infrastructure][] for available public chains.
You can use the [Tezos RPC Interface][] to compute the chain id from a block hash as follows:

```bash
# Tezos Ghostnet (Long-running test network)
Expand All @@ -84,8 +89,8 @@ The following table includes the chain ID aliases through their human readable n

| Alias | Chain ID |
| -------------- | -------------------------------- |
| tezos:mainnet | tezos:NetXdQprcVkpaWU |
| tezos:ghostnet | tezos:NetXnHfVqm9iesp |
| tezos mainnet | tezos:NetXdQprcVkpaWU |
| tezos ghostnet | tezos:NetXnHfVqm9iesp |

## References

Expand Down

0 comments on commit d9efbba

Please sign in to comment.