From 27c7b2c5af094ab746fabbaf6e1b144a89d49aa4 Mon Sep 17 00:00:00 2001 From: Marijan <77665447+mc2eqe@users.noreply.github.com> Date: Wed, 27 Mar 2024 21:24:30 +0100 Subject: [PATCH] Fix/zkevm kyoto (#653) * Update naming * Removed zkevm config dir * Update env config changes * Update revert rpc node * Update stop containers --- .../zkEVM/zk-node/setup-testnet-rpc-node.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/build/zkEVM/zk-node/setup-testnet-rpc-node.md b/docs/build/zkEVM/zk-node/setup-testnet-rpc-node.md index d14fd4f21e0..91b99f3c5c2 100644 --- a/docs/build/zkEVM/zk-node/setup-testnet-rpc-node.md +++ b/docs/build/zkEVM/zk-node/setup-testnet-rpc-node.md @@ -6,7 +6,7 @@ sidebar_label: Setup zkEVM Testnet RPC ## Overview -Operators can deploy permissionless RPC nodes for **Astar zkEVM** testnet, named **zKatana**. +Operators can deploy permissionless RPC nodes for **Astar zkEVM** testnet, named **zKyoto**. DApp projects must run their own RPC node to retrieve the necessary blockchain data and shouldn't rely on public infrastructure. Public endpoints may respond slowly or not at all during times of high network traffic, and are rate limited. @@ -49,14 +49,14 @@ In this section, we are going to start the five containers necessary for the **A - zkevm-pool-db - zkevm-prover -At the time of this writing, **zKatana testnet** is the only network available for the **Astar zkEVM**, and is connected to the L1 Ethereum **Sepolia testnet**. +At the time of this writing, **zKyoto testnet** is the only network available for the **Astar zkEVM**, and is connected to the L1 Ethereum **Sepolia testnet**. Let's build on this. Create dedicated directories for config, install and data. ```bash -sudo mkdir -p /etc/zkevm/{install,config} && sudo chown -R $USER:$USER /etc/zkevm +sudo mkdir -p /etc/zkevm && sudo chown -R $USER:$USER /etc/zkevm sudo mkdir -p /var/lib/zkevm/{statedb,pooldb} && sudo chown -R $USER:$USER /var/lib/zkevm/ ``` @@ -65,22 +65,21 @@ Set local variables. ``` # define installation and config path ZKEVM_NET=testnet -ZKEVM_DIR=/etc/zkevm/install -ZKEVM_CONFIG_DIR=/etc/zkevm/config +ZKEVM_DIR=/etc/zkevm ``` Download and extract the artifacts. ```bash -wget https://shared-assets.astar.network/files/zkevm/zkatana/zkatana.tar.gz -tar -xf zkatana.tar.gz -C $ZKEVM_DIR && rm zkatana.tar.gz +wget https://shared-assets.astar.network/files/zkevm/zkyoto/zkyoto.tar.gz +tar -xf zkyoto.tar.gz -C $ZKEVM_DIR && rm zkyoto.tar.gz ``` Copy the env file and edit the L1 RPC URL. ```bash -cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env -nano $ZKEVM_CONFIG_DIR/.env +cp $ZKEVM_DIR/example.env $ZKEVM_DIR/.env +nano $ZKEVM_DIR/.env ``` Modify the parameters. @@ -93,7 +92,7 @@ ZKEVM_NODE_ETHERMAN_URL = "https://eth-sepolia-public.unifra.io" Edit the node config file. ```bash -nano $ZKEVM_DIR/$ZKEVM_NET/config/environments/$ZKEVM_NET/node.config.toml +nano $ZKEVM_DIR/config/environments/$ZKEVM_NET/node.config.toml ``` Modify the following parameters, you may also want to change the databases default user/passwords for more security. @@ -113,9 +112,9 @@ Start the containers. ```bash # start all the containers -sudo docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml up -d +sudo docker compose --env-file $ZKEVM_DIR/.env -f $ZKEVM_DIR/docker-compose.yml up -d # or start containers on by one -sudo docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml up -d +sudo docker compose --env-file $ZKEVM_DIR/.env -f $ZKEVM_DIR/docker-compose.yml up -d ``` Verify that all containers are up and running: you should see the 5 containers with a status Up. @@ -148,7 +147,7 @@ curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": Stop containers. ```bash -sudo docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml down +sudo docker compose --env-file $ZKEVM_DIR/.env -f $ZKEVM_DIR/docker-compose.yml down ``` ## Extra