From b5f3331394fb984965ddd3aee02e3e49c8c6d723 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Tue, 25 Feb 2025 10:17:53 +0100 Subject: [PATCH] EVM Node: Defaults to use `.gz` for compressed snapshots It was `.uncompressed` for uncompressed snapshots before. --- etherlink/CHANGES_NODE.md | 5 +++++ etherlink/bin_node/lib_dev/snapshots.ml | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/etherlink/CHANGES_NODE.md b/etherlink/CHANGES_NODE.md index a3714c22eb02..f855d2b1b3de 100644 --- a/etherlink/CHANGES_NODE.md +++ b/etherlink/CHANGES_NODE.md @@ -7,6 +7,11 @@ - The default snapshot filename has been changed from `evm-snapshot--` to `evm--snapshot--`. (!16946) +- When an explicit snapshot filename is omitted, `snapshot export` will append + `.gz` to compressed snapshots and will not add any file extension to + uncompressed snapshots. Previously, the node was not adding any extension to + compressed snapshots, and was appending `.uncompressed` to uncompressed + snapshots. (!16957) ### Configuration changes diff --git a/etherlink/bin_node/lib_dev/snapshots.ml b/etherlink/bin_node/lib_dev/snapshots.ml index 45750b9fda6e..df6a38271f03 100644 --- a/etherlink/bin_node/lib_dev/snapshots.ml +++ b/etherlink/bin_node/lib_dev/snapshots.ml @@ -233,8 +233,9 @@ let export ?snapshot_file ~compression ~data_dir () = match (snapshot_file, compression) with | Some f, After -> f ^ ".uncompressed" | Some f, (No | On_the_fly) -> f - | None, On_the_fly -> default_snapshot_file - | None, (No | After) -> default_snapshot_file ^ ".uncompressed" + | None, On_the_fly -> default_snapshot_file ^ ".gz" + | None, After -> default_snapshot_file ^ ".gz.uncompressed" + | None, No -> default_snapshot_file in let*? dest_file = interpolate_snapshot_file -- GitLab