@@ -10,53 +10,15 @@ use types::ExecutionProof;
1010/// Global verification key store, loaded once on first access
1111pub static VERIFICATION_KEY_STORE : Lazy < Option < VerificationKeyStore > > =
1212 Lazy :: new ( || match VerificationKeyStore :: load_embedded ( ) {
13- Ok ( store) => {
14- debug ! (
15- key_count = store. len( ) ,
16- prover_ids = ?store. prover_ids( ) ,
17- "[Ethproofs] Loaded verification keys"
18- ) ;
19- Some ( store)
20- }
13+ Ok ( store) => Some ( store) ,
2114 Err ( e) => {
2215 warn ! ( error = %e, "[Ethproofs] Failed to load verification keys" ) ;
2316 None
2417 }
2518 } ) ;
2619
2720/// Global verifier store, initialized with default verifiers
28- pub static VERIFIER_STORE : Lazy < VerifierStore > = Lazy :: new ( || {
29- let store = VerifierStore :: with_defaults ( ) ;
30- debug ! (
31- verifier_count = store. len( ) ,
32- "[Ethproofs] Initialized verifier store"
33- ) ;
34- store
35- } ) ;
36-
37- /// Select a random prover_id from available registered verifiers
38- pub fn select_random_prover_id ( ) -> [ u8 ; 16 ] {
39- use rand:: Rng ;
40-
41- let available_provers = VERIFIER_STORE . prover_ids ( ) ;
42-
43- if available_provers. is_empty ( ) {
44- warn ! ( "[Ethproofs] No verifiers registered, cannot select prover_id" ) ;
45- return [ 0u8 ; 16 ] ;
46- }
47-
48- let mut rng = rand:: rng ( ) ;
49- let random_index = rng. random_range ( 0 ..available_provers. len ( ) ) ;
50- let selected_uuid = available_provers[ random_index] ;
51-
52- debug ! (
53- prover_id = %selected_uuid,
54- available_count = available_provers. len( ) ,
55- "[Ethproofs] Randomly selected prover_id"
56- ) ;
57-
58- * selected_uuid. as_bytes ( )
59- }
21+ pub static VERIFIER_STORE : Lazy < VerifierStore > = Lazy :: new ( VerifierStore :: with_defaults) ;
6022
6123/// Represents a proof from the Ethproofs proofs list endpoint
6224#[ derive( Debug , Clone , Serialize , Deserialize ) ]
@@ -110,13 +72,6 @@ pub async fn fetch_proof_from_ethproofs(
11072 ) ) ;
11173 }
11274
113- debug ! (
114- block_hash = %block_hash,
115- cluster = %cluster,
116- delay_ms,
117- "[Ethproofs] Polling Ethproofs for proof"
118- ) ;
119-
12075 let response = client
12176 . get ( & url)
12277 . send ( )
@@ -132,21 +87,11 @@ pub async fn fetch_proof_from_ethproofs(
13287
13388 // Return the first proof found for this cluster
13489 if !response_data. proofs . is_empty ( ) {
135- debug ! (
136- block_hash = %block_hash,
137- cluster = %cluster,
138- proof_count = response_data. proofs. len( ) ,
139- "[Ethproofs] Found proof"
140- ) ;
14190 return Ok ( response_data. proofs ) ;
14291 }
14392 }
14493 StatusCode :: NOT_FOUND => {
145- debug ! (
146- block_hash = %block_hash,
147- cluster = %cluster,
148- "[Ethproofs] Block not found, retrying..."
149- ) ;
94+ // Proof not ready yet, will retry with exponential backoff
15095 }
15196 status => {
15297 return Err ( format ! (
@@ -185,13 +130,6 @@ pub async fn download_proof_binary(proof_id: u64) -> Result<Vec<u8>, String> {
185130 . bytes ( )
186131 . await
187132 . map_err ( |e| format ! ( "Failed to read response: {}" , e) ) ?;
188-
189- debug ! (
190- proof_id,
191- size_bytes = proof_data. len( ) ,
192- "[Ethproofs] Successfully downloaded proof binary"
193- ) ;
194-
195133 Ok ( proof_data. to_vec ( ) )
196134 }
197135 StatusCode :: NOT_FOUND => Err ( format ! ( "Proof {} not found" , proof_id) ) ,
@@ -229,7 +167,7 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
229167 prover_id = %prover_uuid,
230168 vk_size = vk. size( ) ,
231169 proof_size = proof. proof_data. len( ) ,
232- "[Ethproofs] Found verification key for prover"
170+ "[Ethproofs] Found vk for prover"
233171 ) ;
234172
235173 // Look up the verifier for this prover
@@ -238,7 +176,7 @@ pub fn validate_proof(proof: &ExecutionProof) -> bool {
238176 debug ! (
239177 prover_id = %prover_uuid,
240178 verifier = verifier_entry. name,
241- "[Ethproofs] Found verifier, running cryptographic verification"
179+ "[Ethproofs] Found verifier, starting verification"
242180 ) ;
243181
244182 // Run the actual cryptographic verification
0 commit comments