Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main from staging, 21 June 2024 #413

Merged
merged 9 commits into from
Jun 21, 2024
16 changes: 14 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Architecture
authors: Tim McMackin
last_update:
date: 6 February 2024
date: 10 June 2024
---

The Tezos blockchain is composed of many Tezos nodes running around the world, complemented by other running daemons, such as bakers and accusers.
Expand Down Expand Up @@ -76,7 +76,19 @@ It also provides the logic that identifies erroneous blocks.
Updates to the protocol can change this logic through a voting process, using dedicated voting operations such as protocol proposals or protocol upvotes.
For information about the voting process, see [Governance](./architecture/governance).

## The shell
The protocol has constants such as the time between blocks and the amount of tez that an account must stake to be a baker.
These constants can be different for different Tezos networks.

To get the constants for a network, call the `GET /chains/main/blocks/head/context/constants` RPC endpoint.
For example, to get the constants of the network that the Octez client is currently connected to, run this command:

```bash
octez-client rpc get /chains/main/blocks/head/context/constants
```

For more information about constants, see [Protocol constants](https://tezos.gitlab.io/alpha/protocol_overview.html#protocol-constants) in the Octez documentation.

### The shell

The shell is responsible for the fundamental functions of a distributed software application, including:

Expand Down
7 changes: 1 addition & 6 deletions docs/architecture/data-availability-layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
title: The Data Availability Layer
authors: "Tim McMackin"
last_update:
date: 7 February 2024
date: 10 June 2024
---

:::note Experimental
The Data Availability Layer is an experimental feature that is not yet available on Tezos Mainnet.
The way the DAL works may change significantly before it is generally available.
:::

The Data Availability Layer (DAL) is a companion peer-to-peer network for the Tezos blockchain, designed to provide additional data bandwidth to Smart Rollups.
It allows users to share large amounts of data in a way that is decentralized and permissionless, because anyone can join the network and post and read data on it.

Expand Down
32 changes: 30 additions & 2 deletions docs/architecture/governance/amendment-history.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: History of amendments
authors: 'Thomas Zoughebi, Aymeric Bethencourt, and Maxime Fernandez'
authors: 'Thomas Zoughebi, Aymeric Bethencourt, Maxime Fernandez, and Tim McMackin'
last_update:
date: 14 February 2024
date: 6 June 2024
---

As presented in [Governance](../governance), the Tezos blockchain is constantly evolving, through new amendments.
Expand Down Expand Up @@ -209,3 +209,31 @@ Nairobi's main changes are:
* Smart Rollups can now be aware of protocol updates happening on the L1.

For more information, see the blog post from [Nomadic Labs](https://research-development.nomadic-labs.com/nairobi-announcement.html) and the [reference documentation](https://tezos.gitlab.io/protocols/017_nairobi.html).

## [Oxford](https://tezos.gitlab.io/protocols/018_oxford.html) (Proxford)

*Oxford* was autonomously [activated](https://tzkt.io/5070849) on 9 February 2024.

Oxford's main changes are:

* [Refinement of Tezos PoS](https://research-development.nomadic-labs.com/oxford2-announcement.html#automated-staking): Oxford introduces changes to [slashing](https://research-development.nomadic-labs.com/oxford2-announcement.html#refined-slashing) and an [automated staking mechanism for bakers](https://research-development.nomadic-labs.com/oxford2-announcement.html#automated-staking).
The latter aims to smoothen the transition towards a new staked funds management API and avoids manual bookkeeping to counter over-delegation.
* [Private rollups](https://research-development.nomadic-labs.com/oxford2-announcement.html): Oxford introduces private Smart Rollups, allowing developers to choose between permissionless or permissioned deployments.
Additionally, Oxford [simplifies the deployment of rollups](https://research-development.nomadic-labs.com/oxford2-announcement.html#introducing-private-rollups-and-other-improvements-to-smart-rollups) both on protocol and periodic test networks, as well as on ad-hoc dedicated ones.
* [Timelocks are re-enabled](https://research-development.nomadic-labs.com/timelocks-are-re-enabled): a new design and implementation of Timelocks addresses security concerns that led to their temporary deactivation in a previous protocol upgrade.

For more information, see the blog post from [Nomadic Labs](https://research-development.nomadic-labs.com/oxford-announcement.html) and the [reference documentation](https://tezos.gitlab.io/protocols/018_oxford.html).

## [Paris](https://tezos.gitlab.io/protocols/019_paris.html) (PtParisB)

*Paris* was autonomously [activated](https://tzkt.io/5726209) on 5 June 2024.

Paris's main changes are:

* [10-second block time](https://research-development.nomadic-labs.com/10-second-blocktime.html): Lower latency and faster finality on layer 1 without compromising decentralization or security.
* [Data availability layer](https://research-development.nomadic-labs.com/paris-announcement.html#the-dal-activates-on-mainnet-boosting-smart-rollups-capacity): Boosting throughput and scalability of Smart Rollups.
It enables Tezos Layer 1 to attest the publication of data living outside Layer 1 blocks, increasing by orders of magnitude the bandwidth of data attested by the Layer 1.
* [Adaptive issuance, staking, and adaptive slashing](https://research-development.nomadic-labs.com/adaptive-issuance-paris.html): A major overhaul of Tezos Proof-of-Stake, adapting the economics of tez to fit better with real-world usage, and to increase the chain security. The proposed mechanism ties the protocol’s regular issuance of tez to the ratio of staked tez over the total supply, in order to nudge the staked fund ratio towards a protocol-defined target.
* [Further proof-of-stake refinements](https://research-development.nomadic-labs.com/paris-announcement.html#further-proof-of-stake-refinements): Simplified computation and faster updates of consensus rights.

For more information, see the blog post from [Nomadic Labs](https://research-development.nomadic-labs.com/paris-announcement.html) and the [reference documentation](https://tezos.gitlab.io/protocols/019_paris.html).
18 changes: 13 additions & 5 deletions docs/architecture/smart-rollups.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Smart Rollups
authors: 'Nomadic Labs, TriliTech, Tim McMackin'
last_update:
date: 11 March 2024
date: 10 June 2024
---

Smart Rollups play a crucial part in providing high scalability on Tezos.
Expand All @@ -25,7 +25,7 @@ For reference on Smart Rollups, see [Smart Optimistic Rollups](https://tezos.git
This diagram shows a high-level view of how Smart Rollups interact with layer 1:

![Diagram of Smart Rollup architecture](/img/architecture/smart-rollup-architecture.png)
<!-- https://lucid.app/lucidchart/1e176e48-5c1a-457c-af3e-2f66d3c1b893/edit>
<!-- https://lucid.app/lucidchart/1e176e48-5c1a-457c-af3e-2f66d3c1b893/edit -->

## Uses for Smart Rollups

Expand All @@ -42,9 +42,14 @@ For example, Smart Rollups enable [Etherlink](https://www.etherlink.com/), which

## Communication

Smart Rollups have access to two sources of information: the rollup inbox and the reveal data channel.
Smart Rollups are limited to information from these sources:

- The Smart Rollup inbox, which contains messages from layer 1 to all rollups
- The reveal data channel, which allows Smart Rollups to request information from outside sources
- The [Data availability layer](./data-availability-layer)

These are the only sources of information that rollups can use.
In particular, Smart Rollup nodes cannot communicate directly with each other; they do not have a peer-ro-peer communication channel like layer 1 nodes.
In particular, Smart Rollup nodes cannot communicate directly with each other; they do not have a peer-to-peer communication channel like layer 1 nodes.

### Rollup inbox

Expand Down Expand Up @@ -156,7 +161,10 @@ This kind of Smart Rollup is called a Smart Optimistic Rollup because the commit
When there is only one commitment left, either because all nodes published identical commitments during the whole refutation period or because this commitment won the refutation games and eliminated all other commitments, then this correct commitment can be _cemented_ by a dedicated layer 1 operation and becomes final and unchangeable.
The commitments for the next commitment period build on the last cemented commitment.

The refutation period lasts 2 weeks on Mainnet; it can be different on other networks.
The refutation period lasts for a set number of blocks based on the `smart_rollup_challenge_window_in_blocks` protocol constant.
For example, currently the refutation period lasts 120,960 blocks on Mainnet.
Mainnet has 10 seconds between blocks as of the Paris protocol upgrade, which means that the refutation period lasts 2 weeks.
Ghostnet has 5 seconds between blocks but its refutation period is twice as many blocks, so its refutation period is also two weeks long.

### Triggering outbox messages

Expand Down
36 changes: 35 additions & 1 deletion docs/smart-contracts/data-types/complex-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Complex data types
authors: 'Mathias Hiron (Nomadic Labs), Sasha Aldrick (TriliTech), Tim McMackin (TriliTech)'
last_update:
date: 5 October 2023
date: 17 June 2024
---

Tezos contracts support these complex data types.
Expand All @@ -17,6 +17,15 @@ The high-level languages may implement these data types slightly differently, bu
- [Variants and Unions](#variants)
- [Lambdas](#lambdas)
- [Tickets](#tickets)
- [Unit](#unit)

This list is intended for general information for developers and is not intended to be comprehensive.
For a complete list of data types that are available, see the reference information for the language that you are using:

- Michelson: [Types](https://tezos.gitlab.io/michelson-reference/#types)
- LIGO: [Introduction](https://ligolang.org/docs/intro/introduction?lang=jsligo)
- Archetype: [Types](https://archetype-lang.org/docs/reference/types)
- SmartPy: [Overview](https://smartpy.io/manual/syntax/overview)

## Pairs {#pairs}

Expand Down Expand Up @@ -456,3 +465,28 @@ Contracts can run these operations on tickets:
- LIGO: [Tickets](https://ligolang.org/docs/reference/current-reference#tickets)
- Archetype: [create_ticket and related](https://archetype-lang.org/docs/reference/expressions/builtins/#create_ticket%28s%20:%20T,%20n%20:%20nat%29)
- SmartPy: [Tickets](https://smartpy.io/manual/syntax/tickets)

## Unit {#unit}

In Tezos, the `unit` type contains a single value that holds no information.
Smart contracts use unit values as placeholders where a variable is required but no other information is needed.
It is the input type of functions taking no input, the output type of functions producing no output, and the storage type of contracts storing no information.

For example, if a LIGO entrypoint receives no parameter, the data type of the entrypoint's parameter is `unit`:

```jsligo
@entry
const myentrypoint = (_unusedParameter: unit, store: storageType): returnType => {
// ...
}
```

Similarly, if you call this entrypoint with the Octez client and omit the `--arg` argument to pass no parameter, the client passes unit in the background.

Unit is a concept that Tezos inherits from OCaml; see [Side-Effects and the unit Type](https://ocaml.org/docs/tour-of-ocaml#side-effects-and-the-unit-type) in the OCaml documentation.

### Implementation details

- LIGO: [Unit](https://ligolang.org/docs/variants/unit/?lang=jsligo)
- Archetype: [Unit](https://archetype-lang.org/docs/reference/types/#unit)
- SmartPy: [Unit](https://smartpy.io/manual/syntax/unit)
10 changes: 9 additions & 1 deletion docs/smart-contracts/data-types/primitive-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Primitive data types
authors: 'Mathias Hiron (Nomadic Labs), Sasha Aldrick (TriliTech), Tim McMackin (TriliTech)'
last_update:
date: 4 October 2023
date: 4 June 2024
---

Tezos contracts support these primitive data types.
Expand All @@ -16,6 +16,14 @@ The high-level languages may implement these data types slightly differently, bu
- [Timestamps](#timestamps)
- [Addresses](#addresses)

This list is intended for general information for developers and is not intended to be comprehensive.
For a complete list of data types that are available, see the reference information for the language that you are using:

- Michelson: [Types](https://tezos.gitlab.io/michelson-reference/#types)
- LIGO: [Introduction](https://ligolang.org/docs/intro/introduction?lang=jsligo)
- Archetype: [Types](https://archetype-lang.org/docs/reference/types)
- SmartPy: [Overview](https://smartpy.io/manual/syntax/overview)

## Numeric data types: `int` and `nat` {#numeric}

Integers (`int`) are whole numbers that can be positive or negative.
Expand Down
9 changes: 2 additions & 7 deletions docs/tutorials/build-files-archive-with-dal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
title: Implement a file archive with the DAL and a Smart Rollup
authors: 'Tezos Core Developers'
last_update:
date: 9 February 2024
date: 10 June 2024
---

:::note Experimental
The Data Availability Layer is an experimental feature that is not yet available on Tezos Mainnet.
The way the DAL works may change significantly before it is generally available.
:::

The Data Availability Layer (DAL) is a companion peer-to-peer network for the Tezos blockchain, designed to provide additional data bandwidth to Smart Rollups.
It allows users to share large amounts of data in a way that is decentralized and permissionless, because anyone can join the network and post and read data on it.

Expand All @@ -21,7 +16,7 @@ You will learn:
- How to host a DAL node
- How to publish data and files with the DAL

Because the DAL is not yet available on Tezos Mainnet, this tutorial uses the [Weeklynet test network](https://teztnets.com/weeklynet-about), which runs on a newer version of the protocol that includes the DAL.
This tutorial uses the [Weeklynet test network](https://teztnets.com/weeklynet-about).
Weeklynet runs just like other Tezos networks like Mainnet and Ghostnet, with its own nodes, bakers, and accusers, so you don't need to run your own nodes and bakers.

See these links for more information about the DAL:
Expand Down
7 changes: 1 addition & 6 deletions docs/tutorials/join-dal-baker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@
title: Join the DAL as a baker, in 5 steps
authors: Tezos core developers
last_update:
date: 7 February 2024
date: 10 June 2024
---

The Tezos data availability layer (DAL) is a key component for the scalability of Tezos.
In a nutshell, the DAL increases the data bandwidth available for Tezos Smart Rollups by providing a peer-to-peer network that they can use to fetch data without compromising security.

:::note Experimental
The data availability layer is an experimental feature that is not yet available on Tezos Mainnet.
The way the DAL works may change significantly before it is generally available.
:::

Just like layer 1, Tezos bakers ensure the security of the DAL.
Bakers not only produce blocks but also attest that other bakers' blocks are valid and properly published on layer 1.
In the same way, bakers attest that data published to the DAL is available.
Expand Down
3 changes: 2 additions & 1 deletion docs/unity/sample-game.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Sample game
authors: Tim McMackin
last_update:
date: 22 May 2024
date: 3 June 2024
---

The sample game for the Unity SDK is a single-player third-person shooter with survival elements.
Expand Down Expand Up @@ -55,6 +55,7 @@ The sample game uses a custom contract, but you can use the SDK's built-in FA2-c
You can view and interact with the contract on a block explorer, such as tzkt.io: https://tzkt.io/KT1TSZfPJ5uZW1GjcnXmvt1npAQ2nh5S1FAj/operations.

- The **Interplanetary File System (IPFS)** stores metadata for the tokens, including pictures and descriptions.
Links in the smart contract point to this metadata.

This diagram shows the basic interaction between these components:

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified static/img/unity/sample-game-architecture-play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/unity/sample-game-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading