FuelLabs / fuel-core

Rust full node implementation of the Fuel v2 protocol.
Other
57.95k stars 2.79k forks source link

chore(gas_price_service): split into v0 and v1 and squash FuelGasPriceUpdater type into GasPriceService #2256

Closed rymnc closed 1 month ago

rymnc commented 1 month ago

[!WARNING] 🚧🚧 This is PR 6/n in refactoring the gas price service. Now that the algorithm_updater is a part of fuel-core-gas-price-service we have squashed it into the GasPriceService using the UninitializedTask struct. We don't implement RunnableService or RunnableTask for the UninitializedTask struct, merely use it as a wrapper to generate the GasPriceServiceV0 🚧🚧

Linked Issues/PRs

Description

graph TD                                                                                                                                                                                                  
     A["lib.rs (entry point)"]                                                                                                                                                                               
     B[common]                                                                                                                                                                                             
     B1[utils]                                                                                                                                                                                             
     B2[storage]                                                                                                                                                                                           
     B3[l2_block_source]                                                                                                                                                                                   
     C[ports]                                                                                                                                                                                              
     D[v0]                                                                                                                                                                                                 
     E[v1]                                                                                                                                                                                                 
     F[v0/algorithm]                                                                                                                                                                                       
     G[v1/algorithm]                                                                                                                                                                                       
     H[v0/service]                                                                                                                                                                                         
     I[v1/da_source]                                                                                                                                                                                       
     J[v0/metadata]                                                                                                                                                                                        
     K[v1/service]                                                                                                                                                                                         
     L[v0/uninitialized]                                                                                                                                                                                   

     A --> B                                                                                                                                                                                               
     B --> B1                                                                                                                                                                                              
     B --> B2                                                                                                                                                                                              
     B --> B3                                                                                                                                                                                              
     B --> C                                                                                                                                                                                               
     C --> D                                                                                                                                                                                               
     C --> E                                                                                                                                                                                               
     D --> F                                                                                                                                                                                               
     D --> H                                                                                                                                                                                               
     D --> J                                                                                                                                                                                               
     D --> L                                                                                                                                                                                               
     E --> G                                                                                                                                                                                               
     E --> I                                                                                                                                                                                               
     E --> K                                                                                                                                                                                               
     F --> H                                                                                                                                                                                               
     G --> I                                                                                                                                                                                               
     H --> J                                                                                                                                                                                               
     J --> L                                                                                                                                                                                               
     L --> M[SharedV0Algorithm]                                                                                                                                                                            
     L --> N[GasPriceServiceV0]                                                                                                                                                                            

     subgraph Common                                                                                                                                                                                       
         B                                                                                                                                                                                                 
         B1                                                                                                                                                                                                
         B2                                                                                                                                                                                                
         B3                                                                                                                                                                                                
     end                                                                                                                                                                                                   

     subgraph Ports                                                                                                                                                                                        
         C                                                                                                                                                                                                 
     end                                                                                                                                                                                                   

     subgraph V0                                                                                                                                                                                           
         D                                                                                                                                                                                                 
         F                                                                                                                                                                                                 
         H                                                                                                                                                                                                 
         J                                                                                                                                                                                                 
         L                                                                                                                                                                                                 
     end                                                                                                                                                                                                   

     subgraph V1                                                                                                                                                                                           
         E                                                                                                                                                                                                 
         G                                                                                                                                                                                                 
         I                                                                                                                                                                                                 
         K                                                                                                                                                                                                 
     end                                                                                                                                                                                               

Checklist

Before requesting review

After merging, notify other teams

[Add or remove entries as needed]