This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes the 'kvstore' persistence mechanism, replacing it with a simple JS object that is mutated by the various Keepers. At the end of the turn, you can call
controller.getState()
to retrieve a stringified form of this structure (note: not deterministically serialized).In #94 we found that updating the transcript gets really slow, because 1: it grows forever, 2: it goes through a deserialize-append-reserialize cycle for each message delivery, and 3: the reserialization uses a deterministic JSON stringify that spends too much of its time in JS instead of native code. This fix removes 2 and 3, giving us just one (native, non-deterministic) serialization call per "big turn" (i.e. one block of messages, i.e. one checkpoint).
The persistent-kernel apps that use SwingSet will have to change when this fix is released. Instead of creating an
externalStorage
object and passing it intobuildVatController
, they should pass a string asconfig.initialState
, and then callcontroller.getState()
after each big turn (which returns a string).