private static void logInconsistencyAndFail(
      final VariablesStorage.Keys key, final Object bch, final Object vch) {
    LOG.error(
        "Inconsistency found when migrating {} to variables storage,"
            + " probably this is due to a downgrade done without running the `storage revert-variables`"
            + " subcommand first, see https://github.com/hyperledger/besu/pull/5471",
        key);
    throw new IllegalStateException(
        key + " mismatch: blockchain storage value=" + bch + ", variables storage value=" + vch);
  }
One time migration of variables from the blockchain storage to the dedicated variable storage.
To avoid state inconsistency in case of a downgrade done without running the storage
revert-variables subcommand it fails giving the possibility to retry the downgrade procedure.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/storage/keyvalue/KeyValueStoragePrefixedKeyBlockchainStorage.java