Skip to content

Commit

Permalink
feat(x/swingset): Define default vat cleanup budget as { default: 5, …
Browse files Browse the repository at this point in the history
…kv: 50 }
  • Loading branch information
gibson042 committed Oct 22, 2024
1 parent 91daea3 commit 0976f30
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
23 changes: 11 additions & 12 deletions golang/cosmos/x/swingset/types/default-params.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
)

Expand Down
20 changes: 10 additions & 10 deletions packages/cosmic-swingset/src/sim-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}` },
];

/**
Expand Down

0 comments on commit 0976f30

Please sign in to comment.