Skip to content

design(zone): back-port portable @endo/zone - #891

Draft
kriscendobot wants to merge 1 commit into
endojs:llmfrom
kriscendobot:design/endo-zone
Draft

design(zone): back-port portable @endo/zone#891
kriscendobot wants to merge 1 commit into
endojs:llmfrom
kriscendobot:design/endo-zone

Conversation

@kriscendobot

Copy link
Copy Markdown
Collaborator

Description

Proposes @endo/zone as the portable allocation and collection contract required before @endo/ertp can use durable state without depending on SwingSet. The design keeps heap allocation in Endo while treating Agoric vat-data and the Endo daemon's formula/SQLite MapStores as host-owned adapters.

It responds to the prerequisite requested in #778 (review). The review focus is the boundary: named allocation and makeOnce preserve collision and upgrade invariants, while the portable package neither adopts @agoric/store nor claims that a heap Map provides durable-store retention semantics.

Security Considerations

Sub-zones preserve a separate label namespace when allocation authority is delegated. Durable adapters, rather than the portable core, enforce their host's storable-value rule and retention guarantees.

Scaling Considerations

The heap implementation is in-memory. The daemon adapter is deliberately gated on its persistent MapStore work, including rank indexing and restart retention, so this design does not conceal durable-store costs behind a generic interface.

Documentation Considerations

The design records the public Zone contract, the rejected direct @agoric/* dependency, the migration shape for Agoric compatibility, and the tests each host adapter must provide.

Testing Considerations

The design specifies heap compatibility tests plus adapter-specific upgrade/restart and weak-retention tests. This documentation-only change was checked with Prettier and its Mermaid diagram parsed successfully.

Compatibility Considerations

The intended surface remains compatible with the useful @agoric/zone API. Existing Agoric durable-key encoding stays behind its adapter; Endo clients do not construct backend storage keys.

Upgrade Considerations

makeOnce and stable category keys are specified so a durable adapter can revive an existing value across an upgrade. The Agoric adapter must prove legacy-key preservation before it re-exports the Endo contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant