Octez_smart_rollup_node.Snapshotstype compression = | NoProduce uncompressed archive. Takes more space.
*)| On_the_flyCompress archive on the fly. The rollup node will use less disk space to produce the snapshot but will lock the rollup node (if running) for a longer time.
*)| AfterCompress archive after snapshot creation. Uses more disk space temporarily than On_the_fly but does not lock the rollup node for very long.
Compression strategy for snapshot archives.
module Header : sig ... endval export :
?rollup_node_endpoint:Uri.t ->
Tezos_client_base.Client_context.full ->
no_checks:bool ->
compression:compression ->
data_dir:string ->
dest:string option ->
filename:string option ->
level:Cli.snapshot_level ->
string Tezos_base.TzPervasives.tzresult Lwt.texport ?rollup_node_endpoint cctxt ~no_checks ~compression ~data_dir ~dest ~filename ~level creates a tar gzipped archive with name filename (or a generated name) in dest (or the current directory) containing a snapshot of the data of the rollup node with data directory data_dir. The path of the snapshot archive is returned. If no_checks is true, the integrity of the snapshot is not checked at the end. This function will first try to cancel any GC on the target node if rollup_node_endpoint is specified to communicate with it. If level is provided, the snapshot will only contain data up to this level.
val export_compact :
Tezos_client_base.Client_context.full ->
no_checks:bool ->
compression:compression ->
data_dir:string ->
dest:string option ->
filename:string option ->
level:Cli.snapshot_level ->
string Tezos_base.TzPervasives.tzresult Lwt.texport_compact cctxt ~no_checks ~compression ~data_dir ~dest ~filename ~level creates a tar gzipped archive with name filename (or a generated name) in dest (or the current directory) containing a snapshot of the data of the rollup node with data directory data_dir. The difference with export is that the snapshot contains a single commit for the context (which must be reconstructed on import) but is significantly smaller. If no_checks is true, we don't check if commitments are published on L1 (integrity is not checked because it requires rebuilding the context). If level is provided, the snapshot will only contain data up to this level.
val import :
apply_unsafe_patches:bool ->
no_checks:bool ->
force:bool ->
?level:int32 ->
Tezos_client_base.Client_context.full ->
data_dir:string ->
snapshot_file:string ->
unit Tezos_base.TzPervasives.tzresult Lwt.timport ~apply_unsafe_patches ~no_checks ~force ?level cctxt ~data_dir ~snapshot_file imports the snapshot at path snapshot_file into the data directory data_dir. If no_checks is true, the integrity of the imported data is not checked at the end. Import will fail if data_dir is already populated unless force is set to true. if apply_unsafe_patches is true and there is unsafe_pvm_patches in the configuration they will be applied. If level is provided, the imported store is reset to this level.
val info :
snapshot_file:string ->
(Header.t * [ `Compressed | `Uncompressed ]) Tezos_base.TzPervasives.tzresult
Lwt.tinfo ~snapshot_file returns information that can be used to inspect the snapshot file.
val with_modify_data_dir :
Tezos_client_base.Client_context.full ->
data_dir:string ->
apply_unsafe_patches:bool ->
?skip_condition:
(Octez_smart_rollup_node_store.Store.rw ->
Tezos_layer2_store.Context.rw_index ->
head:Octez_smart_rollup.Sc_rollup_block.t ->
bool Tezos_base.TzPervasives.tzresult Lwt.t) ->
(Node_context.rw ->
head:Octez_smart_rollup.Sc_rollup_block.t ->
unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
unit Tezos_base.TzPervasives.tzresult Lwt.twith_modify_data_dir cctxt ~data_dir ~apply_unsafe_patches ?skip_condition f applies f in a read-write context that is created from data-dir (and a potential existing configuration). The node context given to f does not follow the L1 chain and f is only supposed to modify the data of the rollup node. It is used internally by this module to reconstruct contexts from a snapshot but can also be use by the Repair module to apply fixes off-line.