mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-02 03:52:13 +03:00
Merge pull request #6348 from urbit/release/urbit-os-v2.134
Release urbit-os-v2.134
This commit is contained in:
commit
598bdfdc1b
@ -126,7 +126,10 @@ git push origin <tagname>
|
||||
- [ ] 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`
|
||||
- [ ] Install the contents of the `%kids` desk on `~marnec-dozzod-marzod` into our `%base`: `|merge %base ~marnec-dozzod-marzod %kids, =gem %only-that`
|
||||
- [ ] 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.
|
||||
@ -143,6 +146,17 @@ git push origin <tagname>
|
||||
- [ ] 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.
|
||||
|
6
Makefile
6
Makefile
@ -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
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:55f1bcccf861b3a2247aabb6ec3349829272ef8c36cfc8a16ff0930aac87a24d
|
||||
size 5748196
|
||||
oid sha256:544744b6d1360692b83be7f3e505d0710ea6ce541912509601e81fec2a2cea2e
|
||||
size 5992253
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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; }
|
||||
|
@ -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; }
|
||||
|
@ -185,7 +185,7 @@
|
||||
::
|
||||
?- network
|
||||
%mainnet 0x1
|
||||
%ropsten 0x3
|
||||
%goerli 0x5
|
||||
%fakenet `@ux``@`1.337
|
||||
[%other *] id.network
|
||||
==
|
||||
|
@ -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
|
||||
==
|
||||
|
@ -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]
|
||||
|
28
pkg/arvo/gen/desk-requests.hoon
Normal file
28
pkg/arvo/gen/desk-requests.hoon
Normal 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)>}"
|
||||
==
|
9
pkg/arvo/gen/hood/close-flows.hoon
Normal file
9
pkg/arvo/gen/hood/close-flows.hoon
Normal 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]
|
@ -1,4 +1,4 @@
|
||||
::
|
||||
:- %say
|
||||
|= [* [url=@t net=?(%mainnet %ropsten %local) ~] ~]
|
||||
|= [* [url=@t net=?(%mainnet %goerli %local) ~] ~]
|
||||
[%roller-action %config %endpoint url net]
|
||||
|
10
pkg/arvo/gen/roller/goerli.hoon
Normal file
10
pkg/arvo/gen/roller/goerli.hoon
Normal 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
|
||||
==
|
@ -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
|
||||
==
|
149
pkg/arvo/gen/stale-flows.hoon
Normal file
149
pkg/arvo/gen/stale-flows.hoon
Normal 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])
|
||||
--
|
@ -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
|
||||
|
@ -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
|
||||
==
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
::
|
||||
|
@ -11,7 +11,7 @@
|
||||
::
|
||||
++ network
|
||||
$? %mainnet
|
||||
%ropsten
|
||||
%goerli
|
||||
%fakenet
|
||||
[%other id=@]
|
||||
==
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
@ -1549,6 +1554,10 @@
|
||||
:: gall scry endpoint
|
||||
::
|
||||
[%scry ~]
|
||||
:: respond with the @p the requester is authenticated as
|
||||
:: TODO: put this back in when we burn the next kelvin
|
||||
::
|
||||
:: [%name ~]
|
||||
:: respond with the default file not found page
|
||||
::
|
||||
[%four-oh-four ~]
|
||||
|
@ -609,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
|
||||
::
|
||||
@ -621,6 +622,7 @@
|
||||
=bug
|
||||
corks=(set wire)
|
||||
snub=(set ship)
|
||||
cong=[msg=@ud mem=@ud]
|
||||
==
|
||||
+$ ames-state-4 ames-state-5
|
||||
+$ ames-state-5
|
||||
@ -703,6 +705,11 @@
|
||||
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
|
||||
@ -713,6 +720,16 @@
|
||||
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
|
||||
@ -876,7 +893,8 @@
|
||||
[%7 ames-state-7]
|
||||
[%8 ames-state-8]
|
||||
[%9 ames-state-9]
|
||||
[%10 ^ames-state]
|
||||
[%10 ames-state-10]
|
||||
[%11 ^ames-state]
|
||||
==
|
||||
::
|
||||
|= [now=@da eny=@ rof=roof]
|
||||
@ -999,7 +1017,7 @@
|
||||
:: lifecycle arms; mostly pass-throughs to the contained adult ames
|
||||
::
|
||||
++ scry scry:adult-core
|
||||
++ stay [%10 %larva queued-events ames-state.adult-gate]
|
||||
++ stay [%11 %larva queued-events ames-state.adult-gate]
|
||||
++ load
|
||||
|= $= old
|
||||
$% $: %4
|
||||
@ -1045,6 +1063,13 @@
|
||||
[%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
|
||||
@ -1109,12 +1134,22 @@
|
||||
=. queued-events events.old
|
||||
larval-gate
|
||||
::
|
||||
[%10 %adult *] (load:adult-core %10 state.old)
|
||||
[%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 %10 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
|
||||
::
|
||||
==
|
||||
@ -1137,7 +1172,9 @@
|
||||
9+(state-8-to-9:load:adult-core +.u.cached-state)
|
||||
=? u.cached-state ?=(%9 -.u.cached-state)
|
||||
10+(state-9-to-10:load:adult-core +.u.cached-state)
|
||||
?> ?=(%10 -.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 ~)]
|
||||
--
|
||||
@ -1178,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]
|
||||
@ -1213,19 +1252,19 @@
|
||||
[moves ames-gate]
|
||||
:: +stay: extract state before reload
|
||||
::
|
||||
++ stay [%10 %adult ames-state]
|
||||
++ stay [%11 %adult ames-state]
|
||||
:: +load: load in old state after reload
|
||||
::
|
||||
++ load
|
||||
=< |= $= old-state
|
||||
$% [%10 ^ames-state]
|
||||
$% [%11 ^ames-state]
|
||||
==
|
||||
^+ ames-gate
|
||||
?> ?=(%10 -.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
|
||||
@ -1243,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
|
||||
@ -1266,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
|
||||
@ -1281,41 +1318,42 @@
|
||||
^- 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-9
|
||||
:* peers.ames-state
|
||||
unix-duct.ames-state
|
||||
life.ames-state
|
||||
crypto-core.ames-state
|
||||
bug.ames-state
|
||||
corks.ames-state
|
||||
=, ames-state
|
||||
:* peers unix-duct life crypto-core bug corks
|
||||
*(set ship)
|
||||
==
|
||||
::
|
||||
++ state-9-to-10
|
||||
|= ames-state=ames-state-9
|
||||
^- ^^ames-state
|
||||
:* peers.ames-state
|
||||
unix-duct.ames-state
|
||||
life.ames-state
|
||||
crypto-core.ames-state
|
||||
^- 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.ames-state
|
||||
veb [&1 &2 &3 &4 &5 &6 |6 %.n]:veb.bug
|
||||
==
|
||||
corks.ames-state
|
||||
snub.ames-state
|
||||
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
|
||||
@ -1448,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 .
|
||||
@ -1581,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
|
||||
@ -1899,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
|
||||
@ -1908,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
|
||||
@ -2499,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
|
||||
|
@ -4827,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)
|
||||
@ -4835,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)
|
||||
@ -4881,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)
|
||||
@ -5630,6 +5636,7 @@
|
||||
%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))]
|
||||
@ -5656,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
|
||||
|
@ -70,11 +70,37 @@
|
||||
++ 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
|
||||
==
|
||||
::
|
||||
:: +outstanding-connection-new: intermediate type to enable
|
||||
:: /~/name endpoint without
|
||||
:: breaking type change in lull
|
||||
::
|
||||
+$ outstanding-connection-new
|
||||
$: :: action: the action that had matched
|
||||
::
|
||||
action=action-new
|
||||
:: inbound-request: the original request which caused this connection
|
||||
::
|
||||
=inbound-request
|
||||
:: response-header: set when we get our first %start
|
||||
::
|
||||
response-header=(unit response-header:http)
|
||||
:: bytes-sent: the total bytes sent in response
|
||||
::
|
||||
bytes-sent=@ud
|
||||
==
|
||||
:: +action-new: intermediate type to enable /~/name endpoint
|
||||
:: without breaking type change in lull
|
||||
::
|
||||
+$ action-new
|
||||
$% action
|
||||
[%name ~]
|
||||
==
|
||||
:: +server-state: state relating to open inbound HTTP connections
|
||||
::
|
||||
+$ server-state
|
||||
@ -87,13 +113,13 @@
|
||||
:: TODO: It would be nice if we had a path trie. We could decompose
|
||||
:: the :binding into a (map (unit @t) (trie knot =action)).
|
||||
::
|
||||
bindings=(list [=binding =duct =action])
|
||||
bindings=(list [=binding =duct action=action-new])
|
||||
:: cors-registry: state used and managed by the +cors core
|
||||
::
|
||||
=cors-registry
|
||||
:: connections: open http connections not fully complete
|
||||
::
|
||||
connections=(map duct outstanding-connection)
|
||||
connections=(map duct outstanding-connection-new)
|
||||
:: authentication-state: state managed by the +authentication core
|
||||
::
|
||||
=authentication-state
|
||||
@ -580,7 +606,7 @@
|
||||
::
|
||||
=/ act [%app app=%lens]
|
||||
::
|
||||
=/ connection=outstanding-connection
|
||||
=/ connection=outstanding-connection-new
|
||||
[act [& secure address request] ~ 0]
|
||||
::
|
||||
=. connections.state
|
||||
@ -604,13 +630,13 @@
|
||||
(fall (forwarded-for u.forwards) address)
|
||||
::
|
||||
=/ host (get-header:http 'host' headers)
|
||||
=/ [=action suburl=@t]
|
||||
=/ [action=action-new suburl=@t]
|
||||
(get-action-for-binding host url.request)
|
||||
::
|
||||
=/ authenticated (request-is-logged-in:authentication request)
|
||||
:: record that we started an asynchronous response
|
||||
::
|
||||
=/ connection=outstanding-connection
|
||||
=/ connection=outstanding-connection-new
|
||||
[action [authenticated secure address request] ~ 0]
|
||||
=. connections.state
|
||||
(~(put by connections.state) duct connection)
|
||||
@ -744,11 +770,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 +895,7 @@
|
||||
%leave ~
|
||||
==
|
||||
::
|
||||
?(%authentication %logout)
|
||||
?(%authentication %logout %name)
|
||||
[~ state]
|
||||
::
|
||||
%channel
|
||||
@ -1914,7 +1961,7 @@
|
||||
(session-cookie-string u.session-id &)
|
||||
headers.response-header.http-event
|
||||
::
|
||||
=/ connection=outstanding-connection
|
||||
=/ connection=outstanding-connection-new
|
||||
(~(got by connections.state) duct)
|
||||
:: if the request was a simple cors request from an approved origin
|
||||
:: append the necessary cors headers to the response
|
||||
@ -1950,7 +1997,7 @@
|
||||
::
|
||||
=. connections.state
|
||||
%+ ~(jab by connections.state) duct
|
||||
|= connection=outstanding-connection
|
||||
|= connection=outstanding-connection-new
|
||||
=+ size=?~(data.http-event 0 p.u.data.http-event)
|
||||
connection(bytes-sent (add bytes-sent.connection size))
|
||||
::
|
||||
@ -2003,7 +2050,7 @@
|
||||
:: Adds =binding =action if there is no conflicting bindings.
|
||||
::
|
||||
++ add-binding
|
||||
|= [=binding =action]
|
||||
|= [=binding action=action-new]
|
||||
^- [(list move) server-state]
|
||||
=^ success bindings.state
|
||||
:: prevent binding in reserved namespaces
|
||||
@ -2024,7 +2071,7 @@
|
||||
%_ state
|
||||
bindings
|
||||
%+ skip bindings.state
|
||||
|= [item-binding=^binding item-duct=^duct =action]
|
||||
|= [item-binding=^binding item-duct=^duct action=action-new]
|
||||
^- ?
|
||||
&(=(item-binding binding) =(item-duct duct))
|
||||
==
|
||||
@ -2032,7 +2079,7 @@
|
||||
::
|
||||
++ get-action-for-binding
|
||||
|= [raw-host=(unit @t) url=@t]
|
||||
^- [=action suburl=@t]
|
||||
^- [action=action-new suburl=@t]
|
||||
:: process :raw-host
|
||||
::
|
||||
:: If we are missing a 'Host:' header, if that header is a raw IP
|
||||
@ -2138,8 +2185,8 @@
|
||||
:: +insert-binding: add a new binding, replacing any existing at its path
|
||||
::
|
||||
++ insert-binding
|
||||
|= $: new=[=binding =duct =action]
|
||||
bindings=(list [=binding =duct =action])
|
||||
|= $: new=[=binding =duct action=action-new]
|
||||
bindings=(list [=binding =duct action=action-new])
|
||||
==
|
||||
^+ bindings
|
||||
?~ bindings [new]~
|
||||
@ -2202,11 +2249,12 @@
|
||||
::
|
||||
=. bindings.server-state.ax
|
||||
=- (roll - insert-binding)
|
||||
^- (list [binding ^duct action])
|
||||
^- (list [binding ^duct action-new])
|
||||
:~ [[~ /~/login] duct [%authentication ~]]
|
||||
[[~ /~/logout] duct [%logout ~]]
|
||||
[[~ /~/channel] duct [%channel ~]]
|
||||
[[~ /~/scry] duct [%scry ~]]
|
||||
[[~ /~/name] duct [%name ~]]
|
||||
==
|
||||
[~ http-server-gate]
|
||||
:: %trim: in response to memory pressure
|
||||
@ -2574,18 +2622,64 @@
|
||||
--
|
||||
::
|
||||
++ http-server-gate ..$
|
||||
:: +bindings-old: filter /~/name endpoint from bindings
|
||||
::
|
||||
++ bindings-old
|
||||
|= new=(list [b=binding d=duct a=action-new])
|
||||
=| old=(list [binding duct action])
|
||||
|- ^+ old
|
||||
?~ new old
|
||||
=/ l
|
||||
?: ?=([%name ~] a.i.new)
|
||||
old
|
||||
(snoc old [b.i.new d.i.new a.i.new])
|
||||
$(new t.new, old l)
|
||||
:: +connections-old: filter /~/name endpoint from connections
|
||||
::
|
||||
++ connections-old
|
||||
|= new=(map duct outstanding-connection-new)
|
||||
=| old=(map duct outstanding-connection)
|
||||
=/ l=(list [d=duct o=outstanding-connection-new]) ~(tap by new)
|
||||
|- ^+ old
|
||||
?~ l old
|
||||
=/ x
|
||||
?: ?=([%name ~] -.o.i.l)
|
||||
old
|
||||
(~(put by old) d.i.l o.i.l)
|
||||
$(l t.l, old x)
|
||||
:: +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
|
||||
@ -2607,9 +2701,9 @@
|
||||
=* who p.why
|
||||
?: =(tyl /whey)
|
||||
=/ maz=(list mass)
|
||||
:~ bindings+&+bindings.server-state.ax
|
||||
:~ bindings+&+(bindings-old bindings.server-state.ax)
|
||||
auth+&+authentication-state.server-state.ax
|
||||
connections+&+connections.server-state.ax
|
||||
connections+&+(connections-old connections.server-state.ax)
|
||||
channels+&+channel-state.server-state.ax
|
||||
axle+&+ax
|
||||
==
|
||||
@ -2649,8 +2743,8 @@
|
||||
?. ?=(%$ ren)
|
||||
[~ ~]
|
||||
?+ syd [~ ~]
|
||||
%bindings ``noun+!>(bindings.server-state.ax)
|
||||
%connections ``noun+!>(connections.server-state.ax)
|
||||
%bindings ``noun+!>((bindings-old bindings.server-state.ax))
|
||||
%connections ``noun+!>((connections-old connections.server-state.ax))
|
||||
%authentication-state ``noun+!>(authentication-state.server-state.ax)
|
||||
%channel-state ``noun+!>(channel-state.server-state.ax)
|
||||
::
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
21
sh/create-goerli-pills
Executable 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"
|
@ -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"
|
Loading…
Reference in New Issue
Block a user