Skip to content

Commit 0e4ec82

Browse files
zk-Lumipopzxc
andauthored
feat: add explorer + portal + prover to zk chain quickstart (#287)
<!-- 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 @itsacoyote @MexicanAce - Updated the explorer and portal usage to use the new zkstack cli commands. - Updated zkstack prover guide to use the new zkstack cli commands. - Moved "validium in zk stack" higher in dropdown instead of being last. - Updated some inconsistent titles to match format of others. Possibly a bit OCD of me to do this, but was playing with zkstack today and they stayed in my mind bothering me hahahah 😉 <!-- Please describe what are the changes and what they are solving for in this PR. --> ## 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: Igor Aleksanov <[email protected]>
1 parent e3cc9aa commit 0e4ec82

File tree

5 files changed

+59
-51
lines changed

5 files changed

+59
-51
lines changed
Lines changed: 29 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Using a local ZK chain
2+
title: Using a local ZK Chain
33
description:
44
---
55

@@ -26,12 +26,12 @@ or any other wallet with funds, to deposit into your ZK chain via the bridge.
2626
Once you have the accounts with funds on the L1 base layer, you can do a deposit via the bridge to your ZK chain,
2727
and start interacting with your ZK chain using the L2 funded account.
2828

29-
## Using your ZK chain RPC
29+
## Using your chain RPC
3030

31-
Your server contains both HTTPS as well as WebSocket (WS) services that are fully web3 compatible (and contain some extra ZK Stack functionalities).
31+
Your server contains both HTTPS as well as WebSocket (WS) RPC services that are fully web3 compatible (and contain some extra ZK Stack functionalities).
3232
Learn more on the [API reference page](/zksync-protocol/api).
3333

34-
### Using zksync-cli
34+
## Using zksync-cli
3535

3636
[ZKsync CLI](/zksync-era/tooling/zksync-cli) allows you to easily interact and develop applications on your ZK chain.
3737
When executing any command with ZKsync CLI, you can specify RPC urls for both L1 and L2.
@@ -44,73 +44,57 @@ zksync-cli bridge deposit --rpc=http://localhost:3050 --l1-rpc=http://localhost:
4444

4545
You can save the chain configurations for your ZK chain with ZKsync CLI by [adding a new configuration](/zksync-era/tooling/zksync-cli/configuring-chains).
4646

47-
## Using the dApp Portal
47+
## Using the Portal
4848

49-
The [dApp Portal](https://github.com/matter-labs/dapp-portal) module allows you to:
49+
The [Portal](https://github.com/matter-labs/dapp-portal) module is a web-app that allows you to:
5050

5151
- Bridge & transfer tokens to your ZK chain.
5252
- View balances.
5353
- Add contacts for quick and easy access.
5454

55-
You can run the Portal module locally, and point it to your ZK chain configuration. It comes with scripts that help
56-
pull the ZK chain configuration from your zksync-era repo and adapt it to portal needs. Learn more
57-
on GitHub in the [dApp Portal project](https://github.com/matter-labs/dapp-portal). An example command would look like:
55+
Once you have at least one chain initialized, you can run the portal app locally:
5856

5957
```bash
60-
npm run hyperchain:configure ../zksync-era
61-
npm run dev:node:hyperchain
58+
zkstack portal
6259
```
6360

64-
You can now navigate to the displayed Portal URL (typically <http://localhost:3000>).
61+
This command will start the dockerized portal app using configuration from `apps/portal.config.json` file inside your
62+
ecosystem directory. You can edit this file to configure the portal app if needed.
6563

66-
### Using Block Explorer
64+
You can now navigate to the portal web-app. By default, portal frontend starts on
65+
`http://localhost:3030`, you can configure the port in `apps.yaml` file.
6766

68-
A [free open source block explorer](https://github.com/matter-labs/block-explorer) is available for your ZK chain. The block explorer contains three components
67+
## Using a Block Explorer
6968

70-
- [Worker](https://github.com/matter-labs/block-explorer/tree/main/packages/worker)
71-
- [API](https://github.com/matter-labs/block-explorer/tree/main/packages/api)
72-
- [App](https://github.com/matter-labs/block-explorer/tree/main/packages/app)
69+
A block explorer is a web-app that lets you view and inspect transactions, blocks,
70+
contracts and more. A [free open source block explorer](https://github.com/matter-labs/block-explorer) is available for your ZK chain.
7371

74-
You can run all components together locally and connect to your ZK chain.
75-
76-
Make sure you have your [zksync-era](https://github.com/matter-labs/zksync-era) repo set up locally and
77-
the `zkstack server` is running.
78-
79-
### Running block explorer locally
80-
81-
#### Install block explorer
82-
83-
Clone & install the block explorer repository in any folder:
72+
First, each chain should be initialized:
8473

8574
```bash
86-
git clone https://github.com/matter-labs/block-explorer.git
87-
cd block-explorer
88-
npm install
75+
zkstack explorer init
8976
```
9077

91-
#### Setting up env variables
78+
This command creates a database to store explorer data and generates a docker compose file with explorer services
79+
(`explorer-docker-compose.yml`).
9280

93-
Next you need to set up all the necessary environment and configuration files with your ZK chain settings.
94-
You can use the available npm script to set them up:
81+
Next, for each chain you want to have an explorer, you need to start its backend services:
9582

9683
```bash
97-
npm run hyperchain:configure
84+
zkstack explorer backend --chain <chain_name>
9885
```
9986

100-
#### Run block explorer
87+
This command uses previously created docker compose file to start the services (api, data fetcher, worker) required for
88+
the explorer.
10189

102-
Afterwards you can run the block explorer:
103-
104-
```bash
105-
# if you are running block explorer for the first time
106-
npm run db:create
107-
```
90+
Finally, you can run the explorer app:
10891

10992
```bash
110-
npm run dev
93+
zkstack explorer run
11194
```
11295

113-
#### Verify block explorer is up and running
96+
This command will start the dockerized explorer app using configuration from `apps/explorer.config.json` file inside
97+
your ecosystem directory. You can edit this file to configure the app if needed.
11498

115-
By default, you can access the front-end `App` at <http://localhost:3010> in your browser. The `API` is
116-
available by default at <http://localhost:3020>, `Worker` at <http://localhost:3001> and `Data Fetcher` at <http://localhost:3040>.
99+
You can now navigate to the explorer web-app. By default, explorer frontend starts on
100+
`http://localhost:3010`, you can configure the port in `apps.yaml` file.
File renamed without changes.

content/10.zk-stack/20.running/40.proving.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,37 @@ description:
88
With the default configuration, your ZK chain is not running a prover, and has a DummyExecutor contract,
99
which mainly “accepts” that a batch is executed without proof. This enables you to test it with much lower hardware requirements.
1010

11-
To enable the prover, run the `zkstack prover init` command. It will guide you through the necessary configuration.
12-
13-
There are two options for running the Boojum prover: in GPU, or in CPU.
11+
When enabling the Boojum prover, there are two options for running it: in GPU, or in CPU.
1412

1513
::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
1614
**Running a prover is not required** for deploying a testnet. The requirements below are only necessary if you want to enable the prover.
1715
::
1816

19-
### Requirements for GPU Prover
17+
### Prover dependencies
18+
19+
Ensure you have installed:
20+
21+
- [gcloud](https://cloud.google.com/sdk/docs/install)
22+
- [wget](https://www.gnu.org/software/wget/)
23+
- [cmake](https://apt.kitware.com/)
24+
- [nvcc (CUDA toolkit)](https://developer.nvidia.com/cuda-downloads)
25+
26+
Refer to the [prover docs](https://github.com/matter-labs/zksync-era/blob/main/prover/docs/02_setup.md) for more
27+
information.
28+
29+
### Running the prover
30+
31+
To initialize the prover, first use the init command:
32+
33+
`zkstack prover init`
34+
35+
It will guide you through the necessary configuration.
36+
37+
Then to run the prover:
38+
39+
`zkstack prover run`
40+
41+
### Requirements for GPU prover
2042

2143
The docker compose file assumes you will be running all components in the same machine. The current minimum requirements for a low TPS scenario are:
2244

@@ -25,7 +47,7 @@ The docker compose file assumes you will be running all components in the same m
2547
- 64 GB of RAM
2648
- 300 GB of Disk Space (SSD preferred)
2749

28-
### Requirements for CPU Prover
50+
### Requirements for CPU prover
2951

3052
The docker compose file assumes you will be running all components in the same machine.
3153
The current minimum requirements for a low TPS scenario are:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
title: Running a ZK chain
1+
title: Running a ZK Chain

cspell-config/cspell-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,5 @@ applyl
115115
zbin
116116
scaleb
117117
chainid
118+
nvcc
119+
CUDA

0 commit comments

Comments
 (0)