Skip to content

Commit

Permalink
refactor: slightly better marshal identification for diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Mar 28, 2024
1 parent c774209 commit f42e7ff
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/SwingSet/src/controller/initializeKernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export async function initializeKernel(config, kernelStorage, options = {}) {
serializeBodyFormat: 'smallcaps',
// TODO Temporary hack.
// See https://github.com/Agoric/agoric-sdk/issues/2780
errorIdNum: 60000,
errorIdNum: 60_000,
});
const args = kunser(m.serialize(harden([vatObj0s, deviceObj0s])));
const rootKref = exportRootObject(kernelKeeper, bootstrapVatID);
Expand Down
4 changes: 2 additions & 2 deletions packages/SwingSet/src/devices/lib/deviceTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ export function buildSerializationTools(syscall, deviceName) {
}

const m = makeMarshal(convertValToSlot, convertSlotToVal, {
marshalName: `device:${deviceName}`,
marshalName: `deviceTools:${deviceName}`,
serializeBodyFormat: 'smallcaps',
// TODO Temporary hack.
// See https://github.com/Agoric/agoric-sdk/issues/2780
errorIdNum: 60000,
errorIdNum: 40_000,
});

// for invoke(), these will unserialize the arguments, and serialize the
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/kernel/deviceSlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function makeDeviceSlots(
serializeBodyFormat: 'smallcaps',
// TODO Temporary hack.
// See https://github.com/Agoric/agoric-sdk/issues/2780
errorIdNum: 50000,
errorIdNum: 50_000,
});

function PresenceHandler(importSlot) {
Expand Down
2 changes: 1 addition & 1 deletion packages/swingset-liveslots/src/liveslots.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ function build(
serializeBodyFormat: 'smallcaps',
// TODO Temporary hack.
// See https://github.com/Agoric/agoric-sdk/issues/2780
errorIdNum: 70000,
errorIdNum: 70_000,
marshalSaveError: err =>
// By sending this to `console.warn`, under cosmic-swingset this is
// controlled by the `console` option given to makeLiveSlots.
Expand Down
3 changes: 3 additions & 0 deletions packages/swingset-liveslots/tools/fakeVirtualSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ export function makeFakeLiveSlotsStuff(options = {}) {

const marshal = makeMarshal(convertValToSlot, convertSlotToVal, {
serializeBodyFormat: 'smallcaps',
marshalName: 'fakeLiveSlots',
errorIdNum: 80_000,
marshalSaveError: _err => {},
});

function registerEntry(baseRef, val, valIsCohort) {
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/api/src/lib-dehydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export const makeDehydrator = (initialUnnamedCount = 0) => {
marshalName: 'hydration',
// TODO Temporary hack.
// See https://github.com/Agoric/agoric-sdk/issues/2780
errorIdNum: 30000,
errorIdNum: 30_000,
serializeBodyFormat: 'smallcaps',
},
);
Expand Down

0 comments on commit f42e7ff

Please sign in to comment.