endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
761 stars 68 forks source link

Endo: Archived apps composed of archived libraries. #670

Open kriskowal opened 3 years ago

kriskowal commented 3 years ago

In order to minimize the weight of contracts on Agoric SDK, capturing their transitive dependencies in a string or archive wastes an opportunity.

This would require both a new bundle format (as in @agoric/bundle-source and @agoric/import-bundle) and also a transport mechanism (an additional power to async load/store the dependency archives), or alternately, a transport mechanism that can disassemble and reassemble the Zip files to preserve the illusion that bundles are just JSON.

Either way, we could use IPFS or something similar to distribute the overlapping fragments, where the fragments might either be Zip files of libraries, or individual files.

kriskowal commented 3 years ago

cc @dtribble

zarutian commented 3 years ago

This sounds suspictiously like hierchical uses of content-hash addressed blob store. Probably via readonly composition virtual filesystem that uses a root-manifest file named by a content-hash to find the other blobs/manifest to populate the vfs with data.

kriskowal commented 3 years ago

We are very likely to use a CAS. For unrelated reasons, I just implemented #794 today, which ensures the consistent hash of the manifest file (compartment-map.json) reflects consistent content of any particular entry point into an application. This doesn’t require the use of a CAS based on the same hash, but there is a certain synergy if we make that choice.

kriskowal commented 2 years ago

Parent issue https://github.com/Agoric/agoric-sdk/issues/3871