This release provides the ability to detect disconnects with
on-sever. A less dramatic release feature-wise than the last one,
but still including a number of useful improvments and one small
breaking change.
See the CapTP docs for updated information.
on-sever has been added with support for detecting disconnects in
the session relevant to a remote connection.
It’s so commonly used, it seemed worth exporting by default.
let-on from goblins/actor-lib/let-on now returns a promise related
to its result. We’re already heaping sugar on, who cares about extra
performance cost (cavities?) in exchange for some extra sweetness?
See the CapTP docs for updated information, but in summary:
- Onion layers now have two independent methods,
new-onion-netlayerandrestore-onion-netlayer. Since key material is now returned, you can now re-setup captp endpoints after a server goes down. setup-onion-netlayerhas been removed in favor ofnew-onion-letlayer.- the
fake-intarwebsandonionnetlayers are now both documented.
goblins/utils/modyule now has a fairly simple dynamically
instantiable module-like facility. This is useful for eg when you
want to pass in vat/actormap-specific tooling for serializing to
Spritely Aurie.
Provides a utility for sending a message to an actor but only after all its arguments have settled, like so:
(define apple-vow (<- apple-ident))
(define banana-vow (<- banana-ident))
(define pear-vow (<- pear-ident))
(define chef-vow (<- chef-maker))
(define combined-vow
(<-rall chef-vow apple-vow banana-vow pear-vow))The chef corresponding to chef-vow will be sent the individual fruit
objects as their settled values rather than as promises, if they are
such.
Note: objects transmitted via a handoff will still end up as a promise!
This allows fetching the nonce-registry (see
goblins/actor-lib/nonce-registry) to manually pull out and stuff in
nonces… basically allowing for restoring a vat with its sturdyref.
Not the ideal API, but gets the job done in the meanwhile.
This permits all-of behavior but with a list of promises, reducing the need for an apply in some cases.
It’s so common that hey, why not just make it available?
The tutorial now includes a sync/pr example, allowing for easier
integration with Racket’s existing IO system.
(Thank you Jonathan Frederickson!)
Seals now “shatter” upon a single invocation. This prevents sealed arguments from being intercepted, replayed.
Speedups to the actormap snapshotting and restoration routines by
using the Racket in-hash and in-weak-hash procedures.
(Thank you Martian MoorGrove!)
(Thank you Martian MoorGrove!)
Several typos regarding some of the low-level procedures in the documentation are fixed, and several other procedures are now more fully documented.
(Thank you Martian MoorGrove!)
Goblins now is set up to run on Gitlab’s continuous integration infrastructure, informing of
Previously it could be possible to invoke a warded procedure via its sealed values by MiTM’ing it multiple times. Oops!
A bunch of them which aren’t user facing!
This release was brought to you by:
- Christine Lemmer-Webber
- Martian MoorGrove
- Jessica Tallon
This release focuses on major evolutions to the (in-progress) CapTP protocol, and related work. We also now have coroutines and some conveniences to integrating Racket’s synchronizable events with Goblins’ promises, simplifying integration with the rest of the world of Racket’s IO.
Lots of other changes too, read on!
The interfaces for captp code completely changed… see the example in the documentation to see how to update your code.
Major changes came through Goblins’ support for CapTP.
Additionally, we’ve started conversations about interoperability of CapTP (and related layers) with the OCapN project. More on that in the future!
The biggest feature for this version is that… we have “three party handoffs”!
The key idea here is that since CapTP uses efficient pairwise integers as live capability references between two machines. So what happens when Alice on machine A wants to introduce Bob on machine B to Carol on machine C? We now have a fancy “handoff” system using certificates that set up the connection and do the handoff for you.
This is abstracted so that users, in general, don’t need to worry about the handoff machinery… it should (hopefully) just work!
CapTP is agnostic to what particular network abstraction it runs over.
Traditionally, the network abstraction layer has been called “VatTP” in CapTP type systems; the rename to “netlayer” reflects that there are multiple layers that can fulfill this role. In this sense, a netlayer is one that follows an abstracted “netlayer interface”.
Relatedly, we now have a Tor Onion Services netlayer that ships with Goblins. Goblins can also help set up a new Onion service for you, for easy peer to peer connections.
See the captp section of the documentation for an example of use.
This is useful for unit tests. It’s not well documented yet unfortunately. See fake-intarwebs.rkt’s unit tests for an example.
Yes, we might rename this module in the future.
New URI structures, and corresponding Racket structs, have been defined to facilitate both bootstrapping connections between CapTP systems (including in handoffs). At the moment, two are defined:
For machine type URIs:
ocapn:m.<transport>.<transport-address>[.<transport-hints>]
For swissnum URIs:
ocapn:s.<transport>.<transport-address>/<swiss-num>
And some examples of each:
ocapn:m.onion.wy46gxdweyqn5m7ntzwlxinhdia2jjanlsh37gxklwhfec7yxqr4k3qd ocapn:s.onion.abpoiyaspodyoiapsdyiopbasyop/3cbe8e02-ca27-4699-b2dd-3e284c71fa96
See goblins/ocapn/structs-urls.rkt for more information.
Various additions and changes have happened to the goblins/actor-lib
submodules. Proper documentation is still, well, mostly needed on
most of these, will hopefully come in the next release. Patches
welcome. ;)
The new goblins/actor-lib/await submodule brings coroutines, at
last, to Goblins, in a way that’s reasonably safe! Well, as safe as
coroutines get anyway.
These particular coroutines compose nicely with Goblins’ support of
promise pipelining. call-with-await takes a thunk, and with-await
provides some macro’y syntax sugar.
Usage example:
(define ((^alice bcom screen) bob)
(call-with-await
(lambda (await)
($ screen 'displayln "before")
(define from-bob (await (<- bob "hello")))
($ screen 'displayln (format "after, returned: ~a" from-bob))
(define from-bob2 (await (<- bob "hello2")))
($ screen 'displayln (format "after 2, returned: ~a" from-bob2))
'alice-final-return)))New module in goblins/actor-lib/sync-pr that provides sync/pr,
which transforms Racket synchronizable events into Goblins promises,
making integrating all sorts of Racket I/O systems with Goblins much
easier!
New module in goblins/actor-lib/sleep-pr which provides the
procedure sync/pr, which generates a promise that is fulfilled after
a period of time, similar to the sleep procedure.
- Added
^incrementer, a simple incrementing counter - added a
'removemethod for hashtable classes
Experimental new syntax for defining actors that may be simpler, uses macros. This might be the preferred future way of defining actors, but the macro-free version will always remain available.
goblins/actor-lib/simple-mint provides a simple example of a bank
with support for distributed accounts, mostly a demonstrative port of
the code from Capability-based Financial Instruments.
For convenience, there is now a Makefile with some helpful make commands (eg: compile, check, clean)
on’s #:regardless keyword has been named back to #:finally.
As said previously, the CapTP interface fully changed. Check the docs on how to use it. (It may change further yet!)
Previously, whatever code was in #:extends would be recalculated on every invocation. Yikes on performance and behavior both. This is fixed.