@@ -2,6 +2,17 @@ open Async
2
2
open Core
3
3
open Mina_automation
4
4
5
+ (* * Assert that the replayer runs successfully against the latest block in the archive.
6
+
7
+ This function queries the archive database to find the latest state hash,
8
+ then runs the replayer with the specified input configuration file against
9
+ that target state hash. It verifies that the output ledger's target epoch
10
+ ledgers state hash matches the latest state hash from the database.
11
+
12
+ @param replayer_input_file_path Path to the replayer input configuration file
13
+ @param archive_uri URI connection string for the archive database
14
+ @param output Output directory path where the ledger will be written
15
+ @return Unit deferred that completes when assertion passes *)
5
16
let assert_replayer_run_against_last_block ~replayer_input_file_path archive_uri
6
17
output =
7
18
let open Deferred.Let_syntax in
@@ -31,6 +42,16 @@ let assert_replayer_run_against_last_block ~replayer_input_file_path archive_uri
31
42
String. equal output_ledger.target_epoch_ledgers_state_hash latest_state_hash ) ;
32
43
Deferred. unit
33
44
45
+
46
+
47
+ (* * Unpack precomputed blocks from a source archive to a temporary directory.
48
+
49
+ This function extracts precomputed blocks from a tar archive into the specified
50
+ temporary directory and filters the results to only include JSON files.
51
+
52
+ @param temp_dir Temporary directory path where blocks will be extracted
53
+ @param source Source path of the tar archive containing precomputed blocks
54
+ @return Deferred list of file paths to extracted JSON block files *)
34
55
let unpack_precomputed_blocks ~temp_dir source =
35
56
let open Deferred.Let_syntax in
36
57
let % bind precomputed_blocks =
0 commit comments