You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment for DB asset upgrades we have a problem. There is no proper way to distinguish between a non-ethereum asset added manually by the user and one we add ourselves.
That is since the identifier for those assets is not determnistic. (Link to issue to figure out a deterministic way for non ethereum assets).
The identifier is a uuid that is generated by the backend at asset addition.
The reasoning for this is that there is no unique combination of fields that uniquely identify an asset such as the ethereum address for ethereum tokens. And ... if an asset's name changes so should the identifier. So there is a problem there.
The way we need to address the problem right now is to allow users who have already added a non ethereum asset and have a manual balance or trade for it to replace it with a different one if we introduce the asset in the canonical DB (since that would probably also be used in the exchanges mapping).
Task
Create an api endpoint that takes 2 assets and replaces one with the other in both the global and the user DB. One asset, would be the source asset, the one the user had added on their own, and the other the target asset, the one we introduced. The asset should be replaced both in the global DB AND in all occurences of the user's DB.
Create an api endpoint that does the same, but just takes an identifier from/to and not full assets. This would be to fix a broken user database. If for example you end up having a manual trade or an asset in the user DB with an unidentified asset, you could use this endpoint to tell it to change the identifier to something new.
Expose the above in the frontend.
The text was updated successfully, but these errors were encountered:
Abstract
At the moment for DB asset upgrades we have a problem. There is no proper way to distinguish between a non-ethereum asset added manually by the user and one we add ourselves.
That is since the identifier for those assets is not determnistic. (Link to issue to figure out a deterministic way for non ethereum assets).
The identifier is a uuid that is generated by the backend at asset addition.
rotki/rotkehlchen/api/rest.py
Lines 1315 to 1347 in 88d0299
The reasoning for this is that there is no unique combination of fields that uniquely identify an asset such as the ethereum address for ethereum tokens. And ... if an asset's name changes so should the identifier. So there is a problem there.
The way we need to address the problem right now is to allow users who have already added a non ethereum asset and have a manual balance or trade for it to replace it with a different one if we introduce the asset in the canonical DB (since that would probably also be used in the exchanges mapping).
Task
The text was updated successfully, but these errors were encountered: