fault_proving(compression_service): initial scaffold for dedicated compression service (#2788)
## Linked Issues/PRs <!-- List of related issues/PRs --> - part of https://github.com/FuelLabs/fuel-core/issues/2775 ## Description <!-- List of detailed changes --> Given that we want to modularize the compression service from the offchain worker, this PR begins the refactor. Things to keep in mind while reviewing - - ports/errors/config/storage traits will evolve with this integration - we will remove temporary compiler/clippy rules once integration is done - tests will come as well - codeowners file has new entry for this service to help expedite reviews This pull request introduces a new dedicated compression service for fuel blocks. The key changes include scaffolding the service, defining its configuration, errors, and ports, and implementing the service logic. Below are the most important changes: ### New Service Implementation: * **Scaffold Compression Service**: Added a new compression service responsible for compressing fuel blocks for Data Availability (DA). (`.changes/added/2788.md`) * **Service Definition**: Implemented the `CompressionService` struct and its associated methods to handle new blocks, perform compression, and manage service state. (`crates/services/compression/src/service.rs`) ### Configuration and Dependencies: * **Cargo.toml Updates**: Added the new compression service to the workspace and defined its dependencies. (`Cargo.toml`, `crates/services/compression/Cargo.toml`) [[1]](diffhunk://#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R21) [[2]](diffhunk://#diff-3b348e1ded89f349afd45656ad5c57ebbab5e690f2bf64e059dd5d7c32de228dR1-R19) * **Configuration**: Defined the `CompressionConfig` struct for service configuration. (`crates/services/compression/src/config.rs`) ### Error Handling: * **Error Definitions**: Created the `CompressionError` enum to handle various errors that may occur during the compression process. (`crates/services/compression/src/errors.rs`) ### Ports and Interfaces: * **Ports for Service Interaction**: Defined ports for block source, compression storage, and configuration to interact with the service. (`crates/services/compression/src/ports.rs`, `crates/services/compression/src/ports/block_source.rs`, `crates/services/compression/src/ports/compression_storage.rs`, `crates/services/compression/src/ports/configuration.rs`) [[1]](diffhunk://#diff-749e0863f7134e84fbbc12941033fa2eee85105be296fba5853083cded778a6eR1-R8) [[2]](diffhunk://#diff-b35ece6e136e2fe3793da56f4456d50692646e9d371946e26024ada643151182R1-R11) [[3]](diffhunk://#diff-766e163ef7ab6dd00944205be543374cd60cefb2fb5605467d2365ca71938cbbR1-R10) [[4]](diffhunk://#diff-931663b130b61eb67d49e463c0c310c308e6393817ea57317e63ebb543a7a0a5R1-R7) ### Code Ownership: * **CODEOWNERS Update**: Assigned the new compression service to the appropriate code owners. (`.github/CODEOWNERS`) ## Checklist - [x] Breaking changes are clearly marked as such in the PR description and changelog - [x] New behavior is reflected in tests - [x] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [x] I have reviewed the code myself - [x] 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
78ff57ccbcca14037707f50fdd8f8780f027f0e4
Parent: 657e3f4
Committed by GitHub <noreply@github.com>
on 3/10/2025, 4:36:31 PM