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

new structure #1016

Merged
merged 3 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Documentation index
# ZK Stack contracts specs

1. [Introduction](./introduction.md)
1. [Bridgehub](./bridgehub/README.md)
1. [ZKChain](./zk_chain/README.md)
1. [L1 Contracts](./l1_smart_contracts.md)


## Structure of the repo

1.
1. [System contracts/bootloader description](./other/System%20contracts%20bootloader%20description.md).
![Reading order](./img/reading_order.png)
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
We want to create a system where:

- ZK chains should be launched permissionlessly within the ecosystem.
- Hyperbridges should enable unified liquidity for assets across the ecosystem.
- Interop is seamless and enables unified liquidity for assets across the ecosystem.
- Multi-chain smart contracts need to be easy to develop, which means easy access to traditional bridges, and other supporting architecture.


### Images:

![Contracts](./L1%20smart%20contracts/gateway-architecture.png)
![Contracts](./img/gateway-architecture.png)

> This document will not cover how ZK Gateway works, you can check it out in a separate doc (TODO: link).

Expand Down Expand Up @@ -91,7 +91,7 @@
In the first release, each chain will be an instance of zkSync Era and so the upgrade process of each individual ST will be similar to that of zkSync Era.

1. Firstly, the governance of the CTM will publish the server (including sequencer, prover, etc) that support the new version . This is done offchain. Enough time should be given to various zkStack devs to update their version.
2. The governance of the CTM will publish the upgrade onchain by atomatically executing the following three transactions:

Check warning on line 94 in docs/bridging/bridgehub/l1_ecosystem_contracts.md

View workflow job for this annotation

GitHub Actions / typos

"atomatically" should be "automatically".

- `setChainCreationParams` ⇒ to ensure that new chains will be created with the version
- `setValidatorTimelock` (if needed) ⇒ to ensure that the new chains will use the new validator timelock right-away
Expand Down Expand Up @@ -178,13 +178,13 @@

For the purpose of this document, it is enough to treat the Asset Router as a blackbox that is responsible for processing escrowing funds on the source chain and minting them on the destination chain.

> For those that are aware of the [previous zkSync architecture](https://github.com/code-423n4/2024-03-zksync/blob/main/docs/Smart%20contract%20Section/L1%20ecosystem%20contracts.md), its role is similar to L1SharedBridge that we had before. Note, however, that it is a different contract with much enhanced functionality. Also, note that the L1SharedBridge will NOT be upgraded to the L1AssetRouter. For more detials about migration, please check out the migration doc (FIXME: migration doc).

Check warning on line 181 in docs/bridging/bridgehub/l1_ecosystem_contracts.md

View workflow job for this annotation

GitHub Actions / typos

"detials" should be "details".

### Handling base tokens

On L2, *a base token* (not to be consfused with a *native token*, i.e. an ERC20 token with a main contract on the chain) is the one that is used for `msg.value` and it is managed at `L2BaseToken` system contract. We need its logic to be strictly defined in `L2BaseToken`, since the base asset is expected to behave the exactly the same as ether on EVM. For now this token contract does not support base minting and burning of the asset, nor further customization.

In other words, in the current release base assets can only be transfered through `msg.value`. They can also only be minted when they are backed 1-1 on L1.

Check warning on line 187 in docs/bridging/bridgehub/l1_ecosystem_contracts.md

View workflow job for this annotation

GitHub Actions / typos

"transfered" should be "transferred".

### **L1→L2 communication**

Expand Down Expand Up @@ -300,7 +300,7 @@
1. After some time, the corresponding L1→L2 is created.
2. The L2AssetRouter will receive the message and re-route it to the asset handler of the bridged token. To read more about how it works, check out the custom asset bridging documentation (FIXME: link).

***Diagram of a depositing ETH onto a chain with USDC as the baseToken. Note that some contract calls (like `USDC.transerFrom` are omitted for the sake of consiceness):***

Check warning on line 303 in docs/bridging/bridgehub/l1_ecosystem_contracts.md

View workflow job for this annotation

GitHub Actions / typos

"transer" should be "transfer".

![requestL2TransactionTwoBridges (SharedBridge) (1).png](./L1%20smart%20contracts/requestL2TransactionTwoBridges_depositEthToUSDC.png)

Expand Down
Empty file.
Empty file.
Binary file added docs/img/reading_order.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/upgrades/gateway_upgrade/upgrade_process.md

This file was deleted.

Loading