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

Let user re-link and re-order their contextids #112

Closed
adamstallard opened this issue Jul 25, 2020 · 3 comments
Closed

Let user re-link and re-order their contextids #112

adamstallard opened this issue Jul 25, 2020 · 3 comments
Assignees
Projects

Comments

@adamstallard
Copy link
Member

If a user re-links a contexid that was used before, but only by them, it should be allowed. It should update the timestamp on that contextid and bring it to the front of the array returned by /verifications; unique should be true for that contextid.

@abramsymons
Copy link
Collaborator

We are allowing to link the last contextId again now.
But allowing to use old ones will cause loops in history for the contract implement to publish verifications onchain, so apps can not traverse history to find all the ids used by the user.

@adamstallard
Copy link
Member Author

adamstallard commented Aug 29, 2020

We are allowing to link the last contextId again now.
But allowing to use old ones will cause loops in history for the contract implement to publish verifications onchain, so apps can not traverse history to find all the ids used by the user.

At first I thought this should be fixed in the smart contract, but really the smart contract is rebuilding the whole history each time from the array that is passed in--see https://github.com/BrightID/BrightID-SmartContract/blob/d3254dc32851b0e91722b79e4a602efd05de562a/v4/BrightID.sol#L37-L42 , so if a node can insure that the address array doesn't have duplicates, there will be no cycles.

It sounds like you found a good solution by just updating the timestamp to be the newest so it will be the first in the array.

@abramsymons
Copy link
Collaborator

resolved by:
b80ec55

Everything automation moved this from Backlog to Complete Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Everything
  
Complete
Development

No branches or pull requests

3 participants