Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove crankNumber from transcript #2428

Closed
warner opened this issue Feb 15, 2021 · 0 comments · Fixed by #2429
Closed

remove crankNumber from transcript #2428

warner opened this issue Feb 15, 2021 · 0 comments · Fixed by #2429
Assignees
Labels
enhancement New feature or request SwingSet package: SwingSet

Comments

@warner
Copy link
Member

warner commented Feb 15, 2021

src/kernel/vatManager/transcript.js includes the current crankNumber in each transcript entry. #2400 is trying to change the crank number into a BigInt. The combination causes vatKeeper.js 's addToTranscript to fail, when it attempts to JSON.stringify() the transcript entry. @katelynsills 's fix was to create an augmented stringification function (named JSONstringify, without the .) which has a replacer for the BigInt (rendering them as plain digits, just as a Nat or an integral Number would do).

I think we don't need (or really want) the crankNumber in the transcript, it records data that is outside the scope of an individual vat (the kernel-global crank number counts deliveries to all vats, not just this one).

So the task is to remove crankNumber from the transcript entry, change the two tests that check for it, and then rebase #2400 on top of the result.

@warner warner added enhancement New feature or request SwingSet package: SwingSet labels Feb 15, 2021
@warner warner self-assigned this Feb 15, 2021
warner added a commit that referenced this issue Feb 15, 2021
The VatManager is responsible for maintaining a transcript of all deliveries
to their vat worker, so the vat can be reloaded later. These transcript
entries have been including the `crankNumber`: a global counter indicating
how many cranks have been delivered (to all vats, not just the one for which
the transcript entry is being created).

This removes that crankNumber from the transcript:

* each vat should be independent, this global crankNumber is revealing
information about what happens in other vats
* #2400 is changing the type of `crankNumber` to a BigInt, which cannot be
serialized by the simple `JSON.stringify` used in vatKeeper.js

It also removes the now-unnecessary `kernelKeeper` argument from
`makeTranscriptManager`, and changes one test that happened to depend upon
the presence of the crankNumber field.

closes #2428
warner added a commit that referenced this issue Feb 15, 2021
The VatManager is responsible for maintaining a transcript of all deliveries
to their vat worker, so the vat can be reloaded later. These transcript
entries have been including the `crankNumber`: a global counter indicating
how many cranks have been delivered (to all vats, not just the one for which
the transcript entry is being created).

This removes that crankNumber from the transcript:

* each vat should be independent, this global crankNumber is revealing
information about what happens in other vats
* #2400 is changing the type of `crankNumber` to a BigInt, which cannot be
serialized by the simple `JSON.stringify` used in vatKeeper.js

It also removes the now-unnecessary `kernelKeeper` argument from
`makeTranscriptManager`, and changes one test that happened to depend upon
the presence of the crankNumber field.

closes #2428
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant