Commit ab9e55f
feat: Add cl_devices parameter for mounting host devices to CL containers (#1251)
# Update
This PR requires you to run the latest (1.14.1+) version of kurtosis!
## 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`)
- Added `cl_devices: []` parameter to participant structure
- Accepts a list of device paths (e.g., `["/dev/tpm0"]`)
### Input Parser (`src/package_io/input_parser.star`)
- Added `cl_devices: []` to default participant structure
- Added `cl_devices` to participant struct creation
### Validation (`src/package_io/sanity_check.star`)
- Added `cl_devices` to participant validation lists
- Added to both `PARTICIPANT_CATEGORIES` and `PARTICIPANT_MATRIX_PARAMS`
### CL Launchers
Updated all CL client launchers to pass devices to `ServiceConfig`:
- `src/cl/lighthouse/lighthouse_launcher.star`
- `src/cl/lodestar/lodestar_launcher.star`
- `src/cl/nimbus/nimbus_launcher.star`
- `src/cl/prysm/prysm_launcher.star`
- `src/cl/teku/teku_launcher.star`
- `src/cl/grandine/grandine_launcher.star`
Each launcher now includes:
if len(participant.cl_devices) > 0:
config_args["devices"] = participant.cl_devices### Package Configuration
(`kurtosis.yml`)
- Updated package name to match repository location
## Usage
Users can now specify devices in their `network_params.yaml`:
aml
participants:
- el_type: geth
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 the `devices` field. A PR has been opened
there.
## Implementation Details
- Devices are passed through to Kurtosis `ServiceConfig` as a list of
strings
- Each device path is mounted at the same path inside the container
- Empty list (default) results in no device mounts
- Works with all supported CL clients (Lighthouse, Lodestar, Nimbus,
Prysm, Teku, Grandine)
## Testing
- [x] Added parameter to configuration structure
- [x] Updated all CL launchers
- [x] Added validation
- [ ] Requires testing with patched Kurtosis build
## Related
This change enables hardware device access for CL containers,
particularly useful for:
- TPM-based key management
- Hardware security modules (HSM)
- Other device-specific use cases
---------
Signed-off-by: Barnabas Busa <[email protected]>
Co-authored-by: Barnabas Busa <[email protected]>
Co-authored-by: Barnabas Busa <[email protected]>1 parent ba855e0 commit ab9e55f
File tree
24 files changed
+73
-0
lines changed- src
- cl
- grandine
- lighthouse
- lodestar
- nimbus
- prysm
- teku
- el
- besu
- erigon
- ethereumjs
- ethrex
- geth
- nethermind
- nimbus-eth1
- reth
- package_io
- vc
24 files changed
+73
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
227 | 233 | | |
228 | 234 | | |
229 | 235 | | |
| |||
289 | 295 | | |
290 | 296 | | |
291 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
292 | 304 | | |
293 | 305 | | |
294 | 306 | | |
| |||
365 | 377 | | |
366 | 378 | | |
367 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
368 | 386 | | |
369 | 387 | | |
370 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
364 | 366 | | |
365 | 367 | | |
366 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
337 | 339 | | |
338 | 340 | | |
339 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
| 375 | + | |
374 | 376 | | |
375 | 377 | | |
376 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
353 | 355 | | |
354 | 356 | | |
355 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
375 | 377 | | |
376 | 378 | | |
377 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
285 | 287 | | |
286 | 288 | | |
287 | 289 | | |
| |||
0 commit comments