Skip to content

Commit

Permalink
comments on schema versions/deltas
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Aug 10, 2024
1 parent fd76396 commit 5eb735b
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions packages/SwingSet/src/kernel/state/kernelKeeper.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ export const CURRENT_SCHEMA_VERSION = 1;
// allowed to vary between instances in a consensus machine. Everything else
// is required to be deterministic.
//
// The current ("v1") schema is:
//
// The schema is indicated by the value of the "version" key, which
// was added for version 1 (i.e., version 0 had no such key), and is
// only modified by a call to upgradeSwingset(). See below for
// deltas/upgrades from one version to the next.
//
// The current ("v1") schema keys/values are:
//
// version = '1'
// vat.names = JSON([names..])
Expand Down Expand Up @@ -155,12 +161,16 @@ export const CURRENT_SCHEMA_VERSION = 1;
// Prefix reserved for host written data:
// host.

// Kernel state schemas. The 'version' key records the state of the
// database, and is only modified by a call to upgradeSwingset().
// Kernel state schema changes:
//
// v0: the original
// v1: replace `kernel.defaultReapInterval` with `kernel.defaultReapDirtThreshold`
// replace vat's `vNN.reapInterval`/`vNN.reapCountdown` with `vNN.reapDirt`
// * no `version`
// * uses `initialized = 'true'`
// v1:
// * add `version = '1'`
// * remove `initialized`
// * replace `kernel.defaultReapInterval` with `kernel.defaultReapDirtThreshold`
// * replace vat's `vNN.reapInterval`/`vNN.reapCountdown` with `vNN.reapDirt`
// and a `vNN.reapDirtThreshold` in `vNN.options`

export function commaSplit(s) {
Expand Down

0 comments on commit 5eb735b

Please sign in to comment.