Skip to content

Commit

Permalink
docs(network): networkVat powers are to be shared via Ports
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Feb 23, 2024
1 parent e12a8b1 commit ef3df9c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/vats/src/proposals/network-proposal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @file CoreEval module to set up network, IBC vats.
* @see {setupNetworkProtocols}
*/
import { E } from '@endo/far';
import { BridgeId as BRIDGE_ID } from '@agoric/internal';
import { prepareVowTools } from '@agoric/vat-data/vow.js';
Expand Down Expand Up @@ -47,6 +51,24 @@ export const registerNetworkProtocols = async (vats, dibcBridgeManager) => {
};

/**
* Create the network and IBC vats; produce `networkVat` in the core / bootstrap
* space.
*
* The `networkVat` is CLOSELY HELD in the core space, where later, we claim
* ports using `E(networkVat).bind(_path_)`. As discussed in `ProtocolHandler`
* docs, _path_ is:
*
* - /ibc-port/NAME for an IBC port with a known name or,
* - /ibc-port/ for an IBC port with a fresh name.
*
* Contracts are expected to use the services of the network and IBC vats by way
* of such ports.
*
* Testing facilities include:
*
* - loopback ports: `E(networkVat).bind('/local/')`
* - an echo port: `E(vats.network).bind('/ibc-port/echo')`
*
* @param {BootstrapPowers & {
* consume: { loadCriticalVat: VatLoader<any> };
* produce: { networkVat: Producer<any> };
Expand Down

0 comments on commit ef3df9c

Please sign in to comment.