diff --git a/cardano-testnet/changelog.d/20260226_005016_palas_default_to_update_timestamps.md b/cardano-testnet/changelog.d/20260226_005016_palas_default_to_update_timestamps.md new file mode 100644 index 00000000000..6c71cd105e2 --- /dev/null +++ b/cardano-testnet/changelog.d/20260226_005016_palas_default_to_update_timestamps.md @@ -0,0 +1,9 @@ +### Added + +- Added `--preserve-timestamps` flag. When set, genesis file timestamps are kept as-is. + +### Changed + +- Timestamps in genesis files are now updated to the current date by default. +- The `--update-time` flag is now internal (hidden, kept for backward compatibility). + diff --git a/cardano-testnet/src/Parsers/Cardano.hs b/cardano-testnet/src/Parsers/Cardano.hs index 0275b9cfa3f..89a3dd5c45d 100644 --- a/cardano-testnet/src/Parsers/Cardano.hs +++ b/cardano-testnet/src/Parsers/Cardano.hs @@ -134,11 +134,14 @@ pMainnetParams = OA.flag' OnChainParamsMainnet ) pUpdateTimestamps :: Parser UpdateTimestamps -pUpdateTimestamps = OA.flag DontUpdateTimestamps UpdateTimestamps - ( OA.long "update-time" - <> OA.help "Update the time stamps in genesis files to current date" - <> OA.showDefault - ) +pUpdateTimestamps = + -- Default to UpdateTimestamps, because when using the two-step flow + -- (cardano-testnet create-env → cardano-testnet cardano --node-env), + -- genesis timestamps can become stale. + -- See https://github.com/IntersectMBO/cardano-node/issues/6455 + OA.flag' UpdateTimestamps (OA.long "update-time" <> OA.help "Update the time stamps in genesis files to current date (default, kept for backward compatibility)" <> OA.internal) + <|> OA.flag' DontUpdateTimestamps (OA.long "preserve-timestamps" <> OA.help "Do not update the time stamps in genesis files to current date.") + <|> pure UpdateTimestamps pEnvOutputDir :: Parser FilePath pEnvOutputDir = OA.strOption diff --git a/cardano-testnet/test/cardano-testnet-golden/files/golden/help.cli b/cardano-testnet/test/cardano-testnet-golden/files/golden/help.cli index 5b49e6538d9..7560ea5978c 100644 --- a/cardano-testnet/test/cardano-testnet-golden/files/golden/help.cli +++ b/cardano-testnet/test/cardano-testnet-golden/files/golden/help.cli @@ -13,7 +13,7 @@ Usage: cardano-testnet cardano [--num-pool-nodes COUNT] [--slot-length SECONDS] [--active-slots-coeff DOUBLE] [--node-env FILEPATH] - [--update-time] + [--preserve-timestamps] [--params-file FILEPATH | --params-mainnet] Start a testnet and keep it running until stopped diff --git a/cardano-testnet/test/cardano-testnet-golden/files/golden/help/cardano.cli b/cardano-testnet/test/cardano-testnet-golden/files/golden/help/cardano.cli index 50b9eb7e8cb..18cbac06741 100644 --- a/cardano-testnet/test/cardano-testnet-golden/files/golden/help/cardano.cli +++ b/cardano-testnet/test/cardano-testnet-golden/files/golden/help/cardano.cli @@ -11,7 +11,7 @@ Usage: cardano-testnet cardano [--num-pool-nodes COUNT] [--slot-length SECONDS] [--active-slots-coeff DOUBLE] [--node-env FILEPATH] - [--update-time] + [--preserve-timestamps] [--params-file FILEPATH | --params-mainnet] Start a testnet and keep it running until stopped @@ -51,8 +51,8 @@ Available options: otherwise). You can generate a default environment with the 'create-env' command, then modify it and pass it with this argument. - --update-time Update the time stamps in genesis files to current - date + --preserve-timestamps Do not update the time stamps in genesis files to + current date. --params-file FILEPATH File containing custom on-chain parameters in Blockfrost format: https://docs.blockfrost.io/#tag/cardano--epochs/GET/epochs/latest/parameters