Skip to content

Latest commit

 

History

History
320 lines (203 loc) · 10 KB

File metadata and controls

320 lines (203 loc) · 10 KB

Releases

v0.9

Overview

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.

Breaking changes

New API for setting up onion services

See the CapTP docs for updated information.

New Features

on-sever for detecting disconnects

on-sever has been added with support for detecting disconnects in the session relevant to a remote connection.

goblins/actor-lib/bootstrap now exported by goblins

It’s so commonly used, it seemed worth exporting by default.

let-on now returns a promise

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?

Netlayer updates

See the CapTP docs for updated information, but in summary:

  • Onion layers now have two independent methods, new-onion-netlayer and restore-onion-netlayer. Since key material is now returned, you can now re-setup captp endpoints after a server goes down.
  • setup-onion-netlayer has been removed in favor of new-onion-letlayer.
  • the fake-intarwebs and onion netlayers are now both documented.

modyule dynamically-instantiable quasi-module utility

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.

goblins/actor-lib/rall utility

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!

New 'get-registry method on mycapn objects

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.

all-of* procedure in goblins/actor-lib/joiners

This permits all-of behavior but with a list of promises, reducing the need for an apply in some cases.

goblins/actor-lib/bootstrap now exported by goblins by default

It’s so common that hey, why not just make it available?

^hash in goblins/actor-lib/common now has 'length method

Bugfixes and improvements

Document how to use sync/pr in tutorial

The tutorial now includes a sync/pr example, allowing for easier integration with Racket’s existing IO system.

(Thank you Jonathan Frederickson!)

Prevent replay attack in warden/incanter pairs

Seals now “shatter” upon a single invocation. This prevents sealed arguments from being intercepted, replayed.

Speedups

To actormap snapshotting / restoration

Speedups to the actormap snapshotting and restoration routines by using the Racket in-hash and in-weak-hash procedures.

(Thank you Martian MoorGrove!)

To “become” sealers/unsealers

(Thank you Martian MoorGrove!)

Various fixes to core api documentation

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!)

Addition of CI infrastructure, including fixing tests for such

Goblins now is set up to run on Gitlab’s continuous integration infrastructure, informing of

Replay attack mitigated in warding/incanters

Previously it could be possible to invoke a warded procedure via its sealed values by MiTM’ing it multiple times. Oops!

Various internal restructurings

A bunch of them which aren’t user facing!

Contributors

This release was brought to you by:

  • Christine Lemmer-Webber
  • Martian MoorGrove
  • Jessica Tallon

v0.8

Overview

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!

Breaking changes

The interfaces for captp code completely changed… see the example in the documentation to see how to update your code.

New features

CapTP and OCapN

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!

Handoffs! Handoffs!!!

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!

New abstraction: netlayers!

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”.

New netlayer: “onion” for Tor onion services

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.

New netlayer: “fake” for localized registry of fake machine addresses

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.

URIs and corresponding structures for machines, sturdyrefs, etc

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.

actor-lib

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. ;)

coroutines support: await

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)))
actor-lib: sync/pr

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!

actor-lib: sleep/pr

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.

actor-lib: common
  • Added ^incrementer, a simple incrementing counter
  • added a 'remove method for hashtable classes
define-actor: new sugar for defining actors

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.

simple-mint: a minimalist fiat currency example

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.

Added a Makefile

For convenience, there is now a Makefile with some helpful make commands (eg: compile, check, clean)

Breaking changes

on’s #:regardless is #:finally again

on’s #:regardless keyword has been named back to #:finally.

CapTP stuff

As said previously, the CapTP interface fully changed. Check the docs on how to use it. (It may change further yet!)

ward #:async-warden? keyword renamed to #:async?

Bugfixes

Don’t recalculate #:extends every time for methods

Previously, whatever code was in #:extends would be recalculated on every invocation. Yikes on performance and behavior both. This is fixed.