Skip to content

cardano-testnet: Default to UpdateTimestamps in the UserProvidedEnv branch #6455

@palas

Description

@palas

Problem

When using the two-step flow (create-envcardano --node-env), genesis timestamps become stale between the two invocations. create-env writes start times as now + 15s, but by the time cardano --node-env runs, those times are in the past. The default for updateTimestamps is DontUpdateTimestamps, so unless the user explicitly passes --update-time, the testnet may fail to start.

In the direct cardano path (no --node-env), this is not a problem because createTestnetEnv and cardanoTestnet run back-to-back in the same process.

Proposed fix

In Parsers/Run.hs, in the UserProvidedEnv branch of runCardanoOptions, pass conf{updateTimestamps=UpdateTimestamps} as the default. Consider adding a --no-update-time flag for opt-out.

This is a 1-line change. Updating already-fresh timestamps is harmless (just shifts them by ~15s).

Type: Consistency fix

Effort: Trivial (1 line)

Risk: Very low

Metadata

Metadata

Assignees

Labels

minorfixSomething that needs to be fixed (e.g. a hard-coded constant), but that isnt a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions