# EPF6 - Week 12
## Overview
- Attended core dev call and shared updates
- Research-focused week with emphasis on pre-deployment validation of the Kurtosis network config
- Reviewed PR comments from my mentor, polished existing code, and addressed suggested changes
## Main points
- **PR review and code polishing**
- Incorporated mentor feedback into the existing PR.
- Refactored `NodeService` to use a single role instead of multiple boolean flags
- Changed `beaconApiUrl` to a more generic `apiUrl` for abstraction
- Updated enclave name generation to be unique per simulation
- Updated `multiFork.test.ts` with the new Kurtosis configuration
- Improved parameters in `multi-fork.yml` to more closely mirror `multiFork.test.ts`
- Removed `runner-test.ts` from the PR
- Added TODO comment for merging `simulation-kurtosis` into `simulation`
- **Exploration: validating Kurtosis config before enclave startup**
- Investigated whether **`ethereum-package` or Kurtosis** provides **built-in validation**
- Found validation hooks in `ethereum-package`:
- `src/package_io/sanity_check.star`
- `src/package_io/input_parser.star`
- In **Kurtosis**, discovered the `DryRun` option:
> When set to true, the Kurtosis instructions are not executed. Configurable using `WithDryRun` (defaults to `false`).
```typescript
const runConfig = new StarlarkRunConfig(
StarlarkRunConfig.WithSerializedParams(serializedParams),
StarlarkRunConfig.WithDryRun(false)
);
```
- **Early validation research**
- Observed that `create()` in *kurtosisSDKRunner* calls `runStarlarkRemotePackageBlocking()`, which internally calls [sanity_check()](https://github.com/ethpandaops/ethereum-package/blob/e964e305a19d56b798800e84d264f97b87952c55/src/package_io/sanity_check.star#L460) and [input_parser()](https://github.com/ethpandaops/ethereum-package/blob/e964e305a19d56b798800e84d264f97b87952c55/src/package_io/input_parser.star#L89) from the ethereum-package
- *Open question*: should validation remain in this place, or be moved earlier in the Simulation flow (e.g. after `start()` and before `create()`)
## Learnings & Outcomes
* Validation logic **already exists** inside ethereum-package, but its placement may not be ideal for Simulation use
* Kurtosis provides a `DryRun` mode that can be leveraged for early validation without spinning up enclaves.
* Handling the **PR cycle**: incremental improvements and mentor feedback loops
* Still exploratory: deciding the right point for validation in the Simulation workflow is an open question
## Week 13 TODOs
- Collect feedback on the new commit
- Continue research on `NodeService` structure
- Ongoing research on optimizing `.yml` network configuration parameters to more closely mirror existing test configurations (`multiFork.test.ts`).
- Ongoing feedback from mentor throughout the project
### Useful resources checked
Lodestar PR: https://github.com/ChainSafe/lodestar/pull/8296