Comments (9)
Can you make this into a unit test? I just tried a simple set of arrays (serialize([a1,a2,a3,a3,a2,a1])
) and it seems to serialize correctly, but that case isn't introducing any new objects in the post-replacer data, and it sounds like that's the core problem.
The test should probably go into test-marshal.js in "serialize exports". If you can write a test that fails and post it here (or put it on a branch), I'll try to find the fix.
from agoric-sdk.
from agoric-sdk.
I added a unit test here: Agoric/SwingSet@e6c6350
from agoric-sdk.
Ah, yeah, this will be tricky. We're saving a lot of code by relying upon the built-in JSON serialization features. But the replacer
hook of JSON.stringify
is executed on the way into each node during a depth-first traversal, while the reviver
hook of JSON.parse
is run on the way out of each node. As a result, numbering the nodes by order of appearance to these hooks gets a completely different ordering.
Worst case we'll have to write our own deserializer. It might also be possible to serialize the data, unserialize it (without a reviver), then re-serialize it with a replacer that changes the ibid
index for each node to match the other numbering order. Or do the same thing on the receiving side. Neither is particularly appealing.
from agoric-sdk.
I have some ideas here, to talk about when we're next in at the same time. In the meantime, Agoric/SwingSet@508982d safely turns ibids off in a way that should work well enough in the absence of cycles. However, it will expand pass-by-copy dags into trees.
from agoric-sdk.
That quick fix sounds good, and our marshalling layer will already combine multiple refs to the same import/export slot into a single index (even without the ibid mechanism). I'll land that now, and then we can defer the full fix until later.
from agoric-sdk.
Can you use a path rather than an index, a la cycle?
from agoric-sdk.
Can you use a path rather than an index, a la cycle?
Perhaps. Opened https://github.com/Agoric/SwingSet/issues/66 to track. Closing this one though, since ibids with indexes are no longer broken.
from agoric-sdk.
in the old repo. this was SwingSet issue 30
from agoric-sdk.
Related Issues (20)
- integration tests missing from master
- agoric-cli wallet send options are too strongly positional
- inconsistent `watch` handling of arguments for watcher
- Self resolving vows cause infinite loop
- Genesis import fails for large exports
- Otel slog sender does not handle `cosmic-swingset-upgrade-finish` HOT 2
- MainNet proposals should dynamically provide oracle addresses HOT 1
- test support: ibc bridge mocks for @agoric/orchestration HOT 1
- Make maxVatsOnline customizable to optimize resource usage HOT 1
- orchestration bundles: remove unused protobuf encoders/decoders in `CosmosOrchestrationAccount` HOT 2
- Extract metrics from slogs and send them to otel/datadog
- confusing "vat terminated" error for messages sent to upgrade-abandoned objects HOT 1
- Upgrading scaled price authority causes vaults upgrade to not complete
- A typo in vat-data-bindings.js
- Reinstate scaledPriceAuthority upgrade; measure impact
- When upgrading vaultFactory, retain old values of vaultDirector governed params
- When replacing priceFeeds, reset roundID in vstore HOT 1
- provisionPool test requires extra stall, figure out how to remove it
- liveslots relaxDurabilityMode admits Promises when it should reject them
- new `snapshots export` command should fail early if exporting historical height
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.