File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,4 +128,8 @@ impl ProofsFetcher {
128128
129129 Ok ( proofs)
130130 }
131+
132+ pub fn get_last_processed_block ( & self ) -> u64 {
133+ self . last_processed_block
134+ }
131135}
Original file line number Diff line number Diff line change @@ -69,14 +69,15 @@ impl ProofAggregator {
6969 }
7070 }
7171
72- pub async fn start ( & mut self ) {
72+ pub async fn start ( & mut self , config : & mut Config ) {
7373 info ! ( "Starting proof aggregator service" , ) ;
7474
7575 info ! ( "About to aggregate and submit proof to be verified on chain" ) ;
7676 let res = self . aggregate_and_submit_proofs_on_chain ( ) . await ;
7777
7878 match res {
7979 Ok ( ( ) ) => {
80+ config. last_processed_block = self . fetcher . get_last_processed_block ( ) ;
8081 info ! ( "Process finished successfully" ) ;
8182 }
8283 Err ( err) => {
Original file line number Diff line number Diff line change @@ -23,11 +23,11 @@ async fn main() {
2323 // load config
2424 let config_file_path = read_config_filepath_from_args ( ) ;
2525 tracing:: info!( "Loading config from {}..." , config_file_path) ;
26- let config = Config :: from_file ( & config_file_path) . expect ( "Config is valid" ) ;
26+ let mut config = Config :: from_file ( & config_file_path) . expect ( "Config is valid" ) ;
2727 tracing:: info!( "Config loaded" ) ;
2828
2929 let mut proof_aggregator = ProofAggregator :: new ( & config) ;
30- proof_aggregator. start ( ) . await ;
30+ proof_aggregator. start ( & mut config ) . await ;
3131
32- config. save_to_file ( & config_file_path) . unwrap ( ) ;
32+ config. save_to_file ( & config_file_path) . unwrap ( ) ;
3333}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ eth_ws_url: ws://localhost:8545
33max_proofs_in_queue : 1000
44proof_aggregation_service_address : 0xB0D4afd8879eD9F52b28595d31B441D079B2Ca07
55aligned_service_manager_address : 0x851356ae760d987E095750cCeb3bC6014560891C
6- last_processed_block : 0
6+ last_processed_block : 626
77ecdsa :
88 private_key_store_path : config-files/anvil.proof-aggregator.ecdsa.key.json
99 private_key_store_password : ' '
You can’t perform that action at this time.
0 commit comments