chore(compression): merkleized registration table (#2959)
This pull request introduces a new `Registrations` table to the compression service, enabling the tracking and merkleization of registrations for compressed blocks. It includes updates to the database schema, error handling, and tests to support this new functionality. Below is a breakdown of the most important changes: ### Addition of `Registrations` Table * Introduced the `Registrations` table in the compression database, which maps block heights to registrations made for compressing those blocks. This table is merkleized for fault-proofing. (`.changes/added/2959.md`, `crates/services/compression/src/storage/registrations.rs`) [[1]](diffhunk://#diff-473ce0bca28d3684eac4b5a9548eef03dd51630a607890106e3bd85aa0da8101R1) [[2]](diffhunk://#diff-158a54491feb11d974d50f05aaef46446007139e3708e63befe0432312dbd189R1-R54) * Added a type alias `Registrations` for the merkleized `Registrations` table in `crates/services/compression/src/storage.rs`. ### Integration with Compression Service * Updated the `CompressionStorage` implementation to insert data into the `Registrations` table when the `fault-proving` feature is enabled. (`crates/services/compression/src/ports/compression_storage.rs`) * Added a new test to verify that the `Registrations` table is correctly populated and merkleized during compression. (`crates/services/compression/src/service.rs`) ### Error Handling Updates * Added a new `CompressionError` variant, `FailedToWriteRegistrations`, to handle errors related to writing to the `Registrations` table. (`crates/services/compression/src/errors.rs`) ### Schema and Column Updates * Added a new column, `Registrations`, to the `CompressionColumn` enum for tracking registrations per table. (`crates/services/compression/src/storage/column.rs`) * Enabled the `registrations` module in the storage system when the `fault-proving` feature is active. (`crates/services/compression/src/storage.rs`) --------- Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
A
Aaryamann Challani committed
5dae42bafdc5c4e20322564c6414c92a58061525
Parent: 2bd308b
Committed by GitHub <noreply@github.com>
on 6/19/2025, 7:14:38 AM