File tree Expand file tree Collapse file tree 5 files changed +41
-9
lines changed
Expand file tree Collapse file tree 5 files changed +41
-9
lines changed 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,20 @@ 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+
106117# Setup systemd service
107118cp ./infra/aggregation_mode/aggregation_mode.service $HOME /.config/systemd/user/aggregation_mode.service
108119cp ./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+ # ENV VARIABLES
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
416if [ $# -ne 1 ]; then
517 echo " Usage: $0 <template_file_path>"
@@ -39,9 +51,9 @@ prompt_and_replace "<private_key_store_password>" "ECDSA Private Key Store Passw
3951mkdir -p /home/user/config
4052
4153# Copy the completed file to destination
42- cp " $TEMP_FILE " $HOME /config/config-proof-aggregator.yaml
54+ cp " $TEMP_FILE " " $OUTPUT_FILE "
4355
4456# Clean up temporary file
4557rm " $TEMP_FILE "
4658
47- echo " Configuration file has been created and copied to $HOME /config/config-proof-aggregator.yaml "
59+ echo " Configuration file has been created and copied to $OUTPUT_FILE "
You can’t perform that action at this time.
0 commit comments