   [cfg]
   (fn init
     []
+    (require 'blocks.store.s3)
     (mdag/init-store
-      :encoding [:mdag :gzip :edn]
+      :encoding [:mdag :gzip :cbor]
       :store (block/->store (:blocks-url cfg))
       :cache {:total-size-limit (:cache-size cfg (* 32 1024 1024))}
       :types merkle-db.graph/codec-types)))

  "Main entry point for example."
  [& raw-args]
  (let [{:keys [options arguments summary errors]} (cli/parse-opts raw-args cli-options)
        command (first arguments)]
    (when errors
      (binding [*out* *err*]
        (doseq [err errors]

          elapsed (delay (/ (- (System/currentTimeMillis) start) 1e3))]
      (spark/with-context spark-ctx (-> (conf/spark-conf)
                                        (conf/app-name "movie-lens-recommender")
                                        (cond->
                                          (:master options)
                                            (conf/master (:master options))))
        (try
          (command-fn spark-ctx options (rest arguments))
          (catch Throwable err
            (log/error err "Command failed!")
            (when-let [err (ex-data err)]
              (reset! success? false)
              (u/pprint err))))
        (when-not (:no-prompt options)
          (println "\nCommand finished in" (u/duration-str @elapsed))
          (println "Press RETURN to exit")
          (flush)
          (read-line)))
      (when-not @success?
        (System/exit 1)))))
