@@ -25,7 +25,7 @@ contract CheckpointTracker is ICheckpointTracker {
2525 /// @param _commitmentStore contract responsible storing historical commitments
2626 constructor (bytes32 _genesis , address _inbox , address _verifier , address _proverManager , address _commitmentStore ) {
2727 // set the genesis checkpoint commitment of the rollup - genesis is trusted to be correct
28- require (_genesis != 0 , " genesis checkpoint commitment cannot be 0 " );
28+ require (_genesis != 0 , ZeroGenesisCommitment () );
2929 inbox = IInbox (_inbox);
3030 uint256 latestPublicationId = inbox.getNextPublicationId () - 1 ;
3131
@@ -44,25 +44,26 @@ contract CheckpointTracker is ICheckpointTracker {
4444 external
4545 returns (uint256 numPublications , uint256 numDelayedPublications )
4646 {
47+ require (proverManager == address (0 ) || msg .sender == proverManager, OnlyProverManager ());
48+
49+ require (start.commitment != 0 , ZeroStartCommitment ());
50+ require (end.commitment != 0 , ZeroEndCommitment ());
4751 require (
48- proverManager == address (0 ) || msg .sender == proverManager, "Only the prover manager can call this function "
52+ start.publicationId <= provenPublicationId,
53+ InvalidStartPublication (start.publicationId, provenPublicationId)
4954 );
5055
51- require (start.commitment != 0 , "Start checkpoint commitment cannot be 0 " );
52- require (end.commitment != 0 , "End checkpoint commitment cannot be 0 " );
53- require (start.publicationId <= provenPublicationId, "Start publication must precede latest proven checkpoint " );
54-
5556 // Only count publications that have not been proven yet
5657 numPublications = end.publicationId - provenPublicationId;
5758 numDelayedPublications = end.totalDelayedPublications - _totalDelayedPublications;
5859 require (
5960 numDelayedPublications <= numPublications,
60- " Number of delayed publications cannot be greater than the total number of publications "
61+ ExcessiveDelayedPublications (numDelayedPublications, numPublications)
6162 );
6263
6364 bytes32 startPublicationHash = inbox.getPublicationHash (start.publicationId);
6465 bytes32 endPublicationHash = inbox.getPublicationHash (end.publicationId);
65- require (endPublicationHash != 0 , " End publication does not exist " );
66+ require (endPublicationHash != 0 , EndPublicationNotFound () );
6667
6768 verifier.verifyProof (
6869 startPublicationHash,
0 commit comments