code: def doCommit(self, p: Prepare):
          
          key_3pc = (p.viewNo, p.ppSeqNo)
          self.logger.debug("{} Sending COMMIT{} at {}".format(self, key_3pc, self.get_current_time()))
  
          params = [
              self.instId, p.viewNo, p.ppSeqNo
          ]
  
          pre_prepare = self.getPrePrepare(*key_3pc)
  
          # BLS multi-sig:
          if p.stateRootHash is not None:
              pre_prepare = self.getPrePrepare(*key_3pc)
              params = self._bls_bft_replica.update_commit(params, pre_prepare)
  
          commit = Commit(*params)
          if self.isMaster:
              rv = self.execute_hook(ReplicaHooks.CREATE_CM, commit)
              commit = rv if rv is not None else commit
  
          self.send(commit, TPCStat.CommitSent)
          self.addToCommits(commit, self.name)
docs: Create a commit message from the given Prepare message and trigger the
          commit phase
          :param p: the prepare message