Expand description
Helper types that can be used by launchers.
§Launch Context Type System
The node launch process uses a type-state pattern to ensure correct initialization order at compile time. Methods are only available when their prerequisites are met.
§Core Types
LaunchContext
: Base context with executor and data directoryLaunchContextWith<T>
: Context with an attached value of typeT
Attached<L, R>
: Pairs values, preserving both previous (L) and new (R) state
§Helper Attachments
WithConfigs
: Node config + TOML configWithMeteredProvider
: Provider factory with metricsWithMeteredProviders
: Provider factory + blockchain providerWithComponents
: Final form with all components
§Method Availability
Methods are implemented on specific type combinations:
impl<T> LaunchContextWith<T>
: Generic methods available for any attachmentimpl LaunchContextWith<WithConfigs>
: Config-specific methodsimpl LaunchContextWith<Attached<WithConfigs, DB>>
: Database operationsimpl LaunchContextWith<Attached<WithConfigs, ProviderFactory>>
: Provider operations- etc.
This ensures correct initialization order without runtime checks.
Structs§
- Attached
- Joins two attachments together, preserving access to both values.
- Launch
Context - Reusable setup for launching a node.
- Launch
Context With - A
LaunchContext
along with an additional value. - With
Components - Helper container to bundle the metered providers container and
NodeAdapter
. - With
Configs - Helper container type to bundle the initial
NodeConfig
and the loaded settings from the reth.toml config - With
Metered Provider - Helper container type to bundle the
ProviderFactory
and the metrics sender. - With
Metered Providers - Helper container to bundle the
ProviderFactory
,FullNodeTypes::Provider
and a metrics sender.