Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit

Permalink
switch to zkthunder
Browse files Browse the repository at this point in the history
  • Loading branch information
erubboli committed Oct 21, 2024
1 parent e3a7d87 commit b9126a5
Show file tree
Hide file tree
Showing 10 changed files with 491 additions and 67 deletions.
447 changes: 409 additions & 38 deletions README.md

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions README_zksync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# ZKsync Era: A ZK Rollup For Scaling Ethereum

[![Logo](eraLogo.png)](https://zksync.io/)

ZKsync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum without compromising on security or
decentralization. Since it's EVM compatible (Solidity/Vyper), 99% of Ethereum projects can redeploy without refactoring
or re-auditing a single line of code. ZKsync Era also uses an LLVM-based compiler that will eventually let developers
write smart contracts in C++, Rust and other popular languages.

## Knowledge Index

The following questions will be answered by the following resources:

| Question | Resource |
| ------------------------------------------------------- | ---------------------------------------------- |
| What do I need to develop the project locally? | [development.md](docs/guides/development.md) |
| How can I set up my dev environment? | [setup-dev.md](docs/guides/setup-dev.md) |
| 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://docs.zksync.io) |

## Policies

- [Security policy](SECURITY.md)
- [Contribution policy](CONTRIBUTING.md)

## License

ZKsync Era is distributed under the terms of either

- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/blog/license/mit/>)

at your option.

## Official Links

- [Website](https://zksync.io/)
- [GitHub](https://github.com/matter-labs)
- [ZK Credo](https://github.com/zksync/credo)
- [Twitter](https://twitter.com/zksync)
- [Twitter for Developers](https://twitter.com/zkSyncDevs)
- [Discord](https://join.zksync.dev/)
- [Mirror](https://zksync.mirror.xyz/)
- [Youtube](https://www.youtube.com/@zkSync-era)

## Disclaimer

ZKsync Era has been through lots of testing and audits. Although it is live, it is still in alpha state and will go
through more audits and bug bounty programs. We would love to hear our community's thoughts and suggestions about it! It
is important to state that forking it now can potentially lead to missing important security updates, critical features,
and performance improvements.
2 changes: 1 addition & 1 deletion core/node/eth_sender/src/eth_tx_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ impl EthTxAggregator {
.await?;
Self::report_eth_tx_saving(storage, &agg_op, &tx).await;

// zkmintlayer: A method `save_mintlayer_tx` to send the op to ipfs and mintlayer.
// zkthunder: A method `save_mintlayer_tx` to send the op to ipfs and mintlayer.
self.save_mintlayer_tx(&agg_op).await;
}

Expand Down
2 changes: 1 addition & 1 deletion docker/local-node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Image is always built from the server image to reuse the common parts
# This image is expected to be built locally beforehand (implemented in the `zk` tool)
# ARG BASE_VERSION=latest2.0
ARG BASE_VERSION=zkmintlayer
ARG BASE_VERSION=zkthunder
FROM matterlabs/server-v2:${BASE_VERSION}

WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion local-setup-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Make sure to get the correct bridgehub address (in this example: 0x35A3783781DE0
reth: only "reth:v0.2.0-beta.2"
instance-type:

- zkmintlayer: can deploy contract and transfer
- zkthunder: can deploy contract and transfer
- latest2.0: can transfer
- hyperlocal: can deploy contract and transfer

Expand Down
10 changes: 5 additions & 5 deletions local-setup/docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

# - L1 (reth) with explorer (blockscout)
# - a single postgres (with all the databases)
# - L2 zkmintlayer chain, together with its explorer
# - L2 zkthunder chain, together with its explorer

# Ports:
# - l1 explorer: http://localhost:25001 (also using 25001, 25002, 25003)
# - L1 chain (reth):
# - 25045 - rpc
# - L2 chain (zkmintlayer):
# - L2 chain (zkthunder):
# - 25100 - http
# - 25101 - ws

Expand Down Expand Up @@ -52,10 +52,10 @@ services:
POSTGRES_PORT: 5432
restart: unless-stopped

zkmintlayer:
zkthunder:
stdin_open: true
tty: true
image: matterlabs/local-node:${INSTANCE_TYPE:-zkmintlayer-dev}
image: matterlabs/local-node:${INSTANCE_TYPE:-zkthunder-dev}
healthcheck:
test: curl --fail http://localhost:3071/health || exit 1
interval: 10s
Expand All @@ -72,7 +72,7 @@ services:
- ML_BATCH_SIZE=10 # change if necessary
- 4EVERLAND_API_KEY=5F2R8SK2EQNSNCHSRWIK # only for test
- 4EVERLAND_SECRET_KEY=sCGfIdQZfis8YVCXnQP53SL8cPdRxyzjPLh1KYmF # only for test
- 4EVERLAND_BUCKET_NAME=zkmintlayer # only for test
- 4EVERLAND_BUCKET_NAME=zkthunder # only for test
ports:
- 127.0.0.1:25100:3050 # JSON RPC HTTP port
- 127.0.0.1:25101:3051 # JSON RPC WS port
Expand Down
22 changes: 11 additions & 11 deletions local-setup/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This docker compose is setting up the full ZKMintlayer network, consisting of:
# This docker compose is setting up the full zkthunder network, consisting of:
#
# - L1 (private reth) with explorer (blockscout)
# - a single postgres (with all the databases)
# - a ipfs node
# - L2 zkmintlayer chain, together with its explorer
# - L2 zkthunder chain, together with its explorer
# - hyperexplorer to merge L1, L2 all together.

# Ports (if a port is written in the form http://localhost:PORT, it means that it can be accessed from the other machine):
Expand All @@ -17,7 +17,7 @@
# - http://localhost:15002 -
# - http://localhost:15003 -

# - L2 chain (zkmintlayer):
# - L2 chain (zkthunder):
# - http://localhost:15100 - http rpc
# - http://localhost:15101 - ws rpc
# - L2 explorer:
Expand All @@ -30,7 +30,7 @@
# Database is on 15432
# pgAdmin to manage PostgreSQL DB is on 15430

# Besides, mintlayer rpc is on 13034/3034, change this in the zkmintlayer service if needed.
# Besides, mintlayer rpc is on 13034/3034, change this in the zkthunder service if needed.

services:
reth:
Expand Down Expand Up @@ -90,18 +90,18 @@ services:
POSTGRES_PORT: 5432
restart: unless-stopped

# zkmintlayer
# zkthunder
proxy-relay:
image: alpine/socat:latest
network_mode: host
command: TCP-LISTEN:13034,fork,bind=host.docker.internal TCP-CONNECT:127.0.0.1:13034
extra_hosts:
- host.docker.internal:host-gateway

zkmintlayer:
zkthunder:
stdin_open: true
tty: true
image: matterlabs/local-node:${INSTANCE_TYPE:-zkmintlayer}
image: matterlabs/local-node:${INSTANCE_TYPE:-zkthunder}
healthcheck:
test: curl --fail http://localhost:3071/health || exit 1
interval: 10s
Expand All @@ -118,7 +118,7 @@ services:
- ML_BATCH_SIZE=10 # change if necessary
- 4EVERLAND_API_KEY=5F2R8SK2EQNSNCHSRWIK # only for test
- 4EVERLAND_SECRET_KEY=sCGfIdQZfis8YVCXnQP53SL8cPdRxyzjPLh1KYmF # only for test
- 4EVERLAND_BUCKET_NAME=zkmintlayer # only for test
- 4EVERLAND_BUCKET_NAME=zkthunder # only for test
ports:
- 15100:3050 # JSON RPC HTTP port
- 15101:3051 # JSON RPC WS port
Expand All @@ -139,7 +139,7 @@ services:
environment:
- PORT=3040
- LOG_LEVEL=verbose
- BLOCKCHAIN_RPC_URL=http://zkmintlayer:3050
- BLOCKCHAIN_RPC_URL=http://zkthunder:3050
ports:
- 127.0.0.1:15104:3040
restart: unless-stopped
Expand All @@ -155,7 +155,7 @@ services:
- DATABASE_USER=postgres
- DATABASE_PASSWORD=notsecurepassword
- DATABASE_NAME=block-explorer
- BLOCKCHAIN_RPC_URL=http://zkmintlayer:3050
- BLOCKCHAIN_RPC_URL=http://zkthunder:3050
- DATA_FETCHER_URL=http://data-fetcher-main:3040
- BATCHES_PROCESSING_POLLING_INTERVAL=1000
ports:
Expand Down Expand Up @@ -264,7 +264,7 @@ services:

hyperexplorer:
depends_on:
zkmintlayer:
zkthunder:
condition: service_healthy
image: ghcr.io/mm-zk/zksync_tools:latest
ports:
Expand Down
4 changes: 2 additions & 2 deletions local-setup/hyperexplorer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"shared_bridges": {
"kl_exp": {
"chains": {
"zkmintlayer": {
"zkthunder": {
"chain_id": "0x10e",
"l2_url": "http://zkmintlayer:3050",
"l2_url": "http://zkthunder:3050",
"explorer": "http://localhost:15005/?network=local",
"type": "rollup"
}
Expand Down
8 changes: 4 additions & 4 deletions local-setup/start-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
# see https://hub.docker.com/r/matterlabs/local-node/tags for full list.
# latest2.0 - is the 'main' one.

INSTANCE_TYPE=${1:-zkmintlayer-dev}
INSTANCE_TYPE=${1:-zkthunder-dev}

export INSTANCE_TYPE=$INSTANCE_TYPE
echo "Starting ZKMintlayer Dev with instance type: $INSTANCE_TYPE"
echo "Starting zkthunder Dev with instance type: $INSTANCE_TYPE"
docker compose -f docker-compose-dev.yml pull
docker compose -f docker-compose-dev.yml up
# docker compose -f docker-compose-dev.yml up -d

check_all_services_healthy() {
service="zkmintlayer"
service="zkthunder"
# service="zksync"
(docker compose ps $service | grep "(healthy)")
if [ $? -eq 0 ]; then
Expand All @@ -39,7 +39,7 @@ DARKGRAY='\033[0;30m'
ORANGE='\033[0;33m'
echo -e "${GREEN}"

echo -e "SUCCESS, Your local ZKMintlayer Dev is now running! Find the information below for accessing each service."
echo -e "SUCCESS, Your local zkthunder Dev is now running! Find the information below for accessing each service."
echo -e "┌──────────────────────────┬────────────────────────┬──────────────────────────────────────────────────┐"
echo -e "│ Service │ URL │ Description │"
echo -e "├──────────────────────────┼────────────────────────┼──────────────────────────────────────────────────┤"
Expand Down
8 changes: 4 additions & 4 deletions local-setup/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
# see https://hub.docker.com/r/matterlabs/local-node/tags for full list.
# latest2.0 - is the 'main' one.

INSTANCE_TYPE=${1:-zkmintlayer}
INSTANCE_TYPE=${1:-zkthunder}

export INSTANCE_TYPE=$INSTANCE_TYPE
echo "Starting ZKMintlayer with instance type: $INSTANCE_TYPE"
echo "Starting zkthunder with instance type: $INSTANCE_TYPE"
docker compose pull
# docker compose up
docker compose up

check_all_services_healthy() {
service="zkmintlayer"
service="zkthunder"
# service="zksync"
(docker compose ps $service | grep "(healthy)")
if [ $? -eq 0 ]; then
Expand All @@ -39,7 +39,7 @@ DARKGRAY='\033[0;30m'
ORANGE='\033[0;33m'
echo -e "${GREEN}"

echo -e "SUCCESS, Your local ZKMintlayer is now running! Find the information below for accessing each service."
echo -e "SUCCESS, Your local zkthunder is now running! Find the information below for accessing each service."
echo -e "┌──────────────────────────┬────────────────────────┬──────────────────────────────────────────────────┐"
echo -e "│ Service │ URL │ Description │"
echo -e "├──────────────────────────┼────────────────────────┼──────────────────────────────────────────────────┤"
Expand Down

0 comments on commit b9126a5

Please sign in to comment.