Skip to content

Commit

Permalink
fix(zkstack_cli): Apply zk_toolbox commands redesign (#239)
Browse files Browse the repository at this point in the history
<!--

Thank you for contributing to the ZKsync Docs!

Before submitting the PR, please make sure you do the following:

- Update your PR title to follow [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/)
- Read the [Contributing
Guide](https://github.com/matter-labs/zksync-docs/blob/main/CONTRIBUTING.md).
- Understand our [Code of
Conduct](https://github.com/matter-labs/zksync-docs/blob/main/CODE_OF_CONDUCT.md)
- Please delete any unused parts of the template when submitting your PR

-->

# Description

<!-- Please describe what are the changes and what they are solving for
in this PR. -->
Apply zk_toolbox commands redesign.

## Linked Issues

<!-- If you have any issues this PR is related to, link them here. -->
<!--
Check out
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
on how to automate linking a GitHub Issue to a PR.
-->

## Additional context

---------

Co-authored-by: Antonio <[email protected]>
  • Loading branch information
manuelmauro and uF4No authored Oct 14, 2024
1 parent 051784c commit e6836d5
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 32 deletions.
33 changes: 14 additions & 19 deletions content/10.zk-stack/20.running-a-zk-chain/10.quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ title: Getting Started with ZK Stack
description: Quickstart - Getting Started with ZK Stack
---

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
ZK Stack is still under development. We advise you to only use for local and testnet deployments.
::

## Development dependencies

Ensure you have followed [these instructions](https://github.com/matter-labs/zksync-era/blob/main/docs/guides/setup-dev.md)
Expand All @@ -20,22 +16,22 @@ using ZK Stack. If you just want play around with a pre-built ZKsync chain, you
Learn more on [zksync-cli](/build/zksync-cli).
::

### Install ZK Inception
### Install ZK Stack CLI

ZK Inception facilitates the creation and management of an Elastic Chain ecosystem and ZK chains using ZK Stack. All commands are interactive,
but you can also pass all necessary arguments via the command line. See here for [full instructions for ZK Inception](https://github.com/matter-labs/zksync-era/tree/main/zk_toolbox).
ZK Stack CLI facilitates the creation and management of an Elastic Chain ecosystem and ZK chains using ZK Stack. All commands are interactive,
but you can also pass all necessary arguments via the command line. See here for [full instructions for ZK Stack CLI](https://github.com/matter-labs/zksync-era/tree/main/zkstack_cli).

1. Install zk_inception from git:
1. Install zkstack from git:

```bash
cargo install --git https://github.com/matter-labs/zksync-era/ --locked zk_inception --force
cargo install --git https://github.com/matter-labs/zksync-era/ --locked zkstack --force
```

Note: Foundry is utilized for deploying smart contracts with ZK Inception. For commands related to deployment, you can pass flags for Foundry integration.
Note: Foundry is utilized for deploying smart contracts with ZK Stack CLI. For commands related to deployment, you can pass flags for Foundry integration.
If you have previously installed `zksync-foundry` and have issues with this quickstart, try installing the standard latest version of foundry.

::callout{icon="i-heroicons-light-bulb"}
You can find a full reference for the `zk_inception` CLI in the [`zksync-era` repo](https://github.com/matter-labs/zksync-era/tree/main/zk_toolbox/crates/zk_inception).
You can find a full reference for the `zkstack` CLI in the [`zksync-era` repo](https://github.com/matter-labs/zksync-era/tree/main/zkstack_cli/crates/zkstack).
::

### Setup ecosystem
Expand All @@ -46,7 +42,7 @@ that connects all ZK chains, like the BridgeHub, ZK Router, and state transition
1. To create a ZK Stack project, you must first create the Elastic Chain ecosystem.

```bash
zk_inception ecosystem create
zkstack ecosystem create
```

- Give the ecosystem a name, for example "ZKsync Elastic Chain".
Expand All @@ -73,8 +69,7 @@ that connects all ZK chains, like the BridgeHub, ZK Router, and state transition
- To start the database & containers, make sure you have Docker running. At this point the Elastic Chain ecosystem will be created.
- Note: If you chose to not start database & L1 containers after creating the ecosystem, you can later run
`zk_inception containers`
- Note: If you chose to not start database & L1 containers after creating the ecosystem, you can later run `zkstack containers`
2. All subsequent commands should be executed from within the ecosystem folder you created:
Expand All @@ -85,7 +80,7 @@ that connects all ZK chains, like the BridgeHub, ZK Router, and state transition
3. If the ecosystem has never been deployed before, initialization is required:
```bash
zk_inception ecosystem init
zkstack ecosystem init
```
- Follow the wizard to choose options for your deployment. For default options, you can simply use `--dev` flag.
Expand All @@ -101,13 +96,13 @@ chains running on the same Elastic Chain ecosystem. You can create additional ch
1. To create additional chains:
```bash
zk_inception chain create
zkstack chain create
```
2. Once created, contracts for the ZK chain must be deployed:
```bash
zk_inception chain init
zkstack chain init
```
Initialization utilizes the ecosystem's governance to register it in the BridgeHub.
Expand All @@ -116,15 +111,15 @@ chains running on the same Elastic Chain ecosystem. You can create additional ch
override it with another one by using the `--chain <name>` flag. Or to change the default ZK chain, use:
```bash
zk_inception ecosystem change-default-chain
zkstack ecosystem change-default-chain
```
### Running the ZK chain
1. For running the ZK chain:
```bash
zk_inception server
zkstack server
```
If you setup multiple ZK chains, you can specify the chain you are running by providing `--chain <chain_name>` argument.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description:
The first step to start interacting with your ZK chain is to fund an account (or a few).
This means you need some funds on the base layer.

During the `zk_inception ecosystem create` configuration, you have a choice of what base layer to deploy the ZK chain onto:
During the `zkstack ecosystem create` configuration, you have a choice of what base layer to deploy the ZK chain onto:
a local reth node, or an Ethereum network (e.g., Sepolia).

### Base layer is the local reth node
Expand Down Expand Up @@ -74,7 +74,7 @@ A [free open source block explorer](https://github.com/matter-labs/block-explore
You can run all components together locally and connect to your ZK chain.

Make sure you have your [zksync-era](https://github.com/matter-labs/zksync-era) repo set up locally and
the `zk_inception server` is running.
the `zkstack server` is running.

### Running block explorer locally

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To run your custom ZK chain again after setting up and shutting it down, follow
`<YOUR_ECOSYSTEM_DIRECTORY>/chains/<YOUR_CHAIN_NAME>/ZkStack.yaml` under `base_token.address`.
- Send ERC20 tokens to both the ecosystem and chain governor addresses on the L1.
1. Initialize the chain in the ecosystem
1. Start the chain server with `zk_inception server`.
1. Start the chain server with `zkstack server`.
1. Bridge ERC20 tokens from the L1 to L2.
## Bridging ETH to your chain
Expand Down
2 changes: 1 addition & 1 deletion content/10.zk-stack/20.running-a-zk-chain/40.proving.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description:
With the default configuration, your ZK chain is not running a prover, and has a DummyExecutor contract,
which mainly “accepts” that a batch is executed without proof. This enables you to test it with much lower hardware requirements.

To enable the prover, run the `zk_inception prover init` command. It will guide you through the necessary configuration.
To enable the prover, run the `zkstack prover init` command. It will guide you through the necessary configuration.

There are two options for running the Boojum prover: in GPU, or in CPU.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Configurations
description:
---

Running the `zk_inception ecosystem create` CLI
Running the `zkstack ecosystem create` CLI
will generate an ecosystem folder that contains the configurations and more for your ecosystem and its chains.
Understanding the configuration files for your chain and ecosystem is important for understanding how to interact with and customize your chain and environment.

Expand Down
4 changes: 0 additions & 4 deletions content/10.zk-stack/20.running-a-zk-chain/60.production.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
title: In Production
---

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
ZK Stack is still under development. We advise you to only use for local and testnet deployments.
::

## Deploying to a non-local environment

The process to deploy to a non local environment is pretty similar to the local one.
Expand Down
4 changes: 0 additions & 4 deletions content/10.zk-stack/20.running-a-zk-chain/70.raas.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ title: Rollup as a Service
description:
---

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
ZK Stack is still under development. We advise you to only use for local and testnet deployments.
::

## Deploying and running using a Rollup as a Service provider

Looking to deploy a ZK Stack chain but worried about complexities?
Expand Down
1 change: 1 addition & 0 deletions cspell-config/cspell-zksync.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ZK Chain
!ZKChain
!zkStack
-zkstack-
zkstack
ZK Stack
zksync
zksync-cli
Expand Down

0 comments on commit e6836d5

Please sign in to comment.