Merge branch 'develop' into i/6268/solid-state-publications

This commit is contained in:
~wicrum-wicrun 2023-02-16 08:58:58 +01:00 committed by GitHub
commit 83cfd18290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 744 additions and 220 deletions

10
.github/ISSUE_TEMPLATE/blank-issue.md vendored Normal file
View File

@ -0,0 +1,10 @@
---
name: Blank Issue
about: Other
title: ''
labels: ''
assignees: ''
---

View File

@ -1,8 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Submit a Landscape issue
url: https://github.com/urbit/landscape/issues/new/choose
about: Issues with Landscape (Tlon's flagship client) should be filed at urbit/landscape. This includes groups, chats, collections, notebooks, and more.
url: https://github.com/tloncorp/landscape-apps/issues/new/choose
about: Issues with Landscape should be filed at tloncorp/landscape-apps. This includes Groups, Talk, and Landscape proper.
- name: urbit-dev mailing list
url: https://groups.google.com/a/urbit.org/g/dev
about: Developer questions and discussions also take place on the urbit-dev mailing list.

View File

@ -119,3 +119,54 @@ following command:
```
git push origin <tagname>
```
## Releases
- [ ] Create a pull request from the relevant release branch (with the format `release/urbit-os-vX.XX`) to `master`.
- [ ] ssh into `~zod`
- [ ] Check to ensure that nobody else is ssh'd into `~zod`, by running `screen -ls` and verifying no sessions are attached.
- [ ] Attach to the screen session using `screen -x`
- [ ] Ensure that the release candidate was correctly propagated through the prerelease moons
- Use `-read %z ~SHIP %DESK da+now /` to check desk hashes
- [ ] Run the above check on the following [SHIP DESK] pairs: [~marnec-dozzod-marzod %base], [~marnec-dozzod-marzod %kids], [~doznec-dozzod-marzod %base], [~doznec-dozzod-marzod %kids] — **they should all match**
- [ ] Install the contents of the `%kids` desk on `~doznec-dozzod-marzod` into our `%base`: `|merge %base ~doznec-dozzod-marzod %kids, =gem %only-that`
- [ ] Check that `~zod` has updated to the latest release. For a Kelvin release, you can run `zuse` in the Dojo. Each non-Kelvin release might its own way of checking whether the update has completed, possibly through checking the `%cz` hash of the `%base` desk matches the hash on `~marnec-dozzod-marzod` by comparing the outputs of `+vat %base` on both ships.
- [ ] Merge `~zod`'s `%base` desk into its `%kids` desk to distribute the new code to the network: `|merge %kids our %base, =gem %only-that`
- [ ] Before exiting the screen session on `~zod`, make sure the screen session is not left in copy mode for a long period of time, since that will disrupt `~zod`'s operation.
### Release Communications
- [ ] Tag the commit that went onto the live network as a release, using GitHub's "Releases" interface. See the "Tagging" section of this document for details.
- [ ] Update (add a response) the mailing list post to include the base hash of the new release, and indicate that this has now been deployed to the network.
- [ ] Tweet from the `@zodisok` Twitter account linking to the GitHub release.
- [ ] Post links to the release in the Urbit Community Development channel and a channel in the UF public group.
### Post-Release Git Cleanup
- [ ] Merge `master` back into `develop`.
- [ ] Cut a new release branch from `develop`. The branch should have the format `release/urbit-os-vX.XX`
### Release Next Release Candidate
We'll now need to **IMMEDIATELY** deploy the new release candidate to the pre-release moon(s). Otherwise PRs merged during this window will bypass the testing period on `~binnec` and go straight to the release candidate.
- On `~marnec-dozzod-marzod`:
- [ ] `|merge %base ~binnec-dozzod-marzod %kids, =gem %only-that` to update `~marnec` with the contents of the GH release branch
- [ ] `|merge %kids our %base, =gem %only-that` to OTA the release candidate to subscribers
- When ready to deploy the release candidate to App Developers, on `~doznec-dozzod-marzod`:
- [ ] `|merge %base ~marnec-dozzod-marzod %kids, =gem %only-that` to update `~doznec` with the release candidate
- [ ] `|merge %kids our %base, =gem %only-that` to OTA the release candidate to subscribers
### Post-Release Checks
- [ ] Check that `~marzod` and other distribution stars are receiving the update by running `|ames-sift ~zod` and `|ames-verb %rcv %ges`. You should see lots of packets from `~zod`. Once you have confirmed packets are flowing, run `|ames-sift` and `|ames-verb` with no arguments to reset the verbosity state.
- [ ] Check that planets are receiving the update. They should start updating within an hour or so.
- [ ] Monitor the Urbit Community Help channel, UF public group channels, and Twitter to make
### Post-Release Artifacts
After waiting at least 24 hours after the release to the network, make and distribute a pill.
- [ ] Find a ship on the network (for now, use `~halbex-palheb`, which runs the UF public group) whose sources for `%base` and the standard app desks are mainline, not devstream.
- [ ] Ensure the `%cz` hashes of all desks match those on the distribution ships.
- [ ] Make a pill by running `.multi-vX-XX/pill +solid %base %garden %webterm %landscape %groups %talk` (replacing `X-XX` with the appropriate version numbers, in this and later steps).
- [ ] Boot a fakezod off that pill to make sure the pill is viable.
- [ ] Upload the pill to `bootstrap.urbit.org` using the Google Cloud SDK by running: `gsutil cp /path/to/pier/.urb/put/multi-vX-XX.pill gs://bootstrap.urbit.org/urbit-vX.XX.pill` -- note that it should be `vX.XX`, not `vX-XX` as in the original pill filename.
- [ ] Boot a ship with the latest binary and check that it downloads the pill from `https://bootstrap.urbit.org/urbit-vX.XX.pill` where you just uploaded it.

View File

@ -1,4 +1,4 @@
.PHONY: build build-all install cross release test pills ropsten-pills clean
.PHONY: build build-all install cross release test pills goerli-pills clean
build:
nix-build -A urbit --no-out-link
@ -17,8 +17,8 @@ pills:
sh/update-brass-pill
sh/update-ivory-pill
ropsten-pills:
sh/create-ropsten-pills
goerli-pills:
sh/create-goerli-pills
interface:
sh/build-interface

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:55f1bcccf861b3a2247aabb6ec3349829272ef8c36cfc8a16ff0930aac87a24d
size 5748196
oid sha256:544744b6d1360692b83be7f3e505d0710ea6ce541912509601e81fec2a2cea2e
size 5992253

View File

@ -116,8 +116,8 @@ let
pill = solid.lfs;
};
ivory-ropsten = ivory.override { arvo = arvo.ropsten; };
brass-ropsten = brass.override { arvo = arvo.ropsten; };
ivory-goerli = ivory.override { arvo = arvo.goerli; };
brass-goerli = brass.override { arvo = arvo.goerli; };
# Create a .tgz of the primary binaries.
tarball = let

View File

@ -5,16 +5,16 @@ stdenvNoCC.mkDerivation {
src = marsSources;
outputs = [ "out" "ropsten" ];
outputs = [ "out" "goerli" ];
phases = [ "mainnetPhase" "ropstenPhase" ];
phases = [ "mainnetPhase" "goerliPhase" ];
mainnetPhase = ''
ln -s ${marsSources.out}/arvo $out
'';
ropstenPhase = ''
ln -s ${marsSources.ropsten}/arvo $ropsten
goerliPhase = ''
ln -s ${marsSources.goerli}/arvo $goerli
'';
preferLocalBuild = true;

View File

@ -6,16 +6,16 @@ stdenvNoCC.mkDerivation {
buildInputs = [ bc ];
outputs = [ "out" "ropsten" ];
outputs = [ "out" "goerli" ];
phases = [ "mainnetPhase" "ropstenPhase" ];
phases = [ "mainnetPhase" "goerliPhase" ];
mainnetPhase = ''
cp -r $src $out
chmod -R u+w $out
'';
ropstenPhase = ''
goerliPhase = ''
cp -r $src tmp
chmod -R u+w tmp
@ -23,9 +23,9 @@ stdenvNoCC.mkDerivation {
AMES=tmp/arvo/sys/vane/ames.hoon
ACME=tmp/arvo/app/acme.hoon
# Replace the mainnet azimuth contract with the ropsten contract
# Replace the mainnet azimuth contract with the goerli contract
sed --in-place \
's/\(\+\+ contracts \)mainnet\-contracts/\1ropsten-contracts/' \
's/\(\+\+ contracts \)mainnet\-contracts/\1goerli-contracts/' \
$ZUSE
# Increment the %ames protocol version
@ -38,8 +38,8 @@ stdenvNoCC.mkDerivation {
's_https://acme-v02.api.letsencrypt.org/directory_https://acme-staging-v02.api.letsencrypt.org/directory_' \
$ACME
cp -r tmp $ropsten
chmod -R u+w $ropsten
cp -r tmp $goerli
chmod -R u+w $goerli
'';
preferLocalBuild = true;

View File

@ -1,5 +1,5 @@
{ lib, stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, curl
, withRopsten ? false }:
, withGoerli ? false }:
let
@ -9,9 +9,9 @@ in {
build = import ./builder.nix {
inherit stdenvNoCC urbit curl;
name = "brass" + lib.optionalString withRopsten "-ropsten";
name = "brass" + lib.optionalString withGoerli "-goerli";
builder = ./brass.sh;
arvo = if withRopsten then arvo.ropsten else arvo;
arvo = if withGoerli then arvo.goerli else arvo;
pier = bootFakeShip {
inherit urbit;
@ -19,4 +19,4 @@ in {
ship = "zod";
};
};
} // lib.optionalAttrs (!withRopsten) { inherit lfs; }
} // lib.optionalAttrs (!withGoerli) { inherit lfs; }

View File

@ -1,5 +1,5 @@
{ lib, stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, curl, xxd
, withRopsten ? false }:
, withGoerli ? false }:
let
@ -9,9 +9,9 @@ in {
build = import ./builder.nix {
inherit stdenvNoCC urbit curl;
name = "ivory" + lib.optionalString withRopsten "-ropsten";
name = "ivory" + lib.optionalString withGoerli "-goerli";
builder = ./ivory.sh;
arvo = if withRopsten then arvo.ropsten else arvo;
arvo = if withGoerli then arvo.goerli else arvo;
pier = bootFakeShip {
inherit urbit;
@ -39,4 +39,4 @@ in {
preferLocalBuild = true;
};
} // lib.optionalAttrs (!withRopsten) { inherit lfs; }
} // lib.optionalAttrs (!withGoerli) { inherit lfs; }

View File

@ -185,7 +185,7 @@
::
?- network
%mainnet 0x1
%ropsten 0x3
%goerli 0x5
%fakenet `@ux``@`1.337
[%other *] id.network
==

View File

@ -709,7 +709,7 @@
[%hint *] ?+ q.p.a $(a q.a)
[%know *]
?@ p.q.p.a [(cat 3 '#' mark.p.q.p.a)]~
[(rap 3 '#' auth.p.q.p.a (spat type.p.q.p.a) ~)]~
[(rap 3 '#' auth.p.q.p.a '+' (spat type.p.q.p.a) ~)]~
::
[%help *]
[summary.crib.p.q.p.a]~

View File

@ -65,7 +65,7 @@
:: frequency: time to wait between sending batches (TODO fancier)
:: endpoint: ethereum rpc endpoint to use
:: contract: ethereum contract address
:: chain-id: mainnet, ropsten, local (https://chainid.network/)
:: chain-id: mainnet, goerli, local (https://chainid.network/)
:: resend-time: time to resend a batch with higher gas prie
:: update-rate: frequency to update the roller's predicted state
:: fallback-gas-price: default batch gas price
@ -1017,9 +1017,9 @@
=/ [contract=@ux chain-id=@]
=< [naive chain-id]
=, azimuth
?- net.config
?+ net.config !!
%mainnet mainnet-contracts
%ropsten ropsten-contracts
%goerli goerli-contracts
%local local-contracts
%default contracts
==

View File

@ -1,5 +1,5 @@
:: Change node url and network for azimuth
::
:- %say
|= [* [url=@ta net=?(%mainnet %ropsten %local %default) ~] ~]
|= [* [url=@ta net=?(%mainnet %goerli %local %default) ~] ~]
[%azimuth-poke %watch url net]

View File

@ -0,0 +1,28 @@
:: +desk-requests: count pending requests for a desk
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[=desk ~]
~
==
:- %tang
^- tang
=/ cul=(list [@p rave:clay])
%~ tap in
.^ (set [@p rave:clay])
/cx/(scot %p p.bec)//(scot %da now)/cult/[desk]
==
::
=/ [loc=_cul inc=_cul]
(skid cul |=([=@p rave:clay] =(p p.bec)))
=/ syc=_cul
=/ nex=@ud
+(ud:.^(cass:clay %cw /(scot %p p.bec)/[desk]/(scot %da now)))
(skim inc |=([@p =rave:clay] =([%sing %w ud+nex /] rave)))
::
%- flop
:~ leaf+"total: {<(lent cul)>}"
leaf+"- local: {<(lent loc)>}"
leaf+"- incoming: {<(lent inc)>}"
leaf+" - for next: {<(lent syc)>}"
==

View File

@ -0,0 +1,9 @@
:: Deletes all stale ames flows from failed (re) subscriptions
::
:: It runs in dry mode by default, printing the flows that can be closed.
:: To actually close the flows, run with |close-flows, =dry |
::
:- %say
|= [^ arg=~ dry=?]
::
[%helm-ames-kroc dry]

View File

@ -1,4 +1,4 @@
::
:- %say
|= [* [url=@t net=?(%mainnet %ropsten %local) ~] ~]
|= [* [url=@t net=?(%mainnet %goerli %local) ~] ~]
[%roller-action %config %endpoint url net]

View File

@ -0,0 +1,10 @@
:: Configures /app/roller to listen to a Goerli Infura node
::
:- %say
|= *
:* %roller-action
%config
%endpoint
'https://goerli.infura.io/v3/2599df54929b47099bda360958d75aaf'
%goerli
==

View File

@ -1,10 +0,0 @@
:: Configures /app/roller to listen to a Ropsten Infura node
::
:- %say
|= *
:* %roller-action
%config
%endpoint
'https://ropsten.infura.io/v3/2599df54929b47099bda360958d75aaf'
%ropsten
==

View File

@ -0,0 +1,149 @@
:: +stale-flows: prints number of ames flows that can be closed
::
:: |stale-flows, =veb %1 :: flows from nacking initial subscriptions
:: |stale-flows, =veb %2 :: stale flows that keep (re)trying to connect
:: |stale-flows, =veb %21 :: ... per app (only forward)
:: |stale-flows, =veb %3 :: stale resubscriptions
::
=> |%
+$ subs (jar path [ship bone @])
+$ pags (jar app=term [dst=term =ship =path]) :: per-agent
+$ naks (set [ship bone])
:: verbosity
::
+$ veb ?(%0 %1 %2 %21 %3 %31)
::
++ resubs
|= [=subs =veb]
^- @
::=/ sorted
:: %+ sort ~(tap by subs)
:: |=([a=(list *) b=(list *)] (lte (lent a) (lent b)))
%+ roll ~(tap by subs)::sorted
|= [[k=path v=(list [ship bone @])] num=@]
~? &(=(%3 veb) (gth (lent v) 1))
"#{<(dec (lent v))>} stale resubs on {<k>}"
?. (gth (lent v) 1) num
(add (dec (lent v)) num)
--
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[arg=~ dry=? =veb]
==
::
=/ peers-map
.^((map ship ?(%alien %known)) %ax /(scot %p p.bec)//(scot %da now)/peers)
::
=/ peers=(list ship)
%+ murn ~(tap by peers-map)
|= [=ship val=?(%alien %known)]
?: =(ship p.bec)
~ :: this is weird, but we saw it
?- val
%alien ~
%known (some ship)
==
::
=; [[=subs =pags backward=@ forward=@] =naks]
:- %tang %- flop
%+ weld
:~ leaf+"#{<~(wyt in naks)>} flows from %nacking %watches"
leaf+"#{<backward>} live backward flows with (keep retrying)"
leaf+"#{<forward>} live forward flows with (keep retrying)"
leaf+"#{<(resubs subs veb)>} stale resubscriptions"
==
?. =(%21 veb) ~
:- leaf+"----------------------------------"
%+ turn %+ sort ~(tap by pags)
|= [[* v=(list)] [* w=(list)]]
(gth (lent v) (lent w))
|= [app=term v=(list [dst=term =ship =path])]
:- %leaf
%+ weld "#{<(lent v)>} flows for {<app>} with >10 retries"
?. =(1 (lent v)) ~
?> ?=(^ v)
" on {<ship.i.v>} to {<dst.i.v>} at {<path.i.v>}"
::
%+ roll peers
|= [=ship [=subs p=pags b=@ f=@] n=naks]
=+ .^ =ship-state:ames
%ax /(scot %p p.bec)//(scot %da now)/peers/(scot %p ship)
==
=/ =peer-state:ames ?>(?=(%known -.ship-state) +.ship-state)
::
|^ [stale nacks]
::
++ stale
%+ roll ~(tap by snd.peer-state)
|= $: [=bone message-pump-state:ames]
subs=_subs pags=_p
backward=_b forward=_f
==
=, packet-pump-state
:- ?~ duct=(~(get by by-bone.ossuary.peer-state) bone) subs
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
subs
=/ =wire i.t.u.duct
=/ nonce=(unit @) (rush i.t.t.t.t.t.t.t.i.t.u.duct dem)
%- ~(add ja subs)
:_ [ship bone ?~(nonce 0 u.nonce)] :: 0, 1?
?~ nonce wire
:: don't include the sub-nonce in the key
::
(weld (scag 7 wire) (slag 8 wire))
%+ roll ~(tap in live)
|= $: [[msg=@ frag=@] [packet-state:ames *]]
pags=_pags
out=[b=_backward f=_forward]
==
::
:: only forward flows
::
=? pags &(=(0 (end 0 bone)) (gth retries 10))
?~ duct=(~(get by by-bone.ossuary.peer-state) bone)
pags
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
pags
=/ =wire i.t.u.duct
(~(add ja pags) (snag 2 wire) (snag 8 wire) ship (slag 9 wire))
::
~? &(=(%2 veb) (gth retries 10))
=+ arrow=?:(=(0 (end 0 bone)) "<-" "->")
=+ closing=(~(has in closing.peer-state) bone)
%+ weld "{arrow} ({(cite:title ship)}) bone=#{<bone>} "
"closing={<closing>} msg=#{<msg>} frag=#{<frag>} #{<retries>}"
:- pags
=? out (gth retries 10)
?: =(0 (end 0 bone))
[b.out +(f.out)]
[+(b.out) f.out]
out
::
++ nacks
%+ roll ~(tap by rcv.peer-state)
|= [[=bone *] nacks=_n]
?. &(=(0 (end 0 bone)) =(1 (end 0 (rsh 0 bone))))
:: not a naxplanation ack bone
::
nacks
:: by only corking forward flows that have received
:: a nack we avoid corking the current subscription
::
=+ target=(mix 0b10 bone)
:: make sure that the nack bone has a forward flow
::
?~ duct=(~(get by by-bone.ossuary.peer-state) target)
nacks
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
nacks
=/ =wire i.t.u.duct
?> ?=([%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] wire)
=/ app=term i.t.t.wire
=/ nonce=@
=- ?~(- 0 u.-)
(rush i.t.t.t.t.t.t.t.wire dem)
=/ =path t.t.t.t.t.t.t.t.wire
~? =(%1 veb) "[bone={<target>} nonce={<nonce>} agent={<app>}] {<path>}"
(~(put in nacks) [ship target])
--

View File

@ -25,7 +25,7 @@
|= =network
?+ network ~&(%careful-fallback-contracts mainnet-contracts:azimuth)
%mainnet mainnet-contracts:azimuth
%ropsten ropsten-contracts:azimuth
%goerli goerli-contracts:azimuth
==
::
++ encode-claz-call

View File

@ -32,9 +32,9 @@
^- [azimuth=@ux naive=@ux chain-id=@ launch=@]
=< [azimuth naive chain-id launch]
=, azimuth
?- net
?+ net !!
%mainnet mainnet-contracts
%ropsten ropsten-contracts
%goerli goerli-contracts
%local local-contracts
%default contracts
==

View File

@ -245,6 +245,10 @@
|= ~ =< abet
(emit %pass /helm %arvo %a %stir '')
::
++ poke-ames-kroc
|= dry=? =< abet
(emit %pass /helm %arvo %a %kroc dry)
::
++ poke-knob
|= [error-tag=@tas level=?(%hush %soft %loud)] =< abet
(emit %pass /helm %arvo %d %knob error-tag level)
@ -280,6 +284,7 @@
%helm-ames-sift =;(f (f !<(_+<.f vase)) poke-ames-sift)
%helm-ames-verb =;(f (f !<(_+<.f vase)) poke-ames-verb)
%helm-ames-wake =;(f (f !<(_+<.f vase)) poke-ames-wake)
%helm-ames-kroc =;(f (f !<(_+<.f vase)) poke-ames-kroc)
%helm-atom =;(f (f !<(_+<.f vase)) poke-atom)
%helm-automass =;(f (f !<(_+<.f vase)) poke-automass)
%helm-cancel-automass =;(f (f !<(_+<.f vase)) poke-cancel-automass)

View File

@ -1095,6 +1095,7 @@
%+ lard /init
=/ m (strand:rand ,vase)
;< =riot:clay bind:m (warp:strandio her sud ~ %sing %y ud+1 /)
?> ?=(^ riot)
~> %slog.(fmt "activated install into {here}")
;< now=@da bind:m get-time:strandio
;< =riot:clay bind:m (warp:strandio her sud ~ %sing %w da+now /)
@ -1109,6 +1110,7 @@
%+ lard /next
=/ m (strand:rand ,vase)
;< =riot:clay bind:m (warp:strandio her sud ~ %sing %w ud+let /)
?> ?=(^ riot)
~> %slog.(fmt "downloading update for {here}")
;< =riot:clay bind:m (warp:strandio her sud ~ %sing %v ud+let /)
?> ?=(^ riot)
@ -1176,14 +1178,6 @@
::
%main
?> ?=(%mere +<.sign-arvo)
:: This case is maintained by superstition. If you remove it,
:: carefully test that if the source ship is breached, we
:: correctly reset let to 0
::
?: ?=([%| %ali-unavailable *] p.sign-arvo)
=+ "kiln: merge into {here} failed, maybe because sunk; restarting"
%- (slog leaf/- p.p.sign-arvo)
init
?: ?=(%| -.p.sign-arvo)
=+ "kiln: merge into {here} failed, waiting for next revision"
%- (slog leaf/- p.p.sign-arvo)
@ -1200,12 +1194,6 @@
?> ?=(%mere +<.sign-arvo)
?~ kid
..abet
:: See %main for this case
::
?: ?=([%| %ali-unavailable *] p.sign-arvo)
=+ "kids merge to {<u.kid>} failed, maybe peer sunk; restarting"
~> %slog.(fmt -)
init
:: Just notify; we've already started listening for the next
:: version
::

View File

@ -11,7 +11,7 @@
::
++ network
$? %mainnet
%ropsten
%goerli
%fakenet
[%other id=@]
==

View File

@ -8,7 +8,7 @@
+$ sponsors (map ship [residents=(set ship) requests=(set ship)])
+$ history (map address:ethereum (tree hist-tx))
+$ events (list event-log:rpc:ethereum)
+$ net ?(%mainnet %ropsten %local %default)
+$ net ?(%mainnet %ropsten %goerli %local %default)
+$ snap-state [%0 =id:block:jael nas=^state:naive =owners =sponsors]
::
+$ config

View File

@ -352,6 +352,7 @@
:: %heed: track peer's responsiveness; gives %clog if slow
:: %jilt: stop tracking peer's responsiveness
:: %cork: request to delete message flow
:: %kroc: request to delete stale message flows
:: %plea: request to send message
::
:: System and Lifecycle Tasks
@ -362,6 +363,8 @@
:: %sift: limit verbosity to .ships
:: %snub: set packet blacklist to .ships
:: %spew: set verbosity toggles
:: %cong: adjust congestion control parameters
:: %stir: recover from timer desync
:: %trim: release memory
:: %vega: kernel reload notification
::
@ -370,6 +373,7 @@
[%heed =ship]
[%jilt =ship]
[%cork =ship]
[%kroc dry=?]
$>(%plea vane-task)
::
$>(%born vane-task)
@ -378,6 +382,7 @@
[%sift ships=(list ship)]
[%snub ships=(list ship)]
[%spew veb=(list verb)]
[%cong msg=@ud mem=@ud]
[%stir arg=@t]
$>(%trim vane-task)
$>(%vega vane-task)
@ -436,7 +441,7 @@
+$ address @uxaddress
:: $verb: verbosity flag for ames
::
+$ verb ?(%snd %rcv %odd %msg %ges %for %rot)
+$ verb ?(%snd %rcv %odd %msg %ges %for %rot %kay)
:: $blob: raw atom to or from unix, representing a packet
::
+$ blob @uxblob
@ -886,6 +891,17 @@
+$ norm (axal ?) :: tombstone policy
+$ open $-(path vase) :: get prelude
+$ page ^page :: export for compat
+$ pour :: ford build w/content
$% [%file =path]
[%nave =mark]
[%dais =mark]
[%cast =mars]
[%tube =mars]
:: leafs
::
[%vale =path =lobe]
[%arch =path =(map path lobe)]
==
+$ rang :: repository
$: hut=(map tako yaki) :: changes
lat=(map lobe page) :: data
@ -920,6 +936,13 @@
+$ rule [mod=?(%black %white) who=(set whom)] :: node permission
+$ rump [p=care q=case r=@tas s=path] :: relative path
+$ saba [p=ship q=@tas r=moar s=dome] :: patch+merge
+$ soak :: ford result
$% [%cage =cage]
[%vase =vase]
[%arch dir=(map @ta vase)]
[%dais =dais]
[%tube =tube]
==
+$ soba (list [p=path q=miso]) :: delta
+$ suba (list [p=path q=misu]) :: delta
+$ tako @uvI :: yaki ref
@ -1059,6 +1082,31 @@
%^ cat 7 (sham [%yaki (roll p add) q t])
(sham [%tako (roll p add) q t])
[p q has t]
::
:: $leak: ford cache key
::
:: This includes all build inputs, including transitive dependencies,
:: recursively.
::
+$ leak
$~ [*pour ~]
$: =pour
deps=(set leak)
==
::
:: $flow: global ford cache
::
:: Refcount includes references from other items in the cache, and
:: from spills in each desk
::
:: This is optimized for minimizing the number of rebuilds, and given
:: that, minimizing the amount of memory used. It is relatively slow
:: to lookup, because generating a cache key can be fairly slow (for
:: files, it requires parsing; for tubes, it even requires building
:: the marks).
::
+$ flow (map leak [refs=@ud =soak])
::
:: $pile: preprocessed hoon source file
::
:: /- sur-file :: surface imports from /sur
@ -1506,6 +1554,9 @@
:: gall scry endpoint
::
[%scry ~]
:: respond with the @p the requester is authenticated as
::
[%name ~]
:: respond with the default file not found page
::
[%four-oh-four ~]

View File

@ -102,6 +102,7 @@
ges=`?`%.n :: congestion control
for=`?`%.n :: packet forwarding
rot=`?`%.n :: routing attempts
kay=`?`%.n :: is ok/not responding
==
=>
~% %ames ..part ~
@ -121,14 +122,14 @@
:: +qos-update-text: notice text for if connection state changes
::
++ qos-update-text
|= [=ship old=qos new=qos]
|= [=ship old=qos new=qos k=? ships=(set ship)]
^- (unit tape)
::
?+ [-.old -.new] ~
[%unborn %live] `"; {(scow %p ship)} is your neighbor"
[%dead %live] `"; {(scow %p ship)} is ok"
[%live %dead] `"; {(scow %p ship)} not responding still trying"
[%unborn %dead] `"; {(scow %p ship)} not responding still trying"
[%dead %live] ((trace k ship ships |.("is ok")) ~)
[%live %dead] ((trace k ship ships |.("not responding still trying")) ~)
[%unborn %dead] ((trace k ship ships |.("not responding still trying")) ~)
[%live %unborn] `"; {(scow %p ship)} has sunk"
[%dead %unborn] `"; {(scow %p ship)} has sunk"
==
@ -608,6 +609,7 @@
:: crypto-core: interface for encryption and signing
:: bug: debug printing configuration
:: snub: blocklist for incoming packets
:: cong: parameters for marking a flow as clogged
::
:: Note: .corks is only still present for unreleased migration reasons
::
@ -620,6 +622,7 @@
=bug
corks=(set wire)
snub=(set ship)
cong=[msg=@ud mem=@ud]
==
+$ ames-state-4 ames-state-5
+$ ames-state-5
@ -627,7 +630,7 @@
=unix=duct
=life
crypto-core=acru:ames
=bug
bug=bug-9
==
::
+$ ship-state-4 ship-state-5
@ -656,7 +659,7 @@
=unix=duct
=life
crypto-core=acru:ames
=bug
bug=bug-9
==
::
+$ ship-state-6
@ -685,7 +688,7 @@
=unix=duct
=life
crypto-core=acru:ames
=bug
bug=bug-9
==
::
+$ ames-state-8
@ -693,11 +696,40 @@
=unix=duct
=life
crypto-core=acru:ames
=bug
bug=bug-9
corks=(set wire)
==
::
+$ bug-9
$: veb=_[`?`%.n `?`%.n `?`%.n `?`%.n `?`%.n `?`%.n `?`%.n]
ships=(set ship)
==
::
+$ bug-10
$: veb=_[`?`%.n `?`%.n `?`%.n `?`%.n `?`%.n `?`%.n `?`%.n `?`%.n]
ships=(set ship)
==
::
+$ ames-state-9
$: peers=(map ship ship-state)
=unix=duct
=life
crypto-core=acru:ames
bug=bug-9
corks=(set wire)
snub=(set ship)
==
::
+$ ames-state-10
$: peers=(map ship ship-state)
=unix=duct
=life
crypto-core=acru:ames
bug=bug-10
corks=(set wire)
snub=(set ship)
==
::
:: $bug: debug printing configuration
::
:: veb: verbosity toggles
@ -860,7 +892,9 @@
[%6 ames-state-6]
[%7 ames-state-7]
[%8 ames-state-8]
[%9 ^ames-state]
[%9 ames-state-9]
[%10 ames-state-10]
[%11 ^ames-state]
==
::
|= [now=@da eny=@ rof=roof]
@ -983,7 +1017,7 @@
:: lifecycle arms; mostly pass-throughs to the contained adult ames
::
++ scry scry:adult-core
++ stay [%9 %larva queued-events ames-state.adult-gate]
++ stay [%11 %larva queued-events ames-state.adult-gate]
++ load
|= $= old
$% $: %4
@ -1020,8 +1054,22 @@
state=ames-state-8
==
[%adult state=ames-state-8]
== ==
== ==
$: %9
$% $: %larva
events=(qeu queued-event)
state=ames-state-9
==
[%adult state=ames-state-9]
== ==
$: %10
$% $: %larva
events=(qeu queued-event)
state=ames-state-10
==
[%adult state=ames-state-10]
== ==
$: %11
$% $: %larva
events=(qeu queued-event)
state=_ames-state.adult-gate
@ -1076,12 +1124,32 @@
=. queued-events events.old
larval-gate
::
[%9 %adult *] (load:adult-core %9 state.old)
[%9 %adult *]
=. cached-state `[%9 state.old]
~> %slog.0^leaf/"ames: larva reload"
larval-gate
::
[%9 %larva *]
~> %slog.0^leaf/"ames: larva: load"
=. queued-events events.old
larval-gate
::
[%10 %adult *]
=. cached-state `[%10 state.old]
~> %slog.0^leaf/"ames: larva reload"
larval-gate
::
[%10 %larva *]
~> %slog.1^leaf/"ames: larva: load"
=. queued-events events.old
=. adult-gate (load:adult-core %9 state.old)
larval-gate
::
[%11 %adult *] (load:adult-core %11 state.old)
::
[%11 %larva *]
~> %slog.1^leaf/"ames: larva: load"
=. queued-events events.old
=. adult-gate (load:adult-core %11 state.old)
larval-gate
::
==
@ -1102,7 +1170,11 @@
8+(state-7-to-8:load:adult-core +.u.cached-state)
=? u.cached-state ?=(%8 -.u.cached-state)
9+(state-8-to-9:load:adult-core +.u.cached-state)
?> ?=(%9 -.u.cached-state)
=? u.cached-state ?=(%9 -.u.cached-state)
10+(state-9-to-10:load:adult-core +.u.cached-state)
=? u.cached-state ?=(%10 -.u.cached-state)
11+(state-10-to-11:load:adult-core +.u.cached-state)
?> ?=(%11 -.u.cached-state)
=. ames-state.adult-gate +.u.cached-state
[moz larval-core(cached-state ~)]
--
@ -1143,11 +1215,13 @@
%sift (on-sift:event-core ships.task)
%snub (on-snub:event-core ships.task)
%spew (on-spew:event-core veb.task)
%cong (on-cong:event-core [msg mem]:task)
%stir (on-stir:event-core arg.task)
%trim on-trim:event-core
%vega on-vega:event-core
%plea (on-plea:event-core [ship plea]:task)
%cork (on-cork:event-core ship.task)
%kroc (on-kroc:event-core dry.task)
==
::
[moves ames-gate]
@ -1178,19 +1252,19 @@
[moves ames-gate]
:: +stay: extract state before reload
::
++ stay [%9 %adult ames-state]
++ stay [%11 %adult ames-state]
:: +load: load in old state after reload
::
++ load
=< |= $= old-state
$% [%9 ^ames-state]
$% [%11 ^ames-state]
==
^+ ames-gate
?> ?=(%9 -.old-state)
?> ?=(%11 -.old-state)
ames-gate(ames-state +.old-state)
:: all state transitions are called from larval ames
::
|%
:: +state-4-to-5 called from larval-ames
::
++ state-4-to-5
|= ames-state=ames-state-4
@ -1208,7 +1282,6 @@
message-pump-state
ship-state
ames-state
:: +state-5-to-6 called from larval-ames
::
++ state-5-to-6
|= ames-state=ames-state-5
@ -1231,7 +1304,6 @@
:_ +.peer-state
=, -.peer-state
[symmetric-key life rift public-key sponsor]
:: +state-6-to-7 called from larval-ames
::
++ state-6-to-7
|= ames-state=ames-state-6
@ -1246,29 +1318,43 @@
^- peer-state
:- +<.ship-state
[route qos ossuary snd rcv nax heeds ~ ~ ~]:ship-state
:: +state-7-to-8 called from larval-ames
::
++ state-7-to-8
|= ames-state=ames-state-7
^- ames-state-8
:* peers.ames-state
unix-duct.ames-state
life.ames-state
crypto-core.ames-state
bug.ames-state
=, ames-state
:* peers unix-duct life crypto-core bug
*(set wire)
==
::
++ state-8-to-9
|= ames-state=ames-state-8
^- ^^ames-state
:* peers.ames-state
unix-duct.ames-state
life.ames-state
crypto-core.ames-state
bug.ames-state
corks.ames-state
^- ames-state-9
=, ames-state
:* peers unix-duct life crypto-core bug corks
*(set ship)
==
::
++ state-9-to-10
|= ames-state=ames-state-9
^- ames-state-10
=, ames-state
:* peers unix-duct life crypto-core
%= bug.ames-state
veb [&1 &2 &3 &4 &5 &6 |6 %.n]:veb.bug
==
corks snub
==
::
++ state-10-to-11
|= ames-state=ames-state-10
^- ^^ames-state
=, ames-state
:* peers unix-duct life crypto-core bug corks snub
:: 5 messages and 100Kb of data outstanding
::
[msg=5 mem=100.000]
==
--
:: +scry: dereference namespace
::
@ -1400,6 +1486,7 @@
~% %event-gate ..per-event ~
|= [[now=@da eny=@ rof=roof] =duct =ames-state]
=* veb veb.bug.ames-state
=| cork-bone=(unit bone) :: modified by +on-kroc
~% %event-core ..$ ~
|%
++ event-core .
@ -1507,6 +1594,7 @@
%ges acc(ges %.y)
%for acc(for %.y)
%rot acc(rot %.y)
%kay acc(kay %.y)
==
event-core
:: +on-prod: re-send a packet per flow to each of .ships
@ -1532,6 +1620,13 @@
=. peer-core (run-message-pump:peer-core i.bones %prod ~)
$(bones t.bones)
--
:: +on-cong: adjust congestion control parameters
::
++ on-cong
|= [msg=@ud mem=@ud]
^+ event-core
=. cong.ames-state msg^mem
event-core
:: +on-stir: recover from timer desync, setting new timers as needed
::
:: .arg is unused, meant to ease future debug commands
@ -1850,7 +1945,15 @@
=/ =peer-state +.u.ship-state
=/ =channel [[our ship] now channel-state -.peer-state]
::
=^ =bone ossuary.peer-state (bind-duct ossuary.peer-state duct)
=/ [=bone ossuary=_ossuary.peer-state]
?^ cork-bone [u.cork-bone ossuary.peer-state]
(bind-duct ossuary.peer-state duct)
=. ossuary.peer-state ossuary
::
?. (~(has by by-bone.ossuary.peer-state) bone)
%. event-core
%^ trace odd.veb ship
|.("trying to cork {<bone=bone>}, not in the ossuary, ignoring")
::
=. closing.peer-state (~(put in closing.peer-state) bone)
%- %^ trace msg.veb ship
@ -1859,6 +1962,77 @@
=/ rcvr [ship her-life.channel]
"cork plea {<sndr rcvr bone=bone vane.plea path.plea>}"
abet:(on-memo:(make-peer-core peer-state channel) bone plea %plea)
:: +on-kroc: cork all stale flows from failed subscriptions
::
++ on-kroc
|= dry=?
^+ event-core
:: no-op
::
?: & %.(event-core (slog leaf/"ames: %kroc task not ready" ~))
::
=; [corks=@ core=_event-core]
?. dry core
%.(core (slog leaf/"ames: #{<corks>} flows can be corked" ~))
::
%+ roll ~(tap by peers.ames-state)
|= [[=ship =ship-state] corks=@ core=_event-core]
?. ?=(%known -.ship-state)
corks^core
=/ =peer-state:ames ?>(?=(%known -.ship-state) +.ship-state)
=/ subs=(jar path [bone sub-nonce=@])
%+ roll ~(tap by snd.peer-state)
|= $: [=forward=bone message-pump-state:ames]
subs=(jar path [bone sub-nonce=@])
==
?: (~(has in closing.peer-state) forward-bone)
%. subs
%^ trace &(dry odd.veb) ship
|.
%+ weld "stale flow bone={<forward-bone>} in closing, "
"#{<~(wyt in live:packet-pump-state)>} packets retrying"
?~ duct=(~(get by by-bone.ossuary.peer-state) forward-bone)
subs
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
subs
=/ =wire i.t.u.duct
=/ nonce=(unit @) (rush (snag 7 wire) dem)
%- ~(add ja subs)
:: 0 for old pre-nonce subscriptions
::
:_ [forward-bone ?~(nonce 0 u.nonce)]
?~ nonce wire
:: don't include the sub-nonce in the key
::
(weld (scag 7 wire) (slag 8 wire))
%+ roll ~(tap by subs)
|= [[=wire flows=(list [bone sub-nonce=@])] corks=_corks core=_core]
::
%- tail
%+ roll (sort flows |=([[@ n=@] [@ m=@]] (lte n m)))
|= [[=bone nonce=@] resubs=_(lent flows) corks=_corks core=_core]
=/ app=term ?>(?=([%gall %use sub=@ *] wire) i.t.t.wire)
=/ =path (slag 7 wire)
=/ log=tape "[bone={<bone>} agent={<app>} nonce={<nonce>}] {<path>}"
=; corkable=?
=? corks corkable +(corks)
=? core &(corkable !dry) (%*(on-cork core cork-bone `bone) ship)
(dec resubs)^corks^core
:: checks if this is a stale re-subscription
::
?. =(resubs 1)
%. &
(trace &(dry odd.veb) ship |.((weld "stale %watch plea " log)))
:: the current subscription can be safely corked if there
:: is a flow with a naxplanation ack on a backward bone
::
=+ backward-bone=(mix 0b10 bone)
?. =(2 (mod backward-bone 4))
|
?~ (~(get by rcv.peer-state) backward-bone)
|
%. &
(trace &(dry odd.veb) ship |.((weld "failed %watch plea " log)))
:: +on-take-wake: receive wakeup or error notification from behn
::
++ on-take-wake
@ -2016,7 +2190,9 @@
=. +.peer-state +:*^peer-state
:: print change to quality of service, if any
::
=/ text=(unit tape) (qos-update-text ship old-qos qos.peer-state)
=/ text=(unit tape)
%^ qos-update-text ship old-qos
[qos.peer-state kay.veb ships.bug.ames-state]
::
=? event-core ?=(^ text)
(emit duct %pass /qos %d %flog %text u.text)
@ -2421,7 +2597,10 @@
=^ old-qos qos.peer-state [qos.peer-state new-qos]
:: if no update worth reporting, we're done
::
?~ text=(qos-update-text her.channel old-qos new-qos)
=/ text
%^ qos-update-text her.channel old-qos
[new-qos kay.veb ships.bug.ames-state]
?~ text
peer-core
:: print message
::
@ -2445,27 +2624,40 @@
?: =(0 (end 0 bone))
~
`u=message-pump-state
:: clogged: are five or more response messages unsent to this peer?
::
=/ clogged=?
=| acc=@ud
|- ^- ?
?~ pumps
%.n
=. acc
%+ add acc
%+ add
:: in-flight messages
::
(sub [next current]:i.pumps)
:: queued messages
::
~(wyt in unsent-messages.i.pumps)
|^ &(nuf-messages nuf-memory)
:: +nuf-messages: are there enough messages to mark as clogged?
::
?: (gte acc 5)
%.y
$(pumps t.pumps)
:: if clogged, notify client vanek
++ nuf-messages
=| num=@ud
|- ^- ?
?~ pumps |
=. num
;: add num
(sub [next current]:i.pumps)
~(wyt in unsent-messages.i.pumps)
==
?: (gte num msg.cong.ames-state)
&
$(pumps t.pumps)
:: +nuf-memory: is enough memory used to mark as clogged?
::
++ nuf-memory
=| mem=@ud
|- ^- ?
?~ pumps |
=. mem
%+ add
%- ~(rep in unsent-messages.i.pumps)
|=([a=@ b=_mem] (add b (met 3 a)))
?~ unsent-fragments.i.pumps 0
(met 3 fragment.i.unsent-fragments.i.pumps)
?: (gte mem mem.cong.ames-state)
&
$(pumps t.pumps)
--
:: if clogged, notify client vane
::
?. clogged
peer-core

View File

@ -191,19 +191,6 @@
[%1 peg=(unit page)]
==
::
:: Global ford cache
::
:: Refcount includes references from other items in the cache, and
:: from spills in each desk
::
:: This is optimized for minimizing the number of rebuilds, and given
:: that, minimizing the amount of memory used. It is relatively slow
:: to lookup, because generating a cache key can be fairly slow (for
:: files, it requires parsing; for tubes, it even requires building
:: the marks).
::
+$ flow (map leak [refs=@ud =soak])
::
:: Per-desk ford cache
::
:: Spill is the set of "roots" we have into the global ford cache.
@ -228,41 +215,6 @@
[%arch =path]
==
::
:: Ford build with content.
::
+$ pour
$% [%file =path]
[%nave =mark]
[%dais =mark]
[%cast =mars]
[%tube =mars]
:: leafs
::
[%vale =path =lobe]
[%arch =path =(map path lobe)]
==
::
:: Ford result.
::
+$ soak
$% [%cage =cage]
[%vase =vase]
[%arch dir=(map @ta vase)]
[%dais =dais]
[%tube =tube]
==
::
:: Ford cache key
::
:: This includes all build inputs, including transitive dependencies,
:: recursively.
::
+$ leak
$~ [*pour ~]
$: =pour
deps=(set leak)
==
::
:: New desk data.
::
:: Sent to other ships to update them about a particular desk.
@ -4208,8 +4160,24 @@
:: +read-s: produce miscellaneous
::
++ read-s
|= [yon=aeon pax=path]
|= [yon=aeon pax=path =case]
^- (unit (unit cage))
?: ?=([%subs ~] pax)
?. =([%da now] case) ~
=| sus=(set ship)
=/ doj=(unit dojo) (~(get by dos.rom) syd)
?~ doj
``noun+!>(sus)
=/ wos ~(tap in ~(key by qyx.u.doj))
|-
?~ wos
``noun+!>(sus)
?~ for.i.wos
$(wos t.wos)
%= $
wos t.wos
sus (~(put in sus) ship.u.for.i.wos)
==
?: ?=([%bloc ~] pax)
:^ ~ ~ %noun
:- -:!>(*(map lobe page))
@ -4475,7 +4443,7 @@
%f (read-f yon path.mun)
%p [(read-p path.mun) ..park]
%r (read-r yon path.mun)
%s [(read-s yon path.mun) ..park]
%s [(read-s yon path.mun case.mun) ..park]
%t [(read-t yon path.mun) ..park]
%u [(read-u yon path.mun) ..park]
%v [(read-v yon path.mun) ..park]
@ -4859,7 +4827,9 @@
::
%merg :: direct state up
?: =(%$ des.req)
~&(%merg-no-desk !!)
~|(%merg-no-desk !!)
?. ((sane %tas) des.req)
~|([%merg-bad-desk-name des.req] !!)
=^ mos ruf
=/ den ((de now rof hen ruf) our des.req)
abet:(start-merge:den her.req dem.req cas.req how.req)
@ -4867,7 +4837,9 @@
::
%fuse
?: =(%$ des.req)
~&(%fuse-no-desk !!)
~|(%fuse-no-desk !!)
?. ((sane %tas) des.req)
~|([%fuse-bad-desk-name des.req] !!)
=^ mos ruf
=/ den ((de now rof hen ruf) our des.req)
abet:(start-fuse:den bas.req con.req)
@ -4913,6 +4885,8 @@
[(weld moves-1 moves-2) ..^^$]
::
%park
?. ((sane %tas) des.req)
~|([%park-bad-desk des.req] !!)
=^ mos ruf
=/ den ((de now rof hen ruf) our des.req)
abet:(park:den | & [yok ran]:req)
@ -5662,6 +5636,8 @@
%sweep ``[%sweep !>(sweep)]
%rang ``[%rang !>(ran.ruf)]
%tomb ``[%flag !>((tomb t.path))]
%cult ``[%cult !>((cult t.path))]
%flow ``[%flow !>(fad.ruf)]
%domes domes
%tire ``[%tire !>(tore:(lu now rof *duct ruf))]
%tyre ``[%tyre !>(tyr.ruf)]
@ -5687,6 +5663,22 @@
[[ship desk] [[let hit lab] tom nor liv ren]:dom.rede]
``[%domes !>(`cone`domes)]
::
++ cult
|= =path
^- (set [@p rave])
%- %~ run in
%~ key by
?~ path *^cult
qyx:(~(gut by dos.rom.ruf) i.path *dojo)
|= wove
:- ship:(fall for [ship=our @ud])
?- -.rove
%sing rove
%next [%next mood.rove]
%mult [%mult mool.rove]
%many [%many [track moat]:rove]
==
::
:: True if file is accessible
::
++ tomb

View File

@ -70,7 +70,7 @@
++ axle
$: :: date: date at which http-server's state was updated to this data structure
::
date=%~2020.10.18
date=%~2022.7.26
:: server-state: state of inbound requests
::
=server-state
@ -744,11 +744,32 @@
::
%scry
(handle-scry authenticated address request(url suburl))
::
%name
(handle-name authenticated request)
::
%four-oh-four
%^ return-static-data-on-duct 404 'text/html'
(error-page 404 authenticated url.request ~)
==
:: +handle-name: respond with our @p or 403
::
++ handle-name
|= [authenticated=? =request:http]
|^ ^- (quip move server-state)
?. authenticated
(error-response 403 ~)
?. =(%'GET' method.request)
(error-response 405 "may only GET name")
%^ return-static-data-on-duct 200 'text/plain'
(as-octs:mimes:html (scot %p our))
::
++ error-response
|= [status=@ud =tape]
^- (quip move server-state)
%^ return-static-data-on-duct status 'text/html'
(error-page status authenticated url.request tape)
--
:: +handle-scry: respond with scry result, 404 or 500
::
++ handle-scry
@ -848,7 +869,7 @@
%leave ~
==
::
?(%authentication %logout)
?(%authentication %logout %name)
[~ state]
::
%channel
@ -2207,6 +2228,7 @@
[[~ /~/logout] duct [%logout ~]]
[[~ /~/channel] duct [%channel ~]]
[[~ /~/scry] duct [%scry ~]]
[[~ /~/name] duct [%name ~]]
==
[~ http-server-gate]
:: %trim: in response to memory pressure
@ -2577,15 +2599,36 @@
:: +load: migrate old state to new state (called on vane reload)
::
++ load
|= old=axle
=> |%
++ axle-old
%+ cork
axle
|= =axle
axle(date %~2020.10.18)
--
|= old=$%(axle axle-old)
^+ ..^$
:: enable https redirects if certificate configured
::
=. redirect.http-config.server-state.old
?& ?=(^ secure.ports.server-state.old)
?=(^ secure.http-config.server-state.old)
?- -.old
%~2020.10.18
%= $
date.old %~2022.7.26
::
bindings.server-state.old
%+ insert-binding
[[~ /~/name] outgoing-duct.server-state.old [%name ~]]
bindings.server-state.old
==
..^$(ax old)
::
%~2022.7.26
:: enable https redirects if certificate configured
::
=. redirect.http-config.server-state.old
?& ?=(^ secure.ports.server-state.old)
?=(^ secure.http-config.server-state.old)
==
..^$(ax old)
==
:: +stay: produce current state
::
++ stay `axle`ax
@ -2668,13 +2711,11 @@
=* domains domains.server-state.ax
=* ports ports.server-state.ax
=/ =host:eyre [%& ?^(domains n.domains /localhost)]
=/ secure=? &(?=(^ secure.ports) !?=(hoke:eyre host))
=/ port=(unit @ud)
?. secure
?. ?=(^ secure.ports)
?:(=(80 insecure.ports) ~ `insecure.ports)
?> ?=(^ secure.ports)
?:(=(443 u.secure.ports) ~ secure.ports)
``[secure port host]
``[?=(^ secure.ports) port host]
==
==
--

View File

@ -46,7 +46,7 @@
+$ address address:naive :: @ux
+$ keccak @ux :: used for transaction and roll hashes
+$ blocknum number:block :: @udblocknumber
+$ net net:dice :: ?(%mainnet %ropsten %local %default)
+$ net net:dice :: ?(%mainnet %goerli %local %default)
+$ roll-dat :: all data required for each roll
[[gas=@ud sender=address] =effects:naive]
+$ block-dat :: all data required for each block

View File

@ -114,29 +114,29 @@
::
:: Testnet contract addresses
::
++ ropsten-contracts
++ goerli-contracts
|%
++ azimuth
0x308a.b6a6.024c.f198.b57e.008d.0ac9.ad02.1988.6579
0xbb61.fa68.3e4b.9104.18e2.7b00.a143.8a93.6234.df52
::
++ ecliptic
0x8b9f.86a2.8921.d9c7.05b3.113a.755f.b979.e1bd.1bce
0xe129.0a32.9014.5e63.e6a8.ec1e.f661.6906.856d.0c8f
::
++ linear-star-release
0x1f8e.dd03.1ee4.1474.0aed.b39b.84fb.8f2f.66ca.422f
0x0
::
++ conditional-star-release
0x0
::
++ delegated-sending
0x3e8c.a510.354b.c2fd.bbd6.1502.52d9.3105.c9c2.7bbe
0x0
::
++ naive
0xe7cf.4b83.06d3.11ba.ca15.585f.e3f0.7cd0.441c.21d1
0x56e3.7137.cdaf.c026.a732.e8e8.40cd.621e.d50b.d210
::
++ launch 4.601.630
++ public launch
++ chain-id 3
++ launch 7.834.742
++ public 7.834.800
++ chain-id 5
--
::
:: Local contract addresses

View File

@ -58,15 +58,15 @@ export const showBlit = (term: Terminal, blit: Blit) => {
export const showSlog = (term: Terminal, slog: string) => {
// set scroll region to exclude the bottom line,
// scroll up one line,
// move cursor to start of the newly created whitespace,
// move cursor to bottom left of the scroll region,
// print a newline to move everything up a line,
// set text to grey,
// print the slog,
// restore color, scroll region, and cursor.
//
term.write(csi('r', 1, term.rows - 1)
+ csi('S', 1)
+ csi('H', term.rows - 1, 1)
+ '\n'
+ csi('m', 90)
+ slog
+ csi('m', 0)

View File

@ -1,9 +1,9 @@
:~ title+'Terminal'
info+'A web interface to your Urbit\'s command line.'
color+0x2e.4347
glob-http+['https://bootstrap.urbit.org/glob-0v5.hvjci.n7c4h.1onl6.34g14.fut7c.glob' 0v5.hvjci.n7c4h.1onl6.34g14.fut7c]
glob-http+['https://bootstrap.urbit.org/glob-0vep1vb.e09fv.h88mg.endg6.3mip6.glob' 0vep1vb.e09fv.h88mg.endg6.3mip6]
base+'webterm'
version+[1 1 0]
version+[1 1 1]
website+'https://tlon.io'
license+'MIT'
==

21
sh/create-goerli-pills Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Usage: create-goerli-pills
# Build the ivory and brass goerli pills, copying them to the local directory,
# named with the current give revision
set -xeuo pipefail
cd "${0%/*}/.."
rev="$(git rev-parse HEAD)"
sha="${rev:0:5}"
brass="brass-goerli-${sha}.pill"
ivory="ivory-goerli-${sha}.pill"
cp -f "$(nix-build -A brass-goerli.build --no-out-link)" "$brass"
cp -f "$(nix-build -A ivory-goerli.build --no-out-link)" "$ivory"
chmod 0644 "$brass" "$ivory"

View File

@ -1,21 +0,0 @@
#!/usr/bin/env bash
# Usage: create-ropsten-pills
# Build the ivory and brass ropsten pills, copying them to the local directory,
# named with the current give revision
set -xeuo pipefail
cd "${0%/*}/.."
rev="$(git rev-parse HEAD)"
sha="${rev:0:5}"
brass="brass-ropsten-${sha}.pill"
ivory="ivory-ropsten-${sha}.pill"
cp -f "$(nix-build -A brass-ropsten.build --no-out-link)" "$brass"
cp -f "$(nix-build -A ivory-ropsten.build --no-out-link)" "$ivory"
chmod 0644 "$brass" "$ivory"

View File

@ -24,6 +24,14 @@
++ test-hint-xray
~> %xray.[1 leaf+"test-hint-xray ~"]
~
:: test that these memory-report hints
:: are safe to run or ignore
++ test-hilt-meme
~> %meme
~
++ test-hint-meme
~> %meme.[1 leaf+"test-hint-meme ~"]
~
:: test that the hilt bout hint
:: is safe to run or ignore
++ test-hilt-bout