Skip to content

Commit

Permalink
Add rationale
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Jun 9, 2022
1 parent f922a6b commit d3637f0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/cli/src/applyPreset.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
// MUST import this file first before anything and not import any Lodestar code
// MUST import this file first before anything and not import any Lodestar code.
//
// ## Rationale
//
// Lodestar implemented PRESET / CONFIG separation to allow importing types and preset constants directly
// see https://github.com/ChainSafe/lodestar/pull/2585
//
// However this prevents dynamic configuration changes which is exactly what the CLI required before.
// - The dev command can't apply the minimal preset dynamically
// - `--network gnosis` can't apply a different preset dynamically
//
// Running this file allows us to keep a static export strategy while NOT requiring users to
// set LODESTAR_PRESET manually every time.

const network = valueOfArg("network");
const preset = valueOfArg("preset");

Expand Down

0 comments on commit d3637f0

Please sign in to comment.