Repository navigation
Fix: Migration - never lose the 1.x identity on a transient failure. - #288
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refs #284
Summary
Hardens the 1.x -> 2.0 identity carry-over (#284). Losing the 1.x agent key
is permanent: membrane proofs name the agent, so a new key locks the user out
of every private conversation they did not create.
Rule
A new agent only when there is no 1.x identity, or lair is confirmed not to
hold its key. Everything else is an error: dialog, app closes, next launch
retries.
"Confirmed missing" = lair signs with its device key, and the 1.x key fails
with exactly the error a random key gets, which must be lair's own
"Query returned no rows". (The device key is served from lair's memory
cache, so a broken database would otherwise make every other key fail alike.)
Changes
agent_to_install_under: the rule above; the install fallback to a newagent is gone.
carry_keystore_forwardreturns errors; on error the Holochain plugin isnot registered, so no empty keystore is created in
holochain/2.rewrite_lair_configusesLairServerConfigInner(fixes the socket pathstaying in
holochain/1on macOS).holochain/2is0700; symlinked directories are followed.ensure_app_enabled: re-enables an app left disabled by an interruptedfirst start or coordinator update (pre-existing bug).
report_setup_failure: error dialog instead of a panic or a silent exit.Tests
cargo test --features holochain_bundled --lib: 23 pass, including:signing as its agent in lair 0.7.1;
Not covered by unit tests: the dialog and
ensure_app_enabled. To bechecked in the #275 two-device run (1.0.5 -> this build).
Known limit
If lair cannot open the carried keystore at all, the app shows the error on
every start. There is deliberately no automatic new identity; support can
move
holochain/2aside.TODO: