File tree Expand file tree Collapse file tree 7 files changed +62
-13
lines changed
Expand file tree Collapse file tree 7 files changed +62
-13
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ verify_aggregated_proof_risc0_holesky_stage:
200200 --rpc_url https://ethereum-holesky-rpc.publicnode.com
201201
202202install_aggregation_mode : # # Install the aggregation mode with proving enabled
203- cargo install --path aggregation_mode --features prove
203+ cargo install --path aggregation_mode --features prove,gpu
204204
205205_AGGREGATOR_ :
206206
Original file line number Diff line number Diff line change @@ -6,8 +6,7 @@ After=network.target
66Type =oneshot
77WorkingDirectory =/home/user
88ExecStartPre =sleep 60
9- ExecStart =/home/user/.cargo/bin/proof_aggregator /home/user/config/config-proof-aggregator.yaml
10- Environment ="SP1_PROVER=cuda"
9+ ExecStart =/home/user/run.sh
1110
1211[Install]
1312WantedBy =multi-user.target
Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ curl -L https://sp1.succinct.xyz | bash
8282source $HOME /.bashrc
8383sp1up
8484
85+ # Install Risc0
86+ curl -L https://risczero.com/install | bash
87+ source $HOME /.bashrc
88+ rzup install
89+
8590# Install cast
8691curl -L https://foundry.paradigm.xyz | bash
8792source $HOME /.bashrc
@@ -95,14 +100,21 @@ mkdir -p ~/.keystores
95100# Create keystore
96101cast wallet import proof_aggregation.keystore -k $HOME /.keystores -i
97102
98- # Create config file interactively
99- ./infra/aggregation_mode/config_file.sh ./infra/aggregation_mode/config-proof-aggregator.template.yaml
100- touch $HOME /config/proof-aggregator.last_aggregated_block.json
101- read -p " Enter a number (last_aggregated_block): " num && echo " {\" last_aggregated_block\" :$num }" > $HOME /config/proof-aggregator.last_aggregated_block.json
103+ # Create config file for SP1
104+ ./infra/aggregation_mode/config_file.sh ./infra/aggregation_mode/config-proof-aggregator-sp1.template.yaml $HOME /config/config-proof-aggregator-sp1.yaml
105+ read -p " Enter a block number for SP1 (last_aggregated_block): " num && echo " {\" last_aggregated_block\" :$num }" > $HOME /config/proof-aggregator-sp1.last_aggregated_block.json
106+
107+ # Create config file for Risc0
108+ ./infra/aggregation_mode/config_file.sh ./infra/aggregation_mode/config-proof-aggregator-risc0.template.yaml $HOME /config/config-proof-aggregator-risc0.yaml
109+ read -p " Enter a block number for Risc0 (last_aggregated_block): " num && echo " {\" last_aggregated_block\" :$num }" > $HOME /config/proof-aggregator-risc0.last_aggregated_block.json
102110
103111# Build the proof_aggregator
104112make install_aggregation_mode
105113
114+ # Copy run script
115+ cp ./infra/aggregation_mode/run.sh $HOME /run.sh
116+ chmod 744 $HOME /run.sh
117+
106118# Setup systemd service
107119cp ./infra/aggregation_mode/aggregation_mode.service $HOME /.config/systemd/user/aggregation_mode.service
108120cp ./infra/aggregation_mode/aggregation_mode.timer $HOME /.config/systemd/user/aggregation_mode.timer
Original file line number Diff line number Diff line change 1+ aligned_service_manager_address : <aligned_service_manager_address>
2+ proof_aggregation_service_address : <proof_aggregation_service_address>
3+ eth_rpc_url : <eth_rpc_url>
4+ eth_ws_url : <eth_ws_url>
5+ max_proofs_in_queue : 1000
6+ last_aggregated_block_filepath : /home/user/config/proof-aggregator-risc0.last_aggregated_block.json
7+
8+ ecdsa :
9+ private_key_store_path : <private_key_store_path>
10+ private_key_store_password : <private_key_store_password>
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ proof_aggregation_service_address: <proof_aggregation_service_address>
33eth_rpc_url : <eth_rpc_url>
44eth_ws_url : <eth_ws_url>
55max_proofs_in_queue : 1000
6- last_aggregated_block_filepath : ~/ config/proof-aggregator.last_aggregated_block.json
6+ last_aggregated_block_filepath : /home/user/ config/proof-aggregator-sp1 .last_aggregated_block.json
77
88ecdsa :
99 private_key_store_path : <private_key_store_path>
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # This script creates a configuration file for the proof aggregator
4+
5+ # PARAMETERS
6+ #
7+ # TEMPLATE_FILE: Path to the template file
8+ # - SP1: ./infra/aggregation_mode/config-proof-aggregator-sp1.template.yaml
9+ # - Risc0: ./infra/aggregation_mode/config-proof-aggregator-risc0.template.yaml
10+ #
11+ # OUTPUT_FILE: Path to the output file
12+ # - SP1: $HOME/config/config-proof-aggregator-sp1.yaml
13+ # - Risc0: $HOME/config/config-proof-aggregator-risc0.yaml
14+
315# Check if template file path is provided as argument
4- if [ $# -ne 1 ]; then
5- echo " Usage: $0 <template_file_path>"
16+ if [ $# -ne 2 ]; then
17+ echo " Usage: $0 <template_file_path> <output_file> "
618 exit 1
719fi
820
921TEMPLATE_FILE=" $1 "
22+ OUTPUT_FILE=" $2 "
1023
1124# Verify template file exists
1225if [ ! -f " $TEMPLATE_FILE " ]; then
@@ -36,12 +49,12 @@ prompt_and_replace "<private_key_store_path>" "ECDSA Private Key Store Path (~/.
3649prompt_and_replace " <private_key_store_password>" " ECDSA Private Key Store Password"
3750
3851# Create destination directory if it doesn't exist
39- mkdir -p /home/user /config
52+ mkdir -p $HOME /config
4053
4154# Copy the completed file to destination
42- cp " $TEMP_FILE " $HOME /config/config-proof-aggregator.yaml
55+ cp " $TEMP_FILE " " $OUTPUT_FILE "
4356
4457# Clean up temporary file
4558rm " $TEMP_FILE "
4659
47- echo " Configuration file has been created and copied to $HOME /config/config-proof-aggregator.yaml "
60+ echo " Configuration file has been created and copied to $OUTPUT_FILE "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ SLEEP=5
4+
5+ echo " Starting Aggregation Mode in $SLEEP seconds..."
6+ sleep $SLEEP
7+
8+ echo " Starting SP1 Aggregation Mode..."
9+ AGGREGATOR=sp1 SP1_PROVER=cuda /home/user/.cargo/bin/proof_aggregator /home/user/config/config-proof-aggregator-sp1.yaml
10+ docker stop $( docker ps -a -q) # # stop all containers
11+ echo " SP1 Aggregation Mode finished"
12+
13+ echo " Starting Risc0 Aggregation Mode..."
14+ AGGREGATOR=risc0 /home/user/.cargo/bin/proof_aggregator /home/user/config/config-proof-aggregator-risc0.yaml
15+ echo " Risc0 Aggregation Mode finished"
You can’t perform that action at this time.
0 commit comments