New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jael: give new private key to subscribers on %keys new-event #5532
Conversation
This adds support for handling cases where the send-batch thread failed, mainly among them, a thread crash. One of the events that causes this behavior is a ver low gas price for this L1 transaction. Here we add support for manually bumping the price for such transaction, and for increasing the default fallback gas-price, together with discarding any malformed batch from the sending queue.
Triggering this event has been added to /app/azimuth's +on-load
this also adds a %rerun %poke to /app/azimuth
I also booted a comet from the current pill and |
I missed this looking at the backlog, but noticed this after receiving the OTA:
PS: I can |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it should work
pkg/arvo/sys/vane/jael.hoon
Outdated
=? lyf.own | ||
?& =(our ship.i.udiffs) | ||
=- (public-keys:feel original-pos %diff ship.i.udiffs u.a-diff) | ||
?. ?& =(our ship.i.udiffs) | ||
?=(%keys -.u.a-diff) | ||
(~(has by jaw.own) life.to.u.a-diff) | ||
== | ||
life.to.u.a-diff | ||
(public-keys:feel original-pos %diff ship.i.udiffs u.a-diff) | ||
this-su | ||
:: if this about our keys, and we already know these, start using them | ||
:: | ||
=. lyf.own life.to.u.a-diff | ||
:: notify subscribers (ames) to start using our new private keys | ||
:: | ||
(exec yen.own [%give %private-keys [lyf jaw]:own]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? I think so, but the pattern feels weird since it puts two conflicting copies of this-su
in our subject, like as though it needs a public-keys:feel:-
to make sure we're using the right one.
I'd probably do something like:
=? this-su
?& =(our ship.i.udiffs)
?=(%keys -.u.a-diff)
(~(has by jaw.own) life.to.u.a-diff)
==
:: if this about our keys, and we already know these, start using them
::
=. lyf.own life.to.u.a-diff
:: notify subscribers (ames) to start using our new private keys
::
(exec yen.own [%give %private-keys [lyf jaw]:own])
::
(public-keys:feel original-pos %diff ship.i.udiffs u.a-diff)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I tested it with a couple of L2 ships, but agree that your suggestion looks better—I deployed it 432d967 on ~sordem
and also booted a L2 ship from a the pill and checking that communication with other ships works fine before and after switching to the new private keys.
This is built on top of #5496 using the latest snapshot. A solid pill is also included—a new pill should be pushed to
bootstrap.urbit.org
before any L2 ships are booted, otherwise they might end up in a situation where the eth-log that includes the new private key comes before the OTA that has this fix, which will make them disconnected from the network, before the fix for #5517 is applied, and a manual intervention would be needed.This also (from #5496) switches /app/azimuth to use a snapshot of the Azimuth state, instead of relying on eth-logs, which will be applied on-load, and will bring all ships of the network up to date, fixing the incomplete state found in #5518
Couple of tests performed to validate that this works:
This PR has been tested and deployed to ~roller-dozzod-dozzod and ~sordem (both online) and several L2 ships.