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

Move asset CEX mapping to the asset entries in the global DB #2698

Closed
LefterisJP opened this issue Apr 8, 2021 · 0 comments · Fixed by #7600 or #7608
Closed

Move asset CEX mapping to the asset entries in the global DB #2698

LefterisJP opened this issue Apr 8, 2021 · 0 comments · Fixed by #7600 or #7608
Assignees
Milestone

Comments

@LefterisJP
Copy link
Member

LefterisJP commented Apr 8, 2021

Problem Definition

All the location (CEX) mapppings of assets to identifier per location are in huge hard coded mappings which end up in memory. We need a better solution that is only used when needed and is editable by the user.

Task

New table

Create a new table in the global DB for location asset mappings. Something like:

CREATE TABLE IF NOT EXISTS location_asset_mappings (
    location TEXT NOT NULL,
    value TEXT NOT NULL
    target_asset TEXT NOT NULL COLLATE NOCASE,
    FOREIGN KEY(target_asset) REFERENCES assets(identifier) ON UPDATE CASCADE ON DELETE CASCADE,
    PRIMARY KEY (location, value)
);

Move mappings

Move all mappings from memory into that table

Create API endpoints

The user should be able to view, add and edit those mappings. So that we don't need to "fix" mappings by making new releases, but just asking the user to add it to the mapping.

Allow pulling of remote data

These mappings should also be added to our remote data pulling mechanism. So if we push an update of the mappings it's updated for all clients. Our choices should override users as there should be only one source of truth.

@LefterisJP LefterisJP added this to the v1.17.0 milestone Apr 8, 2021
@LefterisJP LefterisJP modified the milestones: v1.17.0, v1.18.0 May 20, 2021
@LefterisJP LefterisJP modified the milestones: v1.18.0, v1.21.0 Jun 17, 2021
@LefterisJP LefterisJP modified the milestones: v1.21.0, v1.25.0 Sep 29, 2021
@LefterisJP LefterisJP modified the milestones: v1.25.0, v1.26.0 Jul 15, 2022
@LefterisJP LefterisJP modified the milestones: v1.26.0, v1.31.0 Oct 24, 2022
@LefterisJP LefterisJP modified the milestones: 1.31.0, 1.32.0 Nov 25, 2023
@LefterisJP LefterisJP modified the milestones: 1.32.0, 1.33.0 Feb 16, 2024
@LefterisJP LefterisJP assigned LefterisJP and unassigned LefterisJP Feb 17, 2024
@OjusWiZard OjusWiZard self-assigned this Feb 20, 2024
@lukicenturi lukicenturi self-assigned this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants