@@ -168,8 +168,8 @@ where
168168 let entry = cache. get_next_uncommitted ( ) ?;
169169
170170 tracing:: debug!(
171- instance_id = entry. instance_id ,
172- epochs = ?entry. finalized_epochs,
171+ instance_id = entry. certificate . gpbft_instance ,
172+ epochs = ?entry. certificate . finalized_epochs,
173173 "found proof in cache for proposal"
174174 ) ;
175175
@@ -193,7 +193,8 @@ where
193193 & self ,
194194 bundle : & fendermint_vm_message:: ipc:: TopDownProofBundle ,
195195 ) -> anyhow:: Result < ( ) > {
196- use fendermint_vm_topdown_proof_service:: verify_proof_bundle;
196+ // TODO Karel - implement this
197+ use fendermint_vm_topdown_proof_service:: verifier:: ProofsVerifier ;
197198
198199 // Verify cryptographic proofs (storage + events)
199200 verify_proof_bundle ( & bundle. proof_bundle , & bundle. certificate )
@@ -225,17 +226,17 @@ where
225226 . context ( "failed to query F3LightClientActor state" ) ?;
226227
227228 // Ensure bundle.certificate.instance_id == last_committed + 1
228- if bundle. certificate . instance_id != f3_state. instance_id + 1 {
229+ if bundle. certificate . gpbft_instance != f3_state. instance_id + 1 {
229230 bail ! (
230231 "Certificate instance ID {} is not sequential (expected {})" ,
231- bundle. certificate. instance_id ,
232+ bundle. certificate. gpbft_instance ,
232233 f3_state. instance_id + 1
233234 ) ;
234235 }
235236
236237 tracing:: debug!(
237238 current_instance = f3_state. instance_id,
238- new_instance = bundle. certificate. instance_id ,
239+ new_instance = bundle. certificate. gpbft_instance ,
239240 "verified certificate chain continuity"
240241 ) ;
241242
@@ -248,30 +249,30 @@ where
248249 // Note: Using blocking try_read since this is not an async function
249250 if let Ok ( guard) = self . proof_cache . try_read ( ) {
250251 if let Some ( cache) = guard. as_ref ( ) {
251- if cache. contains ( bundle. certificate . instance_id ) {
252+ if cache. contains ( bundle. certificate . gpbft_instance ) {
252253 tracing:: debug!(
253- instance = bundle. certificate. instance_id ,
254+ instance = bundle. certificate. gpbft_instance ,
254255 "Certificate found in local cache - already validated by our F3 client"
255256 ) ;
256257 // We validated this ourselves, trust it
257258 return Ok ( ( ) ) ;
258259 }
259260 }
260261 }
261-
262+
262263 // Certificate not in our cache - this means we're behind
263264 // However, the certificate has already passed storage/event proof verification
264265 // which cryptographically proves it's valid for the parent state
265266 tracing:: info!(
266- instance = bundle. certificate. instance_id ,
267+ instance = bundle. certificate. gpbft_instance ,
267268 "Certificate not in local cache - validator is behind but certificate is proven valid via storage/event proofs"
268269 ) ;
269-
270+
270271 // The storage and event proofs already guarantee:
271272 // 1. The certificate was used to finalize the parent chain
272273 // 2. The topdown messages and validator changes are correct
273274 // 3. The state transition is valid
274- //
275+ //
275276 // We don't need to re-validate F3 signatures since the proofs already
276277 // demonstrate the certificate was accepted by the parent chain
277278 Ok ( ( ) )
@@ -307,7 +308,7 @@ where
307308 }
308309
309310 tracing:: debug!(
310- instance = bundle. certificate. instance_id ,
311+ instance = bundle. certificate. gpbft_instance ,
311312 "executing proof-based topdown finality"
312313 ) ;
313314
@@ -376,7 +377,7 @@ where
376377
377378 let new_light_client_state =
378379 fendermint_vm_actor_interface:: f3_light_client:: LightClientState {
379- instance_id : bundle. certificate . instance_id ,
380+ instance_id : bundle. certificate . gpbft_instance ,
380381 finalized_epochs : bundle. certificate . finalized_epochs . clone ( ) ,
381382 power_table,
382383 } ;
@@ -386,24 +387,24 @@ where
386387 . context ( "failed to update F3LightClientActor state" ) ?;
387388
388389 tracing:: debug!(
389- instance = bundle. certificate. instance_id ,
390+ instance = bundle. certificate. gpbft_instance ,
390391 "updated F3LightClientActor state"
391392 ) ;
392393
393394 // Step 7: Mark instance as committed in cache
394395 {
395396 let guard = self . proof_cache . read ( ) . await ;
396397 if let Some ( cache) = guard. as_ref ( ) {
397- cache. mark_committed ( bundle. certificate . instance_id ) ;
398+ cache. mark_committed ( bundle. certificate . gpbft_instance ) ;
398399 tracing:: debug!(
399- instance = bundle. certificate. instance_id ,
400+ instance = bundle. certificate. gpbft_instance ,
400401 "marked instance as committed in cache"
401402 ) ;
402403 }
403404 }
404405
405406 tracing:: info!(
406- instance = bundle. certificate. instance_id ,
407+ instance = bundle. certificate. gpbft_instance ,
407408 height = finality. height,
408409 "proof-based topdown finality executed successfully"
409410 ) ;
0 commit comments