From 0976f308f2e64e2c2ddba3ae16ca62c61e9f45e2 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Wed, 2 Oct 2024 15:33:12 -0400 Subject: [PATCH] feat(x/swingset): Define default vat cleanup budget as { default: 5, kv: 50 } --- .../cosmos/x/swingset/types/default-params.go | 23 +++++++++---------- packages/cosmic-swingset/src/sim-params.js | 20 ++++++++-------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/golang/cosmos/x/swingset/types/default-params.go b/golang/cosmos/x/swingset/types/default-params.go index 867c3e7dde5..fc237862d2e 100644 --- a/golang/cosmos/x/swingset/types/default-params.go +++ b/golang/cosmos/x/swingset/types/default-params.go @@ -75,20 +75,19 @@ var ( NewQueueSize(QueueInbound, DefaultInboundQueueMax), } - // FIXME: Settle on default values - DefaultVatCleanupDefault = sdk.NewUint(0) // 5 - DefaultVatCleanupExports = sdk.NewUint(0) // 5 - DefaultVatCleanupImports = sdk.NewUint(0) // 5 - DefaultVatCleanupKv = sdk.NewUint(0) // 50 - DefaultVatCleanupSnapshots = sdk.NewUint(0) // 50 - DefaultVatCleanupTranscripts = sdk.NewUint(0) // 50 - DefaultVatCleanupBudget = []UintMapEntry{ + DefaultVatCleanupDefault = sdk.NewUint(5) + // DefaultVatCleanupExports = DefaultVatCleanupDefault + // DefaultVatCleanupImports = DefaultVatCleanupDefault + DefaultVatCleanupKv = sdk.NewUint(50) + // DefaultVatCleanupSnapshots = DefaultVatCleanupDefault + // DefaultVatCleanupTranscripts = DefaultVatCleanupDefault + DefaultVatCleanupBudget = []UintMapEntry{ UintMapEntry{VatCleanupDefault, DefaultVatCleanupDefault}, - UintMapEntry{VatCleanupExports, DefaultVatCleanupExports}, - UintMapEntry{VatCleanupImports, DefaultVatCleanupImports}, + // UintMapEntry{VatCleanupExports, DefaultVatCleanupExports}, + // UintMapEntry{VatCleanupImports, DefaultVatCleanupImports}, UintMapEntry{VatCleanupKv, DefaultVatCleanupKv}, - UintMapEntry{VatCleanupSnapshots, DefaultVatCleanupSnapshots}, - UintMapEntry{VatCleanupTranscripts, DefaultVatCleanupTranscripts}, + // UintMapEntry{VatCleanupSnapshots, DefaultVatCleanupSnapshots}, + // UintMapEntry{VatCleanupTranscripts, DefaultVatCleanupTranscripts}, } ) diff --git a/packages/cosmic-swingset/src/sim-params.js b/packages/cosmic-swingset/src/sim-params.js index 332febc1f6e..b6639a3d293 100644 --- a/packages/cosmic-swingset/src/sim-params.js +++ b/packages/cosmic-swingset/src/sim-params.js @@ -75,24 +75,24 @@ export const defaultQueueMax = [ ]; export const vatCleanupDefault = 'default'; -export const defaultVatCleanupDefault = 0; +export const defaultVatCleanupDefault = 5; export const vatCleanupExports = 'exports'; -export const defaultVatCleanupExports = 0; +// export const defaultVatCleanupExports = defaultVatCleanupDefault; export const vatCleanupImports = 'imports'; -export const defaultVatCleanupImports = 0; +// export const defaultVatCleanupImports = defaultVatCleanupDefault; export const vatCleanupKv = 'kv'; -export const defaultVatCleanupKv = 0; +export const defaultVatCleanupKv = 50; export const vatCleanupSnapshots = 'snapshots'; -export const defaultVatCleanupSnapshots = 0; +// export const defaultVatCleanupSnapshots = defaultVatCleanupDefault; export const vatCleanupTranscripts = 'transcripts'; -export const defaultVatCleanupTranscripts = 0; +// export const defaultVatCleanupTranscripts = defaultVatCleanupDefault; export const defaultVatCleanupBudget = [ { key: vatCleanupDefault, value: `${defaultVatCleanupDefault}` }, - { key: vatCleanupExports, value: `${defaultVatCleanupExports}` }, - { key: vatCleanupImports, value: `${defaultVatCleanupImports}` }, + // { key: vatCleanupExports, value: `${defaultVatCleanupExports}` }, + // { key: vatCleanupImports, value: `${defaultVatCleanupImports}` }, { key: vatCleanupKv, value: `${defaultVatCleanupKv}` }, - { key: vatCleanupSnapshots, value: `${defaultVatCleanupSnapshots}` }, - { key: vatCleanupTranscripts, value: `${defaultVatCleanupTranscripts}` }, + // { key: vatCleanupSnapshots, value: `${defaultVatCleanupSnapshots}` }, + // { key: vatCleanupTranscripts, value: `${defaultVatCleanupTranscripts}` }, ]; /**