Block aggregator db adapter (#3092)
## Linked Issues/PRs
<!-- List of related issues/PRs -->
https://github.com/FuelLabs/fuel-core/issues/3088
## Description
<!-- List of detailed changes -->
implements
```rs
/// The definition of the block aggregator database.
pub trait BlockAggregatorDB: Send + Sync {
/// The type used to report a range of blocks
type BlockRange;
/// Stores a block with the given ID
fn store_block(
&mut self,
height: BlockHeight,
block: Block,
) -> impl Future<Output = Result<()>> + Send;
/// Retrieves a range of blocks from the database
fn get_block_range(
&self,
first: BlockHeight,
last: BlockHeight,
) -> impl Future<Output = Result<Self::BlockRange>> + Send;
/// Retrieves the current height of the aggregated blocks If there is a break in the blocks,
/// i.e. the blocks are being aggregated out of order, return the height of the last
/// contiguous block
fn get_current_height(&self) -> impl Future<Output = Result<BlockHeight>> + Send;
}
```
## 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
- [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?
---------
Co-authored-by: Aaryamann Challani <43716372+rymnc@users.noreply.github.com>
Co-authored-by: Green Baneling <XgreenX9999@gmail.com> M
Mitchell Turner committed
baa805f12eef1b3be621520c8449d1ee9ac31593
Parent: d526593
Committed by GitHub <noreply@github.com>
on 9/16/2025, 1:25:08 PM