save_reader_publication_journal

Documentation for eth_defi.vault.rpc_scan_state.save_reader_publication_journal function.

save_reader_publication_journal(journal_path, temporary_prices, output_prices, states)

Durably prepare reader progress before replacing the price file.

Rename preserves the temporary file’s inode, size and nanosecond mtime. These identify the exact local publication without hashing a large Parquet. An interrupted pre-publication receipt cannot match the previous file.

The Parquet writer calls this after validating/syncing its temporary file and before os.replace(). The scheduler recovers only a matching published inode, merges reader cursors monotonically, then writes the legacy pickle before consuming the receipt. This is local crash recovery, not a portable restore receipt: copied or subsequently replaced files need not match.

Parameters
  • journal_path (pathlib.Path) – New sidecar beside the critical reader-state pickle.

  • temporary_prices (pathlib.Path) – Verified and fsynced Parquet about to be renamed.

  • output_prices (pathlib.Path) – Final Parquet path.

  • states (dict) – Reader state already serialised using the legacy schema.

Returns

None.

Return type

None