Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-ke committed Aug 15, 2024
1 parent b72959c commit 7c479ee
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
5 changes: 4 additions & 1 deletion init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ zkp_impl=1
# ZK prover mode, 1: one proof per sample, 2: one proof for multiple samples.
# Note: currently only zk prover mode 2 is supported
zkp_mode=2
data_dir="./es-data"

remaining_args=""

Expand All @@ -23,6 +24,9 @@ while [ $# -gt 0 ]; do
elif [[ $1 == --miner.zk-prover-mode ]]; then
zkp_mode=$2
shift 2
elif [[ $1 == --datadir ]]; then
data_dir=$2
shift 2
else
remaining_args="$remaining_args $1"
shift
Expand Down Expand Up @@ -99,7 +103,6 @@ if [ "$zkp_impl" = 1 ]; then

fi

data_dir="./es-data"
storage_file_0="$data_dir/shard-0.dat"

es_node_init="$executable init --shard_index 0 \
Expand Down
31 changes: 22 additions & 9 deletions run-l2-it-rpc.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/sh

# usage:
# env ES_NODE_CONTRACT_ADDRESS=<your_contract_address> ./run-l2-it-rpc.sh

executable="./build/bin/es-node"
data_dir="./es-data-it-bootnode"
storage_file_0="$data_dir/shard-0.dat"

Expand All @@ -14,22 +10,39 @@ mkdir ${data_dir}
echo "8714eb2672bb7ab01089a1060150b30bc374a3b00e18926460f169256d126339" > "${data_dir}/esnode_p2p_priv.txt"

./init-l2.sh \
--encoding_type=0 \
--datadir $data_dir \
--encoding_type=0
--storage.l1contract $ES_NODE_CONTRACT_ADDRESS

./run-l2.sh \

exec ./build/bin/es-node \












--network integration \
--datadir $data_dir \
--storage.files $storage_file_0 \
--storage.l1contract $ES_NODE_CONTRACT_ADDRESS \
--miner.enabled=false \
--miner.zkey $zkey_file \
--l1.block_time 2 \
--l1.rpc http://65.109.20.29:8545 \
--da.url http://65.109.20.29:8888 \
--randao.url http://88.99.30.186:8545 \
--rpc.port 9595 \
--p2p.listen.udp 30395 \
--p2p.listen.tcp 9295 \
--p2p.priv.path $data_dir/esnode_p2p_priv.txt \
--p2p.peerstore.path $data_dir/esnode_peerstore_db \
--p2p.discovery.path $data_dir/esnode_discovery_db \
--rpc.addr 0.0.0.0 \
--miner.enabled=false

--rpc.addr 0.0.0.0

16 changes: 7 additions & 9 deletions run-l2-it.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#!/bin/bash

# usage:
# env ES_NODE_STORAGE_MINER=<miner> ES_NODE_SIGNER_PRIVATE_KEY=<private_key> ES_NODE_CONTRACT_ADDRESS=<your_contract_address> ./run-l2-it.sh
# for one zk proof per sample (if the storage contract supports):
# env ES_NODE_STORAGE_MINER=<miner> ES_NODE_SIGNER_PRIVATE_KEY=<private_key> ES_NODE_CONTRACT_ADDRESS=<your_contract_address> ./run-l2-it.sh --miner.zk-prover-mode 1 --l1.rpc <el_rpc> --l1.beacon <cl_rpc>


executable="./build/bin/es-node"
data_dir="./es-data-it"
storage_file_0="$data_dir/shard-0.dat"

Expand All @@ -20,11 +13,17 @@ mkdir ${data_dir}
--storage.l1contract $ES_NODE_CONTRACT_ADDRESS


./run-l2.sh \
exec ./build/bin/es-node \
--network integration \
--datadir $data_dir \
--storage.files $storage_file_0 \
--storage.l1contract $ES_NODE_CONTRACT_ADDRESS \
--miner.enabled \
--miner.zkey $zkey_file \
--l1.block_time 2 \
--l1.rpc http://65.109.20.29:8545 \
--da.url http://65.109.20.29:8888 \
--randao.url http://88.99.30.186:8545 \
--state.upload.url http://127.0.0.1:9096 \
--rpc.port 9596 \
--p2p.listen.udp 30396 \
Expand All @@ -33,4 +32,3 @@ mkdir ${data_dir}
--p2p.peerstore.path $data_dir/esnode_peerstore_db \
--p2p.discovery.path $data_dir/esnode_discovery_db \
--p2p.bootnodes enr:-Li4QBp6QW2ji7JF-3yijZrQ54PqPZ-Io_xEtMUslxxcmGS5TAXiiU6hypBZbB_atxh2Pc72-MgonzU5_R-_qd_PBXyGAZDucmwzimV0aHN0b3JhZ2XbAYDY15SXhtonBXvE13WNGfkk7Nj9Y4_Qr8GAgmlkgnY0gmlwhFhjHrqJc2VjcDI1NmsxoQJ8KIsZjyfFPHZOR66JORtqr5ax0QU6QmvT6QE0QllVZIN0Y3CCJE-DdWRwgna7

0 comments on commit 7c479ee

Please sign in to comment.