          {:job-scheduler (:onyx.peer/job-scheduler peer-config)
           :messaging (select-keys peer-config [:onyx.messaging/impl])}))
 
+(defn playback-log [peer-config peer-log-reads]
+  (reduce #(onyx.extensions/apply-log-entry %2 %1)
+          (base-replica peer-config)
+          peer-log-reads))
+
+(defn pulses [conn peer-config]
+  (onyx.log.curator/children conn (onyx.log.zookeeper/pulse-path (:onyx/id peer-config))))
+
+;;; TODO, check whether the jobs were even submitted, if not, nothing should be read back
 (defrecord Checker [peer-config n-peers]
   checker/Checker
   (check [checker test model history]

                                   (:value ledger-reads)))
          all-through-intermediate? (= all-stage-2 #{2})
          unacked-writes-read (clojure.set/difference read-values added-values)]
      {:valid? (and all-written-read? all-peers-up?)
       :peer-log peer-log-reads
       :final-replica final-replica
       :added added-values
       :read-values read-values
       :diff-written-read diff-written-read
       :unacknowledged-writes-read unacked-writes-read
       :all-peers-up? all-peers-up?
       :all-written-read? all-written-read?})))

                                                  (and (= (:f action) :read-peer-log)
                                                       (= (:type action) :ok)))
                                                history)))
          final-replica (playback-log peer-config peer-log-reads)
          log-conn (:log (component/start (system/onyx-client peer-config)))
          exception (if-let [killed-job (first (:killed-jobs final-replica))] 
                      (onyx.extensions/read-chunk log-conn :exception killed-job))
          all-peers-up? (= (count (:peers final-replica))
                           (* 5 n-peers))
          pulse-peers (pulses (:conn log-conn) peer-config)

          peers-match-pulses? (= (sort (map str (:peers final-replica)))
                                 (sort pulse-peers))
          results (map (fn [lr] 
                         (map :value (:results lr))) 
                       (:value ledger-reads))
          successfully-added (filter (fn [action]
                                       (and (= (:f action) :add)
                                            (= (:type action) :ok)))
                                     history)
          added-values (set (map :value successfully-added))
          read-values (reduce into #{} results)
          diff-written-read (clojure.set/difference added-values read-values)
          all-written-read? (empty? diff-written-read)

          accepting-empty? (empty? (:accepted final-replica))
          prepared-empty? (empty? (:prepared final-replica))

          ;; Check that all values at the output went through the second task first
          all-stage-2 (set (mapcat (fn [lr] 
