feat: Add cl_devices parameter for mounting host devices to CL containers #1251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for mounting host devices (e.g.,
/dev/tpm0) into Consensus Layer (CL) containers. This enables use cases such as TPM (Trusted Platform Module) access for hardware-backed security features in CL clients like Lighthouse.Changes
Configuration (
network_params.yaml)cl_devices: []parameter to participant structure["/dev/tpm0"])Input Parser (
src/package_io/input_parser.star)cl_devices: []to default participant structurecl_devicesto participant struct creationValidation (
src/package_io/sanity_check.star)cl_devicesto participant validation listsPARTICIPANT_CATEGORIESandPARTICIPANT_MATRIX_PARAMSCL Launchers
Updated all CL client launchers to pass devices to
ServiceConfig:src/cl/lighthouse/lighthouse_launcher.starsrc/cl/lodestar/lodestar_launcher.starsrc/cl/nimbus/nimbus_launcher.starsrc/cl/prysm/prysm_launcher.starsrc/cl/teku/teku_launcher.starsrc/cl/grandine/grandine_launcher.starEach launcher now includes:
if len(participant.cl_devices) > 0:
config_args["devices"] = participant.cl_devices### Package Configuration (
kurtosis.yml)Usage
Users can now specify devices in their
network_params.yaml:aml
participants:
cl_type: lighthouse
cl_devices: ["/dev/tpm0"]
... other configOr for multiple devices:
cl_devices: ["/dev/tpm0", "/dev/tpm1"]
Requirements
This feature requires a patched version of Kurtosis that includes device mounting support in
ServiceConfig. The standard Kurtosis release does not yet support thedevicesfield. A PR has been opened there.Implementation Details
ServiceConfigas a list of stringsTesting
Related
This change enables hardware device access for CL containers, particularly useful for: