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

Updated and simplified info on Smart Rollups #163

Merged
merged 108 commits into from
Jan 19, 2024

Conversation

timothymcmackin
Copy link
Collaborator

@timothymcmackin timothymcmackin commented Nov 14, 2023

Simplified info on Smart Rollups to what makes sense for Tezos developers on docs.tezos.com. Preview: https://docs-staging-git-architecture-overview-smart-rollups-trili-tech.vercel.app/architecture/smart-rollups

The PR includes this new diagram: https://lucid.app/documents/embedded/3953825e-e5aa-43bb-bc43-701bb0ac3b73#

@timothymcmackin timothymcmackin self-assigned this Nov 14, 2023
Copy link

vercel bot commented Nov 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 18, 2024 3:56pm

@timothymcmackin timothymcmackin force-pushed the architecture-overview-smart-rollups branch from 4ef850c to a3ce162 Compare November 16, 2023 18:31
@timothymcmackin timothymcmackin marked this pull request as ready for review November 16, 2023 19:01
@timothymcmackin timothymcmackin requested a review from a team as a code owner November 16, 2023 19:01
@timothymcmackin timothymcmackin changed the title [wip] Updated and simplified info on Smart Rollups Updated and simplified info on Smart Rollups Nov 16, 2023
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.md Outdated Show resolved Hide resolved
@@ -11,11 +11,11 @@ Tezos uses these types of accounts:
These accounts have addresses that start with "tz1", "tz2", "tz3" or "tz4."
Any wallet application or the Octez command-line tool can create implicit accounts.

- Smart contract accounts (also known as _originated accounts_) store immutable code, mutable storage, tez (ꜩ), and tickets.
- Smart contract accounts (a type of _originated account_) store immutable code, mutable storage, tez (ꜩ), and tickets.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this implies that there are other types of originated accounts, which I don't think is true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are Smart Rollup accounts not originated accounts?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As told in a different thread, I don't think they are. If we want to reclassify them as accounts, we have to discuss this in a documentation venue (e.g. EffortDoc).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm removing changes to this file from this PR and I'm working on clarifying accounts and addresses in this pr: #252

## Examples
Smart Rollups play a crucial part in providing high scalability on Tezos.
They handle transactions and logic in a separate environment that doesn't need to follow all of the same rules as the main Tezos network.
For this reason, they are not subject to the same block delays and data space constraints as the main Tezos network.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also a bit misleading.
Rollups by themselves are still subject to the same block delays of the L1 network. In order to be processed, data that allows to retrieve L2 transactions (either directly or by using a Data availability solution, see below) must be posted to the rollup inbox on the L1.

Data space constraints require a data availability solution which is separate from rollups. Smart rollups, however, integrate with two data availability solutions: the Data Availability Layer (DAL) and Data Availability Committees (DACs), the latter via a mechanism called the reveal data channel.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "They handle logic in a separate environment that can run transactions at a much higher rate and can use larger amounts of data than the main Tezos network."

For examples of Smart Rollups, see this repository: https://gitlab.com/tezos/kernel-gallery.
The transactions and logic that Smart Rollups run is called _layer 2_ to differentiate it from the main network, which is called _layer 1_.

The compiled code of a Smart Rollup must be provided publicly, so that anyone can run a Smart Rollup node to execute that code and verify that other nodes are running it correctly, just like anyone can run nodes, bakers, and accusers on layer 1.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In practice, because of the space constraints on the L1, only a small kernel (the installer kernel) is used to originate a rollup. This code is public as it is stored on the L1. The first action of the installer kernel is that of installing a larger kernel, whose code is imported using the reveal data channel. The blockchain itself does not guarantee the availability of this data, and instead it is the responsibility of the originator of the rollup to make it available to rollup operators.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the installer kernel and kernel are too detailed for this intro, so I changed this sentence to:

Anyone can run a node based on a Smart Rollup to execute its code and verify that other nodes are running it correctly, just like anyone can run nodes, bakers, and accusers on layer 1.

The transactions and logic that Smart Rollups run is called _layer 2_ to differentiate it from the main network, which is called _layer 1_.

The compiled code of a Smart Rollup must be provided publicly, so that anyone can run a Smart Rollup node to execute that code and verify that other nodes are running it correctly, just like anyone can run nodes, bakers, and accusers on layer 1.
This code, called the _kernel_, must behave in a deterministic manner and according to a given semantics, which guarantees that results are reproducible by any rollup node with the same kernel.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deterministic execution is ensured by the reference PVM, so it is virtually impossible to write a kernel that behaves non-deterministically

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to:

This code, called the kernel, runs in a deterministic manner...


- Smart Rollups allow you to run large amounts of processing and manipulate large amounts of data that would be too slow or expensive to run on layer 1.

- Smart Rollups are not constrained to the layer 1 block baking rate and therefore can run far more transactions per second than layer 1.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not entirely true. Without a "sequencer", a rollup receives input by following L1 blocks and hence are subject to the same baking rate.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But they can run a lot of logic in between blocks, so they aren't constrained by putting every transaction into a block. Is there a way to explain how/why L2 nodes can run "far more TPS" or should I simplify this to say "Smart Rollups can run far more transactions per second..."?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to "Smart Rollups can run far more transactions per second than layer 1."

docs/architecture/smart-rollups.mdx Show resolved Hide resolved
docs/architecture/smart-rollups.mdx Outdated Show resolved Hide resolved
docs/architecture/smart-rollups.mdx Outdated Show resolved Hide resolved
@timothymcmackin timothymcmackin merged commit 627d0b5 into staging Jan 19, 2024
4 checks passed
@timothymcmackin timothymcmackin deleted the architecture-overview-smart-rollups branch January 19, 2024 15:00
Copy link
Collaborator

@NicNomadic NicNomadic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants