desmos-labs / athena Goto Github PK
View Code? Open in Web Editor NEWA custom chain parser for the Desmos Network chains
License: MIT License
A custom chain parser for the Desmos Network chains
License: MIT License
One the Dtag is transferred bdjuno does not update the previous owner with the new Dtag.
https://explorer.desmos.network/accounts/desmos1a5v9a94edq686aesyf4ufrdedwjpn8jflv4mwc
https://explorer.desmos.network/accounts/desmos12jhz5njn5tz0yymr0amtynnzdq6ne3n0aucc4w
both accounts are listing as the owner of blastoise but in reality desmos12jhz5njn5tz0yymr0amtynnzdq6ne3n0aucc4w owns charizard
user-1
user-2
user-1
make profileuser-2
request user-1
profileuser-1
accept transfer and creates a new dtagThe DTag of both profiles should be updated properly
Currently DJuno stores the chain links by unique (desmos_address, external_address)
. However Desmos supports different chains with the same external address properly. So it can happen that we have multiple chains with different names but the same external address (eg. LikeCoin and Cosmos). Currently this is impossible inside DJuno and those links are not stored properly.
The second link will not be stored since a link with address A already exists
The links should be stored properly even if the external addresses are the same
When handling a MsgSaveProfile
transaction the parser should ignore the attributes with value [do-not-modify]
as the blockchain does. However, at the moment, it updates always regardless the [do-not-modify]
value.
This might be the problem:
https://github.com/desmos-labs/djuno/blob/0c7aa97f8e144e238ebb32ec55ccdb51c0f786b4/x/profiles/handle_msg.go#L122-L129
Once that Desmos v0.10.0
is tagged, we need to make sure we are compatible with the changes implemented
Since the next version of Desmos is going to be based on Cosmos v0.40 (codename Stargate), we need to:
We need to update the messages and all the other necessary things to be compatible with the upcoming Desmos v0.8.0 release
Some queries to the djuno database are creating heavy load on the DB server. They seem to be running constantly - as soon as they complete, another instance is immediately started. Is it possible to do any optimisation/caching to make these quicker or less frequent?
SELECT
"_subs"."result_id",
"_fld_resp"."root" AS "result"
FROM
UNNEST(($1) :: uuid [ ], ($2) :: json [ ]) AS "_subs"("result_id", "result_vars")
LEFT OUTER JOIN LATERAL (
SELECT
json_build_object($3, "profile"."root") AS "root"
FROM
(
SELECT
coalesce(json_agg("root"), $4) AS "root"
FROM
(
SELECT
row_to_json(
(
SELECT
"_5_e"
FROM
(
SELECT
"_4_root.ar.root.application_links"."application_links" AS "application_links",
$5 AS "__typename"
) AS "_5_e"
)
) AS "root"
FROM
(
SELECT
*
FROM
"public"."profile"
WHERE
(
("public"."profile"."dtag") ILIKE ((("_subs"."result_vars" # > > ARRAY [ $6, $7 ])) :: text)
)
) AS "_0_root.base"
LEFT OUTER JOIN LATERAL (
SELECT
coalesce(json_agg("application_links"), $8) AS "application_links"
FROM
(
SELECT
row_to_json(
(
SELECT
"_2_e"
FROM
(
SELECT
"_1_root.ar.root.application_links.base"."application" AS "application",
"_1_root.ar.root.application_links.base"."username" AS "username",
"_1_root.ar.root.application_links.base"."state" AS "state",
$9 AS "__typename"
) AS "_2_e"
)
) AS "application_links"
FROM
(
SELECT
*
FROM
"public"."application_link"
WHERE
(("_0_root.base"."address") = ("user_address"))
) AS "_1_root.ar.root.application_links.base"
) AS "_3_root.ar.root.application_links"
) AS "_4_root.ar.root.application_links" ON ($10)
) AS "_6_root"
) AS "profile"
) AS "_fld_resp" ON ($11)
SELECT
"_subs"."result_id",
"_fld_resp"."root" AS "result"
FROM
UNNEST(($1) :: uuid [ ], ($2) :: json [ ]) AS "_subs"("result_id", "result_vars")
LEFT OUTER JOIN LATERAL (
SELECT
json_build_object($3, "chain_link"."root") AS "root"
FROM
(
SELECT
coalesce(json_agg("root"), $4) AS "root"
FROM
(
SELECT
row_to_json(
(
SELECT
"_4_e"
FROM
(
SELECT
"_0_root.base"."external_address" AS "external_address",
"_0_root.base"."user_address" AS "user_address",
"_0_root.base"."creation_time" AS "creation_time",
"_3_root.or.chain_config"."chain_config" AS "chain_config",
$5 AS "__typename"
) AS "_4_e"
)
) AS "root"
FROM
(
SELECT
*
FROM
"public"."chain_link"
WHERE
(
("public"."chain_link"."user_address") = ((("_subs"."result_vars" # > > ARRAY [ $6, $7 ])) :: text)
)
) AS "_0_root.base"
LEFT OUTER JOIN LATERAL (
SELECT
row_to_json(
(
SELECT
"_2_e"
FROM
(
SELECT
"_1_root.or.chain_config.base"."name" AS "name",
$8 AS "__typename"
) AS "_2_e"
)
) AS "chain_config"
FROM
(
SELECT
*
FROM
"public"."chain_link_chain_config"
WHERE
(("_0_root.base"."chain_config_id") = ("id"))
) AS "_1_root.or.chain_config.base"
) AS "_3_root.or.chain_config" ON ($9)
) AS "_5_root"
) AS "chain_link"
) AS "_fld_resp" ON ($10)
Queries execute quicker or less frequently
After sending a MsgUnlinkApplication djuno doesn’t delete the Application link.
I tried to unlink my Twitch account and the chain deleted correctly the record ( LCD response ), but when I query Hasura with :
profile(where: {dtag: {_ilike: "luca"}}) {
application_links {
application
username
}
}
I still get the Twitch link in the response:
...
},
{
"application": "twitch",
"username": "lucag__"
},
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.