Commit Graph

2922 Commits

Author SHA1 Message Date
Philip Monk
8e2ab9e926 dojo: remove commented code 2022-10-13 21:17:39 -07:00
Philip Monk
653a86bd55 Merge branch 'pr' into philip/agent-clay 2022-10-13 21:06:15 -07:00
Philip Monk
fc70193ef6 Merge remote-tracking branch 'origin/next/arvo' into philip/agent-clay 2022-10-13 20:54:00 -07:00
dr-frmr
7563937e1f get full userspace desk 2022-09-29 14:43:31 -06:00
dr-frmr
29c10540aa make %swap-files poke use file-ovum properly 2022-09-29 14:29:28 -06:00
xiphiness
2bc2d5a1bb
dojo dir validation: %ct scry at case da+now if imaginary case 0
PR #5840 mostly fixed #1559, but introduced a new bug. before, you could safely `=dir` into a desk without a case, and it would use the nonexistent case `ud+0` as the beam for dojo state, and switch that out for da+now whenever it tries to resolve the current path. but this check causes it to fail, because `ud+0` is a nonexistent case. this uses he-beam to transform the beam in the conditional to see if the case is 0, and if it is, changes the case to da+now before it scries
2022-09-06 16:24:22 -05:00
Philip Monk
8884e7dfbc kiln: make compile 2022-09-02 16:51:39 -08:00
Philip Monk
093f0ae9de Merge branch 'philip/inline-thread' into philip/agent-clay-wip 2022-09-01 19:03:17 -08:00
Philip Monk
e3a8cab943 khan: support inline threads
This allows you to pass a thread directly into khan, instead of passing
a filename.  This has several implications:

- The friction for using threads from an app is significantly lower.
  Consider:

    =/  shed
      =/  m  (strand ,vase)
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('there'))
      (pure:m !>('product'))
    [%pass /wire %arvo %k %lard %base shed]

- These threads close over their subject, so you don't need to parse
  arguments out from a vase -- you can just refer to them.  The produced
  value must still be a vase.

    ++  hi-ship
      |=  [=ship msg1=@t msg2=@t]
      =/  shed
        =/  m  (strand ,vase)
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg1))
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg2))
        (pure:m !>('product'))
      [%pass /wire %arvo %k %lard %base shed]

- Inline threads can be added to the dojo, though this PR does not add
  any sugar for this.

    =strandio -build-file %/lib/strandio/hoon
    =sh |=  message=@t
        =/  m  (strand:rand ,vase)
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>(message))
        (pure:m !>('product'))
    |pass [%k %lard %base (sh 'the message')]

Implementation notes:
- Review the commits separately: the first is small and implements the
  real feature.  The second moves the strand types into lull so khan can
  refer to them.

- In lull, I wanted to put +rand inside +khan, but this fails to that
  issue that puts the compiler in a loop.  +rand depends on +gall, which
  depends on +sign-arvo, which depends on +khan.  If +rand is in +khan,
  this spins the compiler.  The usual solution is to either move
  everything into the same battery (very ugly here) or break the
  recursion (which we do here).
2022-08-29 21:04:50 -08:00
Philip Monk
0e14eedb50 spider: accept inline threads 2022-08-29 20:09:08 -08:00
Philip Monk
fa569cf7f3 kiln: wip 2022-08-29 10:53:36 -08:00
Philip Monk
43ad38cd82 azimuth: reorder %kick flow
Before this, the %watch to eth-watcher was happening before the %poke,
and so eth-watcher was responding with its entire history immediately.
This is bad because it takes a lot of memory to process that many logs,
and also because those logs are stale.

Now, the %poke happens first, which clears the history.
2022-08-19 20:22:20 -08:00
Philip Monk
c6024c2661 azimuth: clear logs on %kick
%kick is supposed to start back from the snapshot and move forward.
Without this, we would only fetch logs that we hadn't already fetched.
Thus, if you were up-to-date when you kicked, you would miss anything
that happened between the time the snapshot was taken and the present,
though you would see things after the present.

Also reverted lull change to make this a safer upgrade.
2022-08-19 15:04:30 -08:00
Philip Monk
ca0a00cb3c Merge remote-tracking branch 'origin/master' into philip/snap 2022-08-19 12:37:25 -08:00
Sidnym Ladrut
13b8b337a0 dojo: re-add support for /=, /% runes 2022-07-06 00:29:23 -05:00
Sidnym Ladrut
3e22ee68e9 dojo: improve ford rune support for cable expressions 2022-07-02 18:04:54 -05:00
Sidnym Ladrut
8a017ce308 dojo: re-add support for /+, /- ford runes 2022-07-01 23:39:37 -05:00
Philip Monk
89b9977ac8 azimuth: fetch snapshot on boot
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.
2022-06-30 23:22:50 -07:00
fang
981bc796d7
Merge pull request #5841 from dnmfarrell/dnmfarrell/arvo-dojo-dont-crash-set-beak
dojo: setting eny/now/our shouldn't crash dojo
2022-06-18 14:25:04 +02:00
fang
df82167111
Merge pull request #5840 from dnmfarrell/dnmfarrell/arvo-dojo-check-dir-exists-before-switch
dojo: check =dir exists before switching
2022-06-14 16:26:01 +02:00
David Farrell
d8f34e8930 dojo: remove unnecessary debug output
The tip already communicates to the user that dojo is busy, so the
sigpam output isn't needed anymore.
2022-06-13 21:00:46 -04:00
David Farrell
d439b33cc9 dojo: say how to beat the %dy-edit-busy escape room
It's too easy to get trapped in the dojo %dy-edit-busy escape room. Just
type something like:

  -build-file /=base/gen/ls/hoon

This modifies the dojo output to tell the user how to get out.

Fixes #1462.
2022-06-13 21:00:21 -04:00
David Farrell
04672fbe1d dojo: setting eny/now/our shouldn't crash dojo
Changes dojo to emit a usage message and ignore the request.

Fixes #1519
2022-06-13 20:51:38 -04:00
David Farrell
3a10b4d8f3 dojo: simplify dir not exist error message build
Incorporates @Fang- suggested changes (thanks!).

Drops the path serialization as it will print on two separate lines,
and it is already displayed in dojo immediately above the error message:

    > =dir /=base=/ge
    dojo: dir does not exist
2022-06-13 20:37:55 -04:00
David Farrell
73c1c94ea8 dojo: have dojo check =dir exists before switching
Scries clay for a list of files beneath the provided path - if the response
is nil then the dir must not exist (clay abhors a vacuum).

Fixes #1559
2022-06-13 20:37:49 -04:00
Philip Monk
d25194c7a3 arvo: reduce priority of lifecycle printfs 2022-05-14 23:59:21 -07:00
Philip Monk
e457a4c15e Merge remote-tracking branch 'origin/jm/homebase' into philip/tomb 2022-05-14 20:46:09 -07:00
Philip Monk
915dc733f5 Merge remote-tracking branch 'origin/m/buclus' into philip/tomb 2022-05-14 20:39:51 -07:00
Philip Monk
0ef9570f06 eth-watcher: fix upgrade 2022-05-14 20:28:56 -07:00
Philip Monk
d50d3915b8 Merge remote-tracking branch 'origin/yu/ames-fixes' into philip/tomb 2022-05-14 19:28:30 -07:00
Philip Monk
6f46e483d0 Merge remote-tracking branch 'origin/yu/azimuth-kick' into philip/tomb 2022-05-14 19:27:45 -07:00
yosoyubik
7fc5177602 azimuth: restart %eth-watcher if not running 2022-05-12 07:14:26 +02:00
Philip Monk
8e2720cd0e Merge remote-tracking branch 'origin/yu/azimuth-kick' into philip/tomb 2022-05-09 22:36:28 -07:00
Philip Monk
c76214b226 Merge remote-tracking branch 'origin/next/arvo' into philip/tomb 2022-05-09 22:36:19 -07:00
yosoyubik
da4de1579d eth-watcher: discard future pend-logs in watchdog
If there were pending-logs in an existing watchdog that was not fully
restarted, and the number of the starting block is newer than the first
in pending, when starting a new thread, those logs will be carried over
to the new thread, which will then be re-downloaded and will fail to be
verified in /lib/naive
2022-05-08 09:43:30 +02:00
yosoyubik
79d0129401 azimuth: use %kick poke to restart subscriptions 2022-05-07 16:27:04 +02:00
Philip Monk
591bdf458c Merge branch 'next/arvo' into philip/tomb 2022-05-04 00:45:57 -07:00
Philip Monk
71d4f72ce1
Merge pull request #5647 from urbit/roller/batch-split
roller: add batch-trimming functionality
2022-05-03 14:34:12 -07:00
yosoyubik
79af26fc3c azimuth: revert azimuth change in 60cc44e 2022-04-26 18:36:48 +02:00
Philip Monk
ac6e793aa2 arvo: rename +de to +of 2022-04-22 17:55:42 -07:00
yosoyubik
60cc44e961 ames: fix cached state in larval upgrade 2022-04-22 12:26:02 +02:00
yosoyubik
1b01455fe5 ames: fix dangling-bone error 2022-04-22 12:25:55 +02:00
fang
4415aa781e
Merge branch 'next/arvo' into m/aqua-revival 2022-04-20 18:47:59 +02:00
yosoyubik
7bf759adb0 roller: fix parsing nonces with dot separator 2022-04-15 15:27:08 +02:00
yosoyubik
2eec24ee27 roller: make output less loud 2022-04-15 13:19:10 +02:00
Pyry Kovanen
148c7880da
eth-watcher: remove obsolete zoom-margin handling 2022-04-11 22:15:14 +03:00
fang
132592e32e
Merge pull request #5695 from pkova/master
eth-watcher: implement optional to-block parameter
2022-04-07 16:15:21 +02:00
fang
c4f3825f3a
aqua: revert erroneously committed changes
These changes, part of optimization experiments, had snuck in somewhere.
2022-04-07 14:39:52 +02:00
pkova
32ac7434f4 eth-watcher: implement optional to-block parameter 2022-04-07 14:24:28 +03:00
fang
9bbf6dfad0
aqua: disable cache loading for real ships for now
It breaks some of the azimuth-related tests in a seemingly inconsistent
way, and I cannot find a way to make it work.
2022-04-06 14:52:21 +02:00