This repository has been archived by the owner on Aug 14, 2019. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains two sets of changes.
First, it updates the zuse-constitution and jael logic to work more cleanly with the current version of the contracts. Aside from a few tweaks, I did a quick look-over of the existing logic, and it all still seems to match the contracts.
Secondly, it makes jael track continuity... sort of. When a ship indicates a continuity breach on-chain (or we've just never met it before), its
live
aka continuity flag will get set to|
. It is then up to @joemfb's modified ames to send a%meet
task to jael when we finally manage to connect with that ship again, setting the flag to&
.Changes to this flag get sent as part of the existing
%pubs
subscription, which has been updated to always send full public key state for a ship (now[live=? life=life pubs=(map life pass)]
) rather than just the changes....That continuity flag is stored as part of jael's
state-relative
, even though it really is absolute state (ie can't be deduced from other parts of the state). It would be more correct to store a list of[ship life]
s we've "met" alongside the Ethereum event logs, but that also feels a bit janky.For now, I feel like this slight architectural mismatch isn't a big deal. This particular piece of state might need more work in the near future, I'd rather wait for the dust to settle before refactoring this.
I have lightly tested this and expect it to be correct based on that. No stress-testing was done though, but the logic here isn't too fragile.