You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From our earlier versions (ses-shim, xsnap, pre-swingset), we have a lot format we can use to run a series of transactions into the machine.
However, we've now lost the ability to easily transport our state via logs, which would give us a convenient way to "merge state" (replay transactions from two machines) to get a cheap (albeit "unfairly ordered") new machine state. I think this'll be useful in development, when we might hand off who's running the server.
Some notes from Brian Warner, who seems to be the expert on the topic of exporting data from the SwingSet db:
heya.. not easy but not hard. The way that involves the least agoric-sdk code is to use the node-lmdb package. The DB has string keys, and ${vatID}.t.${n} is the n'th transcript entry for a given vat. ${vatID}.t.nextID is one larger than the last entry.
there are keys like vat.name.${vatID} to tell you the names of static vats, given their ID, which can help get oriented. The on-chain swingset has maybe 15 static vats. Start with bootstrap, that one is pretty much guaranteed to exist.
Each transcript entry is a JSON-parsable string. There's a single "delivery object" that describes the message sent into the vat (a message send, or a promise resolution notification). And there's an array of syscalls made by the vat during that turn, each with a description of the syscall (message send, promise resolution, device invocation, secondary storage get/set/delete), and the return value if any.
look in agoric-sdk/packages/SwingSet/src/kernel/state/kernelKeeper.js for a big comment near the top that describes the DB schema
the transcript is managed by src/kernel/vatManager/transcript.js and several functions in src/kernel/state/vatKeeper.js
The text was updated successfully, but these errors were encountered:
From our earlier versions (ses-shim, xsnap, pre-swingset), we have a lot format we can use to run a series of transactions into the machine.
However, we've now lost the ability to easily transport our state via logs, which would give us a convenient way to "merge state" (replay transactions from two machines) to get a cheap (albeit "unfairly ordered") new machine state. I think this'll be useful in development, when we might hand off who's running the server.
Some notes from Brian Warner, who seems to be the expert on the topic of exporting data from the SwingSet db:
heya.. not easy but not hard. The way that involves the least agoric-sdk code is to use the node-lmdb package. The DB has string keys, and ${vatID}.t.${n} is the n'th transcript entry for a given vat. ${vatID}.t.nextID is one larger than the last entry.
there are keys like vat.name.${vatID} to tell you the names of static vats, given their ID, which can help get oriented. The on-chain swingset has maybe 15 static vats. Start with bootstrap, that one is pretty much guaranteed to exist.
Each transcript entry is a JSON-parsable string. There's a single "delivery object" that describes the message sent into the vat (a message send, or a promise resolution notification). And there's an array of syscalls made by the vat during that turn, each with a description of the syscall (message send, promise resolution, device invocation, secondary storage get/set/delete), and the return value if any.
look in agoric-sdk/packages/SwingSet/src/kernel/state/kernelKeeper.js for a big comment near the top that describes the DB schema
the transcript is managed by src/kernel/vatManager/transcript.js and several functions in src/kernel/state/vatKeeper.js
The text was updated successfully, but these errors were encountered: