public static GenesisConfig updateGenesis(final Map<String, String> overrides)
      throws RuntimeException {
    GenesisConfig genesisConfig;
    try {
      if (EPHEMERY.getGenesisFile() == null) {
        throw new IOException("Genesis file or config options are null");
      }
      genesisConfig = GenesisConfig.fromResource(EPHEMERY.getGenesisFile());
      long genesisTimestamp = genesisConfig.getTimestamp();
      Optional<BigInteger> genesisChainId = genesisConfig.getConfigOptions().getChainId();
      long currentTimestamp = Instant.now().getEpochSecond();
      long periodsSinceGenesis =
          ChronoUnit.DAYS.between(Instant.ofEpochSecond(genesisTimestamp), Instant.now())
              / PERIOD_IN_DAYS;

      long updatedTimestamp = genesisTimestamp + (periodsSinceGenesis * PERIOD_IN_SECONDS);
      BigInteger updatedChainId =
          genesisChainId
              .orElseThrow(() -> new IllegalStateException("ChainId not present"))
              .add(BigInteger.valueOf(periodsSinceGenesis));
      // has a period elapsed since original ephemery genesis time? if so, override chainId and
      // timestamp
      if (currentTimestamp > (genesisTimestamp + PERIOD_IN_SECONDS)) {
        overrides.put("chainId", String.valueOf(updatedChainId));
        overrides.put("timestamp", String.valueOf(updatedTimestamp));
        genesisConfig = genesisConfig.withOverrides(overrides);
      }
      return genesisConfig.withOverrides(overrides);
    } catch (IOException e) {
      throw new RuntimeException("Error updating ephemery genesis: " + e.getMessage(), e);
    }
  }
Updates the Ephemery genesis configuration based on the predefined period.

@param overrides a map of configuration overrides
@return the updated GenesisConfigFile
@throws RuntimeException if an error occurs during the update process
app/src/main/java/org/hyperledger/besu/util/EphemeryGenesisUpdater.java