|
1 | | -!!! warning |
2 | | - - Use a separate terminal window to run the node and each service separately. |
3 | | - - Whenever you need to restart the process, make sure you stop and delete all running Docker containers and images. |
4 | | - |
5 | 1 | ## Run the prover |
6 | 2 |
|
7 | | -Since the prover is large and compute-expensive to build, we will use a docker container. |
| 3 | +1. Open a new terminal window. |
8 | 4 |
|
9 | | -```bash |
10 | | -docker run -v "/tmp/cdk/test.prover.config.json:/usr/src/app/config.json" -p 50061:50061 -p 50071:50071 --network host hermeznetwork/zkevm-prover:v3.0.2 zkProver -c /usr/src/app/config.json |
11 | | -``` |
| 5 | +2. Since the prover is large and compute-expensive to build, we will use a docker container. |
| 6 | + |
| 7 | + ```bash |
| 8 | + docker run -v "/tmp/cdk/test.prover.config.json:/usr/src/app/config.json" -p 50061:50061 -p 50071:50071 --network host hermeznetwork/zkevm-prover:v3.0.2 zkProver -c /usr/src/app/config.json |
| 9 | + ``` |
12 | 10 |
|
13 | | -!!! important |
14 | | - The database logs may output an error while they wait for a node. For example: |
| 11 | + !!! important |
| 12 | + The database logs may output an error while they wait for a node. For example: |
15 | 13 |
|
16 | | - ```txt |
17 | | - 2024-01-31 12:18:30.329 UTC [675] ERROR: relation "state.nodes" does not exist at character 15 |
18 | | - 2024-01-31 12:18:30.329 UTC [675] STATEMENT: SELECT * FROM state.nodes WHERE hash = E'\\xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'; |
19 | | - ``` |
| 14 | + ```txt |
| 15 | + 2024-01-31 12:18:30.329 UTC [675] ERROR: relation "state.nodes" does not exist at character 15 |
| 16 | + 2024-01-31 12:18:30.329 UTC [675] STATEMENT: SELECT * FROM state.nodes WHERE hash = E'\\xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'; |
| 17 | + ``` |
20 | 18 |
|
21 | | - The node log may also output an error while they wait for services to come online. For example: |
| 19 | + The node log may also output an error while they wait for services to come online. For example: |
22 | 20 |
|
23 | | - ```txt |
24 | | - aggregatorClientMockThread() channel broken; will retry in 5 seconds |
25 | | - aggregatorClientMockThread() failed calling readerWriter->Read(&aggregatorMessage) |
26 | | - ``` |
| 21 | + ```txt |
| 22 | + aggregatorClientMockThread() channel broken; will retry in 5 seconds |
| 23 | + aggregatorClientMockThread() failed calling readerWriter->Read(&aggregatorMessage) |
| 24 | + ``` |
27 | 25 |
|
28 | 26 | ## Run the node |
29 | 27 |
|
30 | | -```bash |
31 | | -cd ~/cdk-validium/cdk-validium-node |
32 | | -./dist/zkevm-node run --network custom --custom-network-file /tmp/cdk/genesis.json --cfg /tmp/cdk/node-config.toml \ |
33 | | - --components sequencer \ |
34 | | - --components sequence-sender \ |
35 | | - --components aggregator \ |
36 | | - --components rpc --http.api eth,net,debug,zkevm,txpool,web3 \ |
37 | | - --components synchronizer \ |
38 | | - --components eth-tx-manager \ |
39 | | - --components l2gaspricer |
40 | | -``` |
| 28 | +1. Open a new terminal window. |
| 29 | + |
| 30 | +2. Run the following commands. |
| 31 | + |
| 32 | + ```bash |
| 33 | + cd ~/cdk-validium/cdk-validium-node |
| 34 | + ./dist/zkevm-node run --network custom --custom-network-file /tmp/cdk/genesis.json --cfg /tmp/cdk/node-config.toml \ |
| 35 | + --components sequencer \ |
| 36 | + --components sequence-sender \ |
| 37 | + --components aggregator \ |
| 38 | + --components rpc --http.api eth,net,debug,zkevm,txpool,web3 \ |
| 39 | + --components synchronizer \ |
| 40 | + --components eth-tx-manager \ |
| 41 | + --components l2gaspricer |
| 42 | + ``` |
41 | 43 |
|
42 | 44 | ### Run the additional approval scripts for the node |
43 | 45 |
|
44 | | -```bash |
45 | | -./dist/zkevm-node approve --network custom \ |
46 | | - --custom-network-file /tmp/cdk/genesis.json \ |
47 | | - --cfg /tmp/cdk/node-config.toml \ |
48 | | - --amount 1000000000000000000000000000 \ |
49 | | - --password "testonly" --yes --key-store-path /tmp/cdk/account.key |
50 | | -``` |
| 46 | +1. Open a new terminal window at the same directory as the previous step. |
| 47 | + |
| 48 | +2. Run the following commands. |
| 49 | + |
| 50 | + ```bash |
| 51 | + cd ~/cdk-validium/cdk-validium-node |
| 52 | + ./dist/zkevm-node approve --network custom \ |
| 53 | + --custom-network-file /tmp/cdk/genesis.json \ |
| 54 | + --cfg /tmp/cdk/node-config.toml \ |
| 55 | + --amount 1000000000000000000000000000 \ |
| 56 | + --password "testonly" --yes --key-store-path /tmp/cdk/account.key |
| 57 | + ``` |
51 | 58 |
|
52 | 59 | ## Run the DAC |
53 | 60 |
|
| 61 | +Open a new terminal window and run the following command. |
| 62 | + |
54 | 63 | ```bash |
55 | 64 | cd ~/cdk-validium/cdk-data-availability-0.0.3 |
56 | 65 | ./dist/cdk-data-availability run --cfg /tmp/cdk/dac-config.toml |
57 | 66 | ``` |
58 | 67 |
|
59 | 68 | ## Run the bridge service |
60 | 69 |
|
| 70 | +Open a new terminal window and run the following command. |
| 71 | + |
61 | 72 | ```bash |
62 | 73 | cd ~/cdk-validium/zkevm-bridge-service |
63 | 74 | ./dist/zkevm-bridge run --cfg /tmp/cdk/bridge-config.toml |
|
0 commit comments