Qabel / qabel.github.io

:octocat: The Qabel documentation repository. The technical stuff can be found at our github.io page.
https://qabel.github.io
Other
2 stars 10 forks source link

Remove used prefix from exported identity #159

Closed roeslpa closed 7 years ago

roeslpa commented 8 years ago

Since several issues occur when attaching (account related info like) the prefix to the identity it was proposed to remove it. Instead the used prefix can easily be found by:

  1. Get the prefixes of the used account
  2. The prefix in which the name of one meta file = Hash(prefix||privKey) is the used prefix of the identity
  3. If such a prefix does not exist: create a new prefix

Any comments?

audax commented 7 years ago

Resolved by https://github.com/Qabel/qabel-core/pull/631 The prefix in the identity is now just a preference and a fallback to other prefixes of the account is implemented.

julianseeger commented 7 years ago

FTR.: the algorithm proposed by @roeslpa is contained:

If we take the default exception- and misuesfree usecase, the first two options take the same account. The "main prefix" should have been chosen by exactly that algorithm and if the identity is not broken, the second option will either contain that prefix or none (and thus default to the first one from the server containing the (index) meta file.

While looking at this, the forth option sounds like it could become problematic and could lead to prefixes used multiple times ... and break as soon as some FSCK is implemented ... we should check that pre https://github.com/Qabel/qabel-core/issues/636