fault_proving(compression): implement compression in compression service (#2844)
## Linked Issues/PRs <!-- List of related issues/PRs --> - part of #2775 ## Description <!-- List of detailed changes --> ai generated desc: This pull request introduces significant updates to the `fuel-core-compression-service`, including the implementation of DA compression, configuration enhancements, error handling improvements, and new features for block and storage management. The most important changes are summarized below: ### Implementation and Configuration Enhancements: * Implemented DA compression in `fuel-core-compression-service`. * Added new dependencies and features in `Cargo.toml` for `fuel-core-chain-config`, `futures`, and `paste`. [[1]](diffhunk://#diff-3b348e1ded89f349afd45656ad5c57ebbab5e690f2bf64e059dd5d7c32de228dR15-R23) [[2]](diffhunk://#diff-3b348e1ded89f349afd45656ad5c57ebbab5e690f2bf64e059dd5d7c32de228dR34-R42) * Introduced `CompressionConfig` with `temporal_registry_retention` and methods for configuration management. ### Error Handling Improvements: * Enhanced error handling in `CompressionError` by replacing string errors with `StorageError` and adding a new error variant for block compression failures. [[1]](diffhunk://#diff-4e1e8a438c26f0ee9cde7ff8e033cb1ab58ffd3f5fad9dd5f39a74269a4a971cR1) [[2]](diffhunk://#diff-4e1e8a438c26f0ee9cde7ff8e033cb1ab58ffd3f5fad9dd5f39a74269a4a971cL13-R21) ### Block and Storage Management: * Introduced `BlockWithMetadata` struct to encapsulate block data and associated events. * Updated `CompressionStorage` trait to include methods for reading and writing compressed blocks, and getting the latest height. ### Service Enhancements: * Refactored `CompressionService` to use the new configuration and block structures. [[1]](diffhunk://#diff-9fc61045febb6284fa8e01c5c33172787228fe21b8b813c62c8f03d2fec55fe8L1-R124) [[2]](diffhunk://#diff-9fc61045febb6284fa8e01c5c33172787228fe21b8b813c62c8f03d2fec55fe8L78-L82) [[3]](diffhunk://#diff-9fc61045febb6284fa8e01c5c33172787228fe21b8b813c62c8f03d2fec55fe8L105-R167) [[4]](diffhunk://#diff-9fc61045febb6284fa8e01c5c33172787228fe21b8b813c62c8f03d2fec55fe8L124-R191) [[5]](diffhunk://#diff-9fc61045febb6284fa8e01c5c33172787228fe21b8b813c62c8f03d2fec55fe8L143-R276) * Added new tests for `CompressionService` to verify its functionality with different block sources and configurations. ### Miscellaneous: * Added new module for `temporal_registry` implementations. * Introduced `timestamps` module and corresponding type alias in `storage.rs`. [[1]](diffhunk://#diff-6354c3b240b9d7af0841032b5051a86cf313008738ca64e678a1783912dd0640R22-R23) [[2]](diffhunk://#diff-6354c3b240b9d7af0841032b5051a86cf313008738ca64e678a1783912dd0640R46-R48) * Added `Timestamps` to `CompressionColumn` enum. ## Checklist - [ ] Breaking changes are clearly marked as such in the PR description and changelog - [ ] New behavior is reflected in tests - [ ] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [ ] I have reviewed the code myself - [ ] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Sway compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else?
A
Aaryamann Challani committed
d822904b7c4589c814897583ef1a766781d49ba4
Parent: aef46bc
Committed by GitHub <noreply@github.com>
on 3/17/2025, 11:15:00 AM