Skip to content

Commit

Permalink
docs: update URLs related to zkSync docs (matter-labs#2176)
Browse files Browse the repository at this point in the history
## What ❔

Update URLs pointing to our zksync Docs, most of them are outdated and
using an older URL for docs.zksync.io

## Why ❔

We've removed a lot of older redirects and URLs should reflect the up to
date URL for docs.
  • Loading branch information
itsacoyote authored Jun 13, 2024
1 parent 2488a76 commit 3517ffe
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 43 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ We aim to make it as easy as possible to contribute to the mission. This is stil
and suggestions here too. Some resources to help:

1. [In-repo docs aimed at developers](docs)
2. [zkSync Era docs!](https://era.zksync.io/docs/)
2. [zkSync Era docs!](https://docs.zksync.io)
3. Company links can be found in the [repositories' readme](README.md)

## Code of Conduct
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following questions will be answered by the following resources:
| How can I run the project? | [launch.md](docs/guides/launch.md) |
| What is the logical project structure and architecture? | [architecture.md](docs/guides/architecture.md) |
| Where can I find protocol specs? | [specs.md](docs/specs/README.md) |
| Where can I find developer docs? | [docs](https://era.zksync.io/docs/) |
| Where can I find developer docs? | [docs](https://docs.zksync.io) |

## Policies

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ We truly appreciate efforts to discover and disclose security issues responsibly
## Vulnerabilities

If you'd like to report a security issue in the repositories of matter-labs organization, please proceed to our
[Bug Bounty Program on Immunefi](https://era.zksync.io/docs/reference/troubleshooting/audit-bug-bounty.html#bug-bounty-program).
[Bug Bounty Program on Immunefi](https://docs.zksync.io/build/resources/audit-bug-bounty#bug-bounty-program).

## Other Security Issues

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/advanced/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Now that we know how to bridge tokens back and forth, let's talk about running things on zkSync.

We have a bunch of great tutorials (like this one <https://era.zksync.io/docs/api/hardhat/getting-started.html>) that
We have a bunch of great tutorials (like this one <https://docs.zksync.io/build/tooling/hardhat/getting-started>) that
you can follow to get the exact code & command line calls to create the contracts - so in this article, let's focus on
how things differ between zkSync and Ethereum.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/advanced/how_l2_messaging_works.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ explored how it's ultimately included in the execution results (as part of Query
transmitted to L1 for final verification.

[overview_image]: https://user-images.githubusercontent.com/128217157/257739371-f971c10b-87c7-4ee9-bd0e-731670c616ac.png
[user_docs]: https://era.zksync.io/docs/dev/how-to/send-message-l2-l1.html
[user_docs]: https://code.zksync.io/tutorials/how-to-send-l2-l1-message
[l1_messenger]:
https://github.com/matter-labs/era-system-contracts/blob/f01df555c03860b6093dd669d119eed4d9f8ec99/contracts/L1Messenger.sol#L22
[list_of_opcodes]:
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/external-node/01_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ methods come without any kind of stability guarantees and can be changed or remo

Always refer to the documentation linked above to see the list of stabilized methods in this namespace.

[zks_docs]: https://era.zksync.io/docs/api/api.html#zksync-specific-json-rpc-methods
[zks_docs]: https://docs.zksync.io/build/api-reference/zks-rpc

### `en` namespace

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/external-node/06_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ API. If the root hashes for the latest available L1 batch do not match, the Reor
batch responsible for the divergence. Subsequently, it rolls back the local state and restarts the node. Upon restart,
the EN resumes normal operation.

[finality]: https://era.zksync.io/docs/dev/developer-guides/finality.html
[finality]: https://docs.zksync.io/zk-stack/concepts/finality

## Consistency Checker

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

| Public repository | Description |
| --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [zksync-web-era-docs](https://github.com/matter-labs/zksync-web-era-docs) | [Public zkSync documentation](https://era.zksync.io/docs/), API descriptions etc. |
| [zksync-web-era-docs](https://github.com/matter-labs/zksync-docs) | [Public zkSync documentation](https://docs.zksync.io), API descriptions etc. |
| [zksync-contract-templates](https://github.com/matter-labs/zksync-contract-templates) | Quick contract deployment and testing with tools like Hardhat on Solidity or Vyper |
| [zksync-frontend-templates](https://github.com/matter-labs/zksync-frontend-templates) | Rapid UI development with templates for Vue, React, Next.js, Nuxt, Vite, etc. |
| [zksync-scripting-templates](https://github.com/matter-labs/zksync-scripting-templates) | Automated interactions and advanced zkSync operations using Node.js |
Expand Down
2 changes: 1 addition & 1 deletion docs/specs/l1_smart_contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The admin facet is controlled by two entities:
### MailboxFacet

The facet that handles L2 <-> L1 communication, an overview for which can be found in
[docs](https://era.zksync.io/docs/dev/developer-guides/bridging/l1-l2-interop.html).
[docs](https://docs.zksync.io/build/developer-reference/l1-l2-interoperability).

The Mailbox performs three functions:

Expand Down
2 changes: 1 addition & 1 deletion docs/specs/zk_chains/shared_bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ implemented.

If you want to know more about ZK Chains, check this
[blog post](https://blog.matter-labs.io/introduction-to-hyperchains-fdb33414ead7), or go through
[our docs](https://era.zksync.io/docs/reference/concepts/hyperscaling.html).
[our docs](https://docs.zksync.io/zk-stack/concepts/zk-chains).

### High-level design

Expand Down
2 changes: 1 addition & 1 deletion docs/specs/zk_evm/account_abstraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

One of the other important features of zkSync is the support of account abstraction. It is highly recommended to read
the documentation on our AA protocol here:
[https://era.zksync.io/docs/reference/concepts/account-abstraction.html#introduction](https://era.zksync.io/docs/reference/concepts/account-abstraction.html#introduction)
[https://docs.zksync.io/build/developer-reference/account-abstraction](https://docs.zksync.io/build/developer-reference/account-abstraction)

### Account versioning

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The call type is encoded on the assembly level, so we will describe the common h
distinctions if there are any.

For more information, see the
[zkSync Era documentation](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#call-staticcall-delegatecall).
[zkSync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#call-staticcall-delegatecall).

## [CALL](https://www.evm.codes/#f1?fork=shanghai)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The EVM CREATE instructions are handled similarly.

For more information, see the
[zkSync Era documentation](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#create-create2).
[zkSync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#create-create2).

## [CREATE](https://www.evm.codes/#f0?fork=shanghai)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ is common for Yul and EVMLA representations.

## [CODECOPY](https://www.evm.codes/#38?fork=shanghai)

See [the EraVM docs](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#codecopy).
See [the EraVM docs](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#codecopy).

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/evmla/ethereal_ir/function/block/element/mod.rs#L856).

## [CODESIZE](https://www.evm.codes/#39?fork=shanghai)

See [the EraVM docs](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#codesize).
See [the EraVM docs](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#codesize).

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/evmla/ethereal_ir/function/block/element/mod.rs#L837).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ is common for Yul and EVMLA representations.
## [RETURN](https://www.evm.codes/#f3?fork=shanghai)

This instruction works differently in deploy code. For more information, see
[the zkSync Era documentation](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#return).
[the zkSync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#return-stop).

### LLVM IR

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ LLVM IR codegen references:
The same as [setimmutable](yul.md#setimmutable).

For more information, see the
[zkSync Era documentation](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#setimmutable-loadimmutable).
[zkSync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#setimmutable-loadimmutable).

LLVM IR codegen references:

Expand All @@ -38,7 +38,7 @@ LLVM IR codegen references:
The same as [loadimmutable](yul.md#loadimmutable).

For more information, see the
[zkSync Era documentation](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#setimmutable-loadimmutable).
[zkSync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#setimmutable-loadimmutable).

LLVM IR codegen references:

Expand All @@ -50,7 +50,7 @@ LLVM IR codegen references:
The same as [linkersymbol](yul.md#linkersymbol).

For more information, see the
[zkSync Era documentation](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#libraries).
[zkSync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/libraries).

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/yul/parser/statement/expression/function_call/mod.rs#L956).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ destination. For more information, see
Writes immutables to the auxiliary heap.

For more information, see the
[zkSync Era documentation](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#setimmutable-loadimmutable).
[zkSync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#setimmutable-loadimmutable).

LLVM IR codegen references:

Expand All @@ -54,7 +54,7 @@ Reads immutables from the
[ImmutableSimulator](https://github.com/code-423n4/2023-10-zksync/blob/main/docs/VM%20Section/How%20compiler%20works/system_contracts.md#simulator-of-immutables).

For more information, see the
[zkSync Era documentation](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#setimmutable-loadimmutable).
[zkSync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#setimmutable-loadimmutable).

LLVM IR codegen references:

Expand All @@ -71,7 +71,7 @@ compiler will return the list of deployable libraries not provided with `--libra
like Hardhat to automatically deploy libraries.

For more information, see the
[zkSync Era documentation](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#libraries).
[zkSync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/libraries).

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/yul/parser/statement/expression/function_call/mod.rs#L956).

Expand Down
46 changes: 25 additions & 21 deletions docs/specs/zk_evm/vm_specification/compiler/system_contracts.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# System Contracts

Many EVM instructions require special handling by the
[System Contracts](https://era.zksync.io/docs/reference/architecture/system-contracts.html). Among them are: `ORIGIN`,
`CALLVALUE`, `BALANCE`, `CREATE`, `SHA3`, and others. To see the full detailed list of instructions requiring special
handling, see
Many EVM instructions require special handling by the [System Contracts][docs-system-contracts]. Among them are:
`ORIGIN`, `CALLVALUE`, `BALANCE`, `CREATE`, `SHA3`, and others. To see the full detailed list of instructions requiring
special handling, see
[the EVM instructions reference](https://github.com/code-423n4/2023-10-zksync/blob/main/docs/VM%20Section/How%20compiler%20works/instructions/evm).

## Types of System Contracts

There are several types of System Contracts from the perspective of how they are handled by the zkSync Era compilers:

1. [Environmental data storage](#environmental-data-storage).
Expand Down Expand Up @@ -52,10 +53,8 @@ For reference, see

### Contract Deployer

See [handling CREATE](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#create-create2)
and
[dependency code substitution instructions](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#datasize-dataoffset-datacopy)
on zkSync Era documentation.
See [handling CREATE][docs-create] and [dependency code substitution instructions][docs-data] on zkSync Era
documentation.

For reference, see LLVM IR codegen for
[the deployer call](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/eravm/context/function/runtime/deployer_call.rs)
Expand Down Expand Up @@ -86,9 +85,7 @@ For reference, see

### Simulator of Immutables

See
[handling immutables](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#setimmutable-loadimmutable)
on zkSync Era documentation.
See [handling immutables][docs-immutable] on zkSync Era documentation.

For reference, see LLVM IR codegen for
[instructions for immutables](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/eravm/evm/immutable.rs)
Expand All @@ -109,17 +106,24 @@ For reference, see

## Auxiliary Heap

Both [zksolc](https://era.zksync.io/docs/tools/compiler-toolchain/solidity.html) and
[zkvyper](https://era.zksync.io/docs/tools/compiler-toolchain/vyper.html) compilers for EraVM operate on
[the IR level](https://era.zksync.io/docs/tools/compiler-toolchain/overview.html#ir-compilers), so they cannot control
the heap memory allocator which remains a responsibility of
[the high-level source code compilers](https://era.zksync.io/docs/tools/compiler-toolchain/overview.html#high-level-source-code-compilers)
emitting the IRs.
Both [zksolc][docs-zksolc] and [zkvyper][docs-zkvyper] compilers for EraVM operate on [the IR level][docs-ir], so they
cannot control the heap memory allocator which remains a responsibility of [the high-level source code
compilers][docs-high-level-compilers] emitting the IRs.

However, the are several cases where EraVM needs to allocate memory on the heap and EVM does not. The auxiliary heap is
used for these cases:

1. [Returning immutables](https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#setimmutable-loadimmutable)
from the constructor.
2. Allocating calldata and return data for calling the
[System Contracts](https://era.zksync.io/docs/reference/architecture/system-contracts.html).
1. [Returning immutables][docs-immutable] from the constructor.
2. Allocating calldata and return data for calling the [System Contracts][docs-system-contracts].

[docs-system-contracts]: https://docs.zksync.io/build/developer-reference/era-contracts/system-contracts
[docs-immutable]:
https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#setimmutable-loadimmutable
[docs-zksolc]: https://docs.zksync.io/zk-stack/components/compiler/toolchain/solidity
[docs-zkvyper]: https://docs.zksync.io/zk-stack/components/compiler/toolchain/vyper
[docs-ir]: https://docs.zksync.io/zk-stack/components/compiler/toolchain#ir-compilers
[docs-high-level-compilers]:
https://docs.zksync.io/zk-stack/components/compiler/toolchain#high-level-source-code-compilers
[docs-create]: https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#create-create2
[docs-data]:
https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#datasize-dataoffset-datacopy

0 comments on commit 3517ffe

Please sign in to comment.