Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Constitution + jael updates #795

Merged
merged 4 commits into from
Aug 30, 2018
Merged

Constitution + jael updates #795

merged 4 commits into from
Aug 30, 2018

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Aug 30, 2018

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.

@cgyarvin
Copy link
Contributor

cgyarvin commented Aug 30, 2018 via email

@Fang-
Copy link
Member Author

Fang- commented Aug 30, 2018

Network breach headaches are dead. Long live node breach headaches!

Copy link
Member

@joemfb joemfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Fang- Fang- merged commit 15ee6ba into release-candidate Aug 30, 2018
@Fang- Fang- deleted the jael-continuity branch August 30, 2018 00:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants