Comments (5)
We must be very careful with synchronous effects, as the turn within which they happen may subsequently abort. In that case, all effects should be as-if never happened. Also, all synchronous perceiving of effects must be deterministically replayable.
from agoric-sdk.
For the latter, we currently record all syscalls (and their return results) in the transcript. Specifically, we record all kernel-to-userspace dispatch
calls, within which we record the list of syscalls made by userspace back into the kernel while that dispatch
was active.
When we restore a vat from the saved state, we replay the dispatch
calls but replace the syscall
object with one that compares-and-ignores (and also returns the same recorded return value as before), so the kernel won't observe any outputs from the vat during the playback. But the Vat shouldn't be able to distinguish the replay from the original.
By routing userspace-to-device access through the syscall API, we get this same deterministic replay for free. The vat won't be interacting with the real device during replay, but it will get the same return values that it got the first time around. Any since the device-to-userspace pathway goes through the run-queue (albeit a higher-priority one that should always be empty in a checkpoint), all those messages are effectively captured in the vat's transcript.
Of course, the device itself must be restored to the same state too. Devices, like the kernel, will add their own state into the machine-wide state vector, right next to the vat transcripts. I think that will be sufficient, as long as we have some interlocks to prevent the device from e.g. submitting any vat messages before we've replayed all the vat transcripts.
I haven't thought so much about turn aborts. I expect this is the spot where devices must promise to buffer their effects until a checkpoint has been taken.
from agoric-sdk.
Remaining tasks:
- test one device invocation returning a new device node
- test passing device nodes between vats
- liveSlots wrappers for device nodes:
retval = D(devnode).method(args)
- add
deviceSlots
helper for writing devices - devices can add calls to the run queue (
sendOnly()
) - device state management
-
test vat state management in the presence of device calls
from agoric-sdk.
Ok, I think that should get us started.
from agoric-sdk.
in the old repo. this was SwingSet issue 26
from agoric-sdk.
Related Issues (20)
- Inter Protocol vaults should allow adjustments that don't increase debt when mint limit <= debt outstanding HOT 1
- Orch Examples `stakeIca` and `stakeBld` Do not Use `withOrchestration`
- Figure out how to sequentialize vaults core evals HOT 11
- Create a core-eval runbook for vat-orchestration HOT 2
- Narrow Scope of .gitignore for proposals/a:upgrade-next folder
- CI Failure Due to Git Dirty Tree Check on Merging PR with master
- `yarn create @agoric/dapp demo` fails with yarn 4 (nodeLinker pnp) HOT 1
- multichain-testing with mainnet fork as agoric chain
- Possible metrics bug in Vaults HOT 2
- Multichain Testing - Single Command Startup
- Multichain Testing - Automate Hermes Client Update HOT 1
- post-test fails in docker integration test
- State-sync snapshotting affect cosmos commit time
- agd memory leak
- Set up mainfork environment with U16 and Oracles HOT 2
- Support for `agoric.swingset.CoreEvalProposal` in `cosmos.gov.v1.MsgSubmitProposal`
- add test for retiring unreachable abandoned non-durables
- support memo field routing
- Run (and test) dapp-orchestration-basics on top of vat-orchestration core-eval using multichain-test HOT 2
- provide durable access to durable-Kind `state` object, or a proxy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agoric-sdk.