Prevously we were tracking remote scry requests using a map, assuming
that every thread would do just one remote scry request. This is not
right. A thread that did multiple +keen:strandio was treated as
if just the last call existed, overwritten previous entries in the map.
Now we track remote scries using a jug that accounts for multiple %keen
tasks per thread.
The logic for sending %yawns to %ames has been updated for the following
scenarios:
- +thread-fail will always send a %yawn task
- +thread-done doesn't send %yawn tasks
- unless a running thread is stopped
- if %spider is reloaded:
- %yawn tasks will be sent for any running or starting thread
/lib/strandio also removes +take-tune from +keen, decoupling
sending %tasks and receiving %signs. This allows for clients
to request multiple paths at future cases, without blocking.
Previously, the initial Azimuth snapshot was stored in Clay and shipped
in the pill. This causes several problems:
- It bloats the pill
- Updating the snapshot added large blobs to Clay's state. Even now
that tombstoning is possible, you don't want to have to do that
regularly.
- As a result, the snapshot was never updated.
- Even if you did tombstone those files, it could only be updated as
often as the pill
- And those updates would be sent over the network to people who didn't
need them
This moves the snapshot out of the pill and refactors Azimuth's
initialization process. On boot, when app/azimuth starts up, it first
downloads a snapshot from bootstrap.urbit.org and uses that to
initialize its state. As before, updates after this initial snapshot
come from an Ethereum node directly and are verified locally.
Relevant commands are:
- `-azimuth-snap-state %filename` creates a snapshot file
- `-azimuth-load "url"` downloads and inits from a snapshot, with url
defaulting to https://bootstrap.urbit.org/mainnet.azimuth-snapshot
- `:azimuth &azimuth-poke-data %load snap-state` takes a snap-state any
way you have it
Note the snapshot is downloaded from the same place as the pill, so this
doesn't introduce additional trust beyond what was already required.
When remote scry is released, we should consider allowing downloading
the snapshot in that way.
Includes patched versions of ames' and clay's +load arms.
In clay, we do a dumb ;; hack to get the state to adapt properly. This
shouldn't be needed ($case had an extra... case added to it, old ones
should still nest), and so we should revisit the logic there to make it
cleaner/better before release.
Changes the test command to check if args contains a single path and
wraps it in a list. Now a test thread can be started without providing
a list:
-test %/tests/lib
And passing a list still works:
test %/tests/lib ~
One nit in this change is the lark expression to reach into args: if
args is ~ then instead of getting a useful need/have error, the test
ends in a "false-start". Perhaps this could be fixed by detecting ~
and setting it to %/tests.