Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

docs: add tx filterer docs, fix minor mistakes #996

Closed
wants to merge 6 commits into from
Closed
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
> [!WARNING]
> zksync-web-era-docs will be archived shortly!
> zksync-web-era-docs will be archived shortly!
> Find the latest at [zksync-docs](https://github.com/matter-labs/zksync-docs)
>
>
> For tutorials and guides, check out the [Community Code](https://github.com/zkSync-Community-Hub/community-code) repo.

# zkSync Documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/sidebar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export const enSidebar = sidebar({
link: "/zk-stack/concepts/data-availability/overview.md"
},
{
text: "Recreating State form L1",
text: "Recreating State from L1",
link: "/zk-stack/concepts/data-availability/recreate-l2-state-from-l1-state-diffs.md"
},
{
Expand Down
10 changes: 10 additions & 0 deletions docs/build/developer-reference/l1-l2-interop.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ L1 to L2 communication is governed by the [`IZkSync.sol`](https://github.com/mat
- If you prefer to learn-by-doing, the [cross chain governance tutorial](../tutorials/smart-contract-development/cross-chain-tutorial.md) is a practical example of layer interoperability.
:::

#### L1 to L2 transaction filtering

A hyperchain operator can filter L1→L2 transactions coming through the Diamond proxy. It is achieved by having an
address of the special contract, responsible for transaction filtering, in the state transition storage. If the filterer
exists, it is being called in the [Mailbox facet](https://github.com/matter-labs/era-contracts/blob/994897b14eb1d8e77c809da2db3379e7b58125b5/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol#L243)
with the tx details and has to return whether the transaction can be executed or not. If you want to use this feature,
you have to deploy a contract that implements the [`ITransactionFilterer` interface](https://github.com/matter-labs/era-contracts/blob/994897b14eb1d8e77c809da2db3379e7b58125b5/l1-contracts/contracts/state-transition/chain-interfaces/ITransactionFilterer.sol#L8)
and set its address in the admin facet's [`setTransactionFilterer`](https://github.com/matter-labs/era-contracts/blob/994897b14eb1d8e77c809da2db3379e7b58125b5/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol#L102)
function. The same setter can be used to remove the filterer, it has to be called with the `0` address.

### Gas estimation

The SDK processes gas estimation for transactions implicitly. However, it is also possible to implement the gas estimation processes explicitly.
Expand Down
2 changes: 1 addition & 1 deletion docs/zk-stack/components/shared-bridges.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ be able to leverage them when available).
ZK Chain.
- `Facets` and `Verifier` are shared across chains that relies on the same ST: `Base`, `Executor` , `Getters`, `Admin`
, `Mailbox.`The `Verifier` is the contract that actually verifies the proof, and is called by the `Executor`.
- Upgrade Mechanism The system requires all chains to be up-to-date with the latest implementation, so whenever an
- `Upgrade Mechanism` The system requires all chains to be up-to-date with the latest implementation, so whenever an
update is needed, we have to “force” each chain to update, but due to decentralization, we have to give each chain a
time frame (more information in the
[Upgrade Mechanism](https://www.notion.so/ZK-Stack-shared-bridge-alpha-version-a37c4746f8b54fb899d67e474bfac3bb?pvs=21)
Expand Down
4 changes: 2 additions & 2 deletions docs/zk-stack/components/smart-contracts/smart-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Implementation detail - function returns a magic value just like it is designed

Bridges are completely separate contracts from the Diamond. They are a wrapper for L1 <-> L2 communication on contracts
on both L1 and L2. Upon locking assets on L1, a request is sent to mint these bridged assets on L2. Upon burning assets
on L2, a request is sent to unlock them on L2.
on L2, a request is sent to unlock them on L1.

Unlike the native Ether bridging, all other assets can be bridged by the custom implementation relying on the trustless
L1 <-> L2 communication.
Expand Down Expand Up @@ -288,4 +288,4 @@ struct Deposit {
```

Currently, the limit is used only for blocking deposits of the specific token (turning on the limitation and setting the
limit to zero). And on the near future, this functionality will be completely removed.
limit to zero). And in the near future, this functionality will be completely removed.
Loading