Skip to content
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

Import of genesis backups fails #287

Open
shjortConcordium opened this issue May 2, 2022 · 1 comment
Open

Import of genesis backups fails #287

shjortConcordium opened this issue May 2, 2022 · 1 comment
Labels
[Prio] Low Should be fixed if time permits but can be postponed. [Type] Bug Something isn't working

Comments

@shjortConcordium
Copy link
Contributor

Bug Description
We have seen some genesis backups be rejected, because it is "incompatible with existing data". (Even against a fresh wallet)
The cause (and scope) of this should be determined and fixed.

Versions
Desktop wallet version 1.3.1

@shjortConcordium shjortConcordium added the [Type] Bug Something isn't working label May 2, 2022
@abizjak abizjak added the [Prio] Low Should be fixed if time permits but can be postponed. label May 30, 2022
@orhoj
Copy link
Contributor

orhoj commented Jun 8, 2022

This happens because the genesis exports do not contain the signatureThreshold field. When we try to insert the accounts into the database we get a constraint violation as we use an option:

useNullAsDefault: true

that means that the missing field is converted to an attempt to insert a NULL value, and we do not allow for NULL values for that field.

There are two paths:

  1. Stop using useNullAsDefault which will stop converting undefined values to NULL insertions (proper solution, as there may be other places with similar bugs that we have not encountered yet. But the impact of the change has to be analyzed and not be put in a small hotfix).
  2. Explicitly default signatureThreshold to 1 if missing in an import. The value will be updated with whatever is on-chain as soon as the user opens the account view anyway. (Quick fix to the genesis import issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Prio] Low Should be fixed if time permits but can be postponed. [Type] Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants