@@ -28,6 +28,8 @@ import {
2828 stringToNumberArray ,
2929 parseValidatorTopUpArray ,
3030 etherToWeiArray ,
31+ fetchNodeSyncingStatus ,
32+ fetchBeaconHeader ,
3133} from 'utils' ;
3234import { Deposit , ValidatorTopUp } from 'types' ;
3335
@@ -72,6 +74,19 @@ pdgWrite
7274 ) => {
7375 const pdgContract = await getPredepositGuaranteeContract ( ) ;
7476
77+ const nodeStatus = await fetchNodeSyncingStatus ( ) ;
78+ const beaconHeaderJson = await fetchBeaconHeader ( 'finalized' ) ;
79+
80+ logInfo ( 'Node syncing status' ) ;
81+ logTable ( {
82+ data : [
83+ [ 'Is syncing' , nodeStatus . data . is_syncing ] ,
84+ [ 'Sync distance' , nodeStatus . data . sync_distance ] ,
85+ [ 'Head slot' , nodeStatus . data . head_slot ] ,
86+ [ 'Finalized slot' , beaconHeaderJson . data . header . message . slot ] ,
87+ ] ,
88+ } ) ;
89+
7590 const isPaused = await checkPdgIsPaused ( pdgContract ) ;
7691 if ( isPaused ) return ;
7792
@@ -150,6 +165,18 @@ pdgWrite
150165 const validatorIndex = await confirmMakeProof ( index ) ;
151166 if ( ! validatorIndex ) return ;
152167
168+ const nodeStatus = await fetchNodeSyncingStatus ( ) ;
169+ const beaconHeaderJson = await fetchBeaconHeader ( 'finalized' ) ;
170+
171+ logInfo ( 'Node syncing status' ) ;
172+ logTable ( {
173+ data : [
174+ [ 'Is syncing' , nodeStatus . data . is_syncing ] ,
175+ [ 'Sync distance' , nodeStatus . data . sync_distance ] ,
176+ [ 'Head slot' , nodeStatus . data . head_slot ] ,
177+ [ 'Finalized slot' , beaconHeaderJson . data . header . message . slot ] ,
178+ ] ,
179+ } ) ;
153180 const hideSpinner = showSpinner ( {
154181 type : 'bouncingBar' ,
155182 message : 'Making proof...' ,
0 commit comments