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

feat: added raas quickstart and refactored zk stack page #993

Merged
merged 6 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
28 changes: 24 additions & 4 deletions docs/.vuepress/sidebar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,14 +935,34 @@ export const enSidebar = sidebar({
text: "Running a Hyperchain",
collapsible: true,
children: [
{
text: "Overview",
link: "/zk-stack/running-a-hyperchain/"
},
{
text: "Locally",
zk-Lumi marked this conversation as resolved.
Show resolved Hide resolved
link: "/zk-stack/running-a-hyperchain/locally.md"
collapsible: true,
children: [
{
text: "Local",
link: "/zk-stack/running-a-hyperchain/locally/local.html",
},
{
text: "In Production",
link: "/zk-stack/running-a-hyperchain/locally/production.md"
}
]
},
{
text: "In Production",
link: "/zk-stack/running-a-hyperchain/production.md"
}
text: "Rollup As A Service",
zk-Lumi marked this conversation as resolved.
Show resolved Hide resolved
collapsible: true,
children: [
{
text: "RAAS",
zk-Lumi marked this conversation as resolved.
Show resolved Hide resolved
link: "/zk-stack/running-a-hyperchain/raas/raas.html",
},
]
},
]
},
],
Expand Down
32 changes: 29 additions & 3 deletions docs/zk-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ head:
<section>
<div class="card-container">
<RouterLink
to="/zk-stack/running-a-hyperchain/locally"
to="/zk-stack/running-a-hyperchain/"
class="card"
>
<img
src="/images/landing/run-a-hyperchain.png"
alt="zkSync ERA documentation"
alt="Run a ZK Stack Hyperchain"
/>
<div class="content">
<h3>Run a Hyperchain</h3>
Expand All @@ -41,12 +41,38 @@ head:
>
<img
src="/images/landing/prover.png"
alt="zkSync ERA documentation"
alt="zkSync Boojum Prover"
>
<div class="content">
<h3>Prover</h3>
<p>Go deep on the cryptography of our state of the art prover, Boojum.</p>
</div>
</RouterLink>
<RouterLink
to="/zk-stack/components/overview.html"
class="card"
>
<img
src="/images/landing/run-a-node.png"
alt="ZK Stack Components"
/>
<div class="content">
<h3>Components</h3>
<p>Explore components of the ZK Stack framework.</p>
</div>
</RouterLink>
<RouterLink
to="/zk-stack/concepts/overview.html"
class="card"
>
<img
src="/images/landing/hyperchain.png"
alt="ZK Stack Concepts"
/>
<div class="content">
<h3>Concepts</h3>
<p>Explore the underlying concepts of the ZK Stack framework.</p>
</div>
</RouterLink>
</div>
</section>
39 changes: 39 additions & 0 deletions docs/zk-stack/running-a-hyperchain/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
head:
- - meta
- name: "twitter:title"
content: Run a Hyperchain | zkSync Docs
---

# Run a Hyperchain

<section>
<div class="card-container">
<RouterLink
to="/zk-stack/running-a-hyperchain/locally/local"
class="card"
>
<img
src="/images/landing/run-a-hyperchain.png"
alt="Deploying and running a ZK Stack hyperchain"
>
<div class="content">
<h3>Locally</h3>
<p>Deploying and running a hyperchain locally on your own machine.</p>
</div>
</RouterLink>
<RouterLink
to="/zk-stack/running-a-hyperchain/raas/raas"
class="card"
>
<img
src="/images/landing/run-a-hyperchain.png"
alt="Deploying and running a ZK Stack hyperchain via RAAS (Rollup As A Service)"
/>
<div class="content">
<h3>Rollup As A Service</h3>
<p>Deploying and running a hyperchain through a RAAS (Rollup As A Service Provider).</p>
</div>
</RouterLink>
</div>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
head:
- - meta
- name: "twitter:title"
content: Deploying Locally | zkSync Docs
content: Deploying ZK Stack Hyperchain Locally | zkSync Docs
---

# Getting Started with ZK Stack
Expand Down Expand Up @@ -51,7 +51,7 @@ zk

:::warning

The commands above are not just running docker containers, but are actually building the code from the repo to spin up your hyperchain. For this reason the process might take some time. If you just want to run docker containers to play around with a zkSync chain, you can use `npx zksync-cli dev`. Learn more [here](../../build/tooling/zksync-cli/getting-started.md).
The commands above are not just running docker containers, but are actually building the code from the repo to spin up your hyperchain. For this reason the process might take some time. If you just want to run docker containers to play around with a zkSync chain, you can use `npx zksync-cli dev`. Learn more [here](../../../build/tooling/zksync-cli/getting-started.md).
:::

### Your hyperchain is now deployed
Expand Down Expand Up @@ -86,7 +86,7 @@ Once you have the accounts with funds on the L1 base layer, you can do a deposit

### Using your hyperchain RPC

Your server contains both HTTPS as well as WebSocket (WS) services that are fully web3 compatible (and contain some extra ZK Stack functionalities). Learn more about it [here](../../build/api.md).
Your server contains both HTTPS as well as WebSocket (WS) services that are fully web3 compatible (and contain some extra ZK Stack functionalities). Learn more about it [here](../../../build/api.md).

### Using [zksync-cli](https://github.com/matter-labs/zksync-cli)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
head:
- - meta
- name: "twitter:title"
content: Deploying to a Non-Local Environment | zkSync Docs
content: Deploying ZK Stack Hyperchain to a Non-Local Environment | zkSync Docs
---

# Deploying to a Non-Local Environment
Expand Down
90 changes: 90 additions & 0 deletions docs/zk-stack/running-a-hyperchain/raas/raas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
head:
- - meta
- name: "twitter:title"
content: Deploying ZK Stack Hyperchain Via RAAS | zkSync Docs
---

# Deploy Hyperchain Using RAAS

:::warning

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? RAAS providers are here to simplify the process! Providers offer scalable and secure nodes, and may provide quick and user-friendly interfaces, allowing you to deploy your ZK Stack chain with ease and efficiency. Experience the seamless integration of advanced blockchain technology without the hassle. Get started today and revolutionise your product with the power of RAAS and ZK Stack!
zk-Lumi marked this conversation as resolved.
Show resolved Hide resolved

Use RAAS in to improve scalability, reduce costs, access specialized services, speed up development, enhance interoperability, and maintain flexibility in an ever-evolving technological landscape.

The list of RAAS providers you can use to deploy and customise their your hyperchain:

<!-- * [Caldera](https://www.caldera.xyz/) -->

- [Zeeve](https://www.zeeve.io/appchains/zksync-hyperchains-zkrollups/)

- [Ankr](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/ankrpbc1684783099666.ankr_appchains?tab=Overview/)

- [AltLayer](https://altlayer.io/raas)

- [Magic](https://magic.link/docs/blockchains/other-chains/evm/zksync)

- [Luganodes](https://www.luganodes.com/product/zkraas/)

## Using your hyperchain
zk-Lumi marked this conversation as resolved.
Show resolved Hide resolved

### Using RAAS Dashboard

Some Rollup-As-A-Service providers provide a simple user friendly dashboard for managing & monitoring your hyperchain. If this is the case, you can likely manage most of the settings directly there.

### Funding accounts

#### Base layer is the local geth node ([@matterlabs/geth:latest](https://hub.docker.com/r/matterlabs/geth))

- If you chose to deploy your hyperchain as an instance on the server on local geth node, and your RAAS provider did not prefund the hyperchain, you will have a set of addresses that have 100 ETH each. You can find the list [here](https://github.com/matter-labs/local-setup/blob/main/rich-wallets.json) and use these addresses to deposit into your hyperchain via the bridge.

#### Base layer is an Ethereum network (e.g., Sepolia)

- If you chose to deploy your hyperchain as an instance on an Ethereum network (e.g., Sepolia), you need to have an account on the base layer with ETH. You can use the deployer, governor, or operator wallets provided by your RAAS or setup manually setup during the configuration, or any other one you have funds on, to deposit into your hyperchain via the bridge.

Once you have the accounts with funds on the L1 base layer, you can do a deposit via the bridge to your hyperchain, and any further interactions with your hyperchain.

### Using your hyperchain RPC

Your RAAS will either provide external RPC nodes, or your server contains them. Both HTTPS as well as WebSocket (WS) services are provided that are fully web3 compatible (and contain some extra ZK Stack functionalities). Learn more about it [here](../../../build/api.md).

### Using [zksync-cli](https://github.com/matter-labs/zksync-cli)

zkSync CLI allows you to easily interact and develop applications on your hyperchain. When executing any command with zksync-cli, you can specify RPC urls provided by the RAAS provider for both L1 and L2. An example deposit command via the bridge would look like:

```bash
npx zksync-cli bridge deposit --rpc=http://localhost:3050 --l1-rpc=http://localhost:8545 --zeek
```

### Using [Portal](https://github.com/matter-labs/dapp-portal)

The dApp Portal module allows you to:

- View balances, transfer and bridge tokens to your hyperchain.
- Add contacts for quick and easy access.

Your RAAS provider likely gave you the option to setup the Portal module during the hyperchain configuration.

If you chose this option, you can navigate to the displayed Portal URL provided by the RAAS.

If did not choose this option but wish to enable it later, you can use the RAAS dashboard, or contact your provide, or follow the guide [here](../locally/local.md#using-portal) to setup the Portal module for your server.

### Using [Block Explorer](https://github.com/matter-labs/block-explorer)

A block explorer was likely setup during configuration by your RAAS, and now running.

The RAAS provider should have provided you with links to access front-end `App` in your browser, `API`, `Worker`, and `Data Fetcher`.

If a block explorer was not provided, you can follow the guide [here](../locally/local.md#using-block-explorer) to setup the open source explorer for your server.

## Addendum

- If you make changes to any contract, you can always deploy a new hyperchain to easily test those changes.

- For now, it is only possible to deploy a hyperchain as an L2, but soon it will also work as L3s.
10 changes: 10 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
}
],
"redirects": [
{
"source": "/zk-stack/running-a-hyperchain/locally.html",
"destination": "/zk-stack/running-a-hyperchain/locally/local.html",
zk-Lumi marked this conversation as resolved.
Show resolved Hide resolved
"type": "302"
},
{
"source": "/build/tooling/zksync-cli/examples/contract-interaction.html",
"destination": "/build/tooling/zksync-cli/commands/contract-interaction.html",
Expand Down Expand Up @@ -1253,6 +1258,11 @@
}
],
"redirects": [
{
"source": "/zk-stack/running-a-hyperchain/locally.html",
"destination": "/zk-stack/running-a-hyperchain/locally/local.html",
"type": "302"
},
{
"source": "/build/tooling/zksync-cli/examples/contract-interaction.html",
"destination": "/build/tooling/zksync-cli/commands/contract-interaction.html",
Expand Down
Loading