@@ -2,6 +2,17 @@ open Async
22open Core
33open Mina_automation
44
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 *)
516let assert_replayer_run_against_last_block ~replayer_input_file_path archive_uri
617 output =
718 let open Deferred.Let_syntax in
@@ -31,6 +42,14 @@ let assert_replayer_run_against_last_block ~replayer_input_file_path archive_uri
3142 String. equal output_ledger.target_epoch_ledgers_state_hash latest_state_hash ) ;
3243 Deferred. unit
3344
45+ (* * Unpack precomputed blocks from a source archive to a temporary directory.
46+
47+ This function extracts precomputed blocks from a tar archive into the specified
48+ temporary directory and filters the results to only include JSON files.
49+
50+ @param temp_dir Temporary directory path where blocks will be extracted
51+ @param source Source path of the tar archive containing precomputed blocks
52+ @return Deferred list of file paths to extracted JSON block files *)
3453let unpack_precomputed_blocks ~temp_dir source =
3554 let open Deferred.Let_syntax in
3655 let % bind precomputed_blocks =
0 commit comments