Module common

Module common 

Source
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

§Helper Attachments

§Method Availability

Methods are implemented on specific type combinations:

  • impl<T> LaunchContextWith<T>: Generic methods available for any attachment
  • impl LaunchContextWith<WithConfigs>: Config-specific methods
  • impl LaunchContextWith<Attached<WithConfigs, DB>>: Database operations
  • impl 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.
LaunchContext
Reusable setup for launching a node.
LaunchContextWith
A LaunchContext along with an additional value.
WithComponents
Helper container to bundle the metered providers container and NodeAdapter.
WithConfigs
Helper container type to bundle the initial NodeConfig and the loaded settings from the reth.toml config
WithMeteredProvider
Helper container type to bundle the ProviderFactory and the metrics sender.
WithMeteredProviders
Helper container to bundle the ProviderFactory, FullNodeTypes::Provider and a metrics sender.