From 58b678505f292d1c92b465f5e55bc6e778ed74de Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Wed, 16 Aug 2023 10:23:52 +0200 Subject: [PATCH 1/3] roller: fix state migration --- pkg/arvo/app/roller.hoon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/arvo/app/roller.hoon b/pkg/arvo/app/roller.hoon index b272645245..e1b6820763 100644 --- a/pkg/arvo/app/roller.hoon +++ b/pkg/arvo/app/roller.hoon @@ -363,7 +363,7 @@ ++ state-0 $: %0 pending=(list pend-tx) - sending=(tree [l1-tx-pointer send-tx]) + sending=(tree [l1-tx-pointer old-send-tx-4]) finding=(map keccak ?(%confirmed %failed [=time l1-tx-pointer])) history=(map address:ethereum (tree hist-tx)) next-nonce=(unit @ud) From def2591812ebc87c2018d98a8cd886f8d375c0bf Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Thu, 17 Aug 2023 15:05:53 +0200 Subject: [PATCH 2/3] ames: reinitialize congestion control values --- pkg/arvo/sys/vane/ames.hoon | 47 +++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index abbe9297ad..a7e3919d98 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -579,7 +579,7 @@ crypto-core=acru:ames =bug snub=[form=?(%allow %deny) ships=(set ship)] - cong=[msg=@ud mem=@ud] + cong=[msg=_5 mem=_100.000] == :: +$ azimuth-state [=symmetric-key =life =rift =public-key sponsor=ship] @@ -1084,6 +1084,7 @@ snub=[form=?(%allow %deny) ships=(set ship)] cong=[msg=@ud mem=@ud] == ++$ ames-state-15 ames-state-14 :: $bug: debug printing configuration :: :: veb: verbosity toggles @@ -1225,7 +1226,8 @@ [%12 ames-state-12] [%13 ames-state-13] [%14 ames-state-14] - [%15 ^ames-state] + [%15 ames-state-15] + [%16 ^ames-state] == :: |= [now=@da eny=@ rof=roof] @@ -1348,7 +1350,7 @@ :: lifecycle arms; mostly pass-throughs to the contained adult ames :: ++ scry scry:adult-core - ++ stay [%15 %larva queued-events ames-state.adult-gate] + ++ stay [%16 %larva queued-events ames-state.adult-gate] ++ load |= $= old $% $: %4 @@ -1429,6 +1431,13 @@ [%adult state=ames-state-14] == == $: %15 + $% $: %larva + events=(qeu queued-event) + state=ames-state-15 + == + [%adult state=ames-state-15] + == == + $: %16 $% $: %larva events=(qeu queued-event) state=_ames-state.adult-gate @@ -1553,12 +1562,23 @@ =. queued-events events.old larval-gate :: - [%15 %adult *] (load:adult-core %15 state.old) + [%15 %adult *] + =. cached-state `[%15 state.old] + ~> %slog.0^leaf/"ames: larva reload" + larval-gate :: [%15 %larva *] ~> %slog.1^leaf/"ames: larva: load" + =. cached-state `[%15 state.old] =. queued-events events.old - =. adult-gate (load:adult-core %15 state.old) + larval-gate + :: + [%16 %adult *] (load:adult-core %16 state.old) + :: + [%16 %larva *] + ~> %slog.1^leaf/"ames: larva: load" + =. queued-events events.old + =. adult-gate (load:adult-core %16 state.old) larval-gate == :: @@ -1605,7 +1625,9 @@ 14+(state-13-to-14:load:adult-core +.u.cached-state) =? u.cached-state ?=(%14 -.u.cached-state) 15+(state-14-to-15:load:adult-core +.u.cached-state) - ?> ?=(%15 -.u.cached-state) + =? u.cached-state ?=(%15 -.u.cached-state) + 16+(state-15-to-16:load:adult-core +.u.cached-state) + ?> ?=(%16 -.u.cached-state) =. ames-state.adult-gate +.u.cached-state [moz larval-core(cached-state ~)] -- @@ -4746,15 +4768,15 @@ [moves ames-gate] :: +stay: extract state before reload :: -++ stay [%15 %adult ames-state] +++ stay [%16 %adult ames-state] :: +load: load in old state after reload :: ++ load =< |= $= old-state - $% [%15 ^ames-state] + $% [%16 ^ames-state] == ^+ ames-gate - ?> ?=(%15 -.old-state) + ?> ?=(%16 -.old-state) ames-gate(ames-state +.old-state) :: all state transitions are called from larval ames :: @@ -4915,11 +4937,16 @@ :: ++ state-14-to-15 |= old=ames-state-14 - ^- ^ames-state + ^- ames-state-15 =. rift.old !< =rift q:(need (need (rof ~ %j `beam`[[our %rift %da now] /(scot %p our)]))) old + :: + ++ state-15-to-16 + |= old=ames-state-15 + ^- ^ames-state + old(cong [5 100.000]) -- :: +scry: dereference namespace :: From 19f5946e725f50f75ac78c599300c11860ae84b4 Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Thu, 17 Aug 2023 15:13:10 +0200 Subject: [PATCH 3/3] ames: only reinitialize congestion if bunted --- pkg/arvo/sys/vane/ames.hoon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index a7e3919d98..ebd5bbdc24 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -4946,7 +4946,7 @@ ++ state-15-to-16 |= old=ames-state-15 ^- ^ames-state - old(cong [5 100.000]) + old(cong ?.(=(cong.old [0 0]) cong.old [5 100.000])) -- :: +scry: dereference namespace ::