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
howardtw
changed the title
An asset is not recorded in the Horizon DB if all of the holders are set to UNAUTHORZIED or AUTHORIZED_TO_MAINTAIN_LIABILITIES
Response from assets endpoint doesn't include assets whose holders are UNAUTHORZIED or AUTHORIZED_TO_MAINTAIN_LIABILITIES
Nov 20, 2020
@tamirms after some further experiments, I think they are recorded in the Horizon DB, but the endpoint just simply doesn't count the assets in the accounts where the authorization flag is set to either UNAUTHORZIED or AUTHORIZED_TO_MAINTAIN_LIABILITIES.
Example:
I issued 150 XXX from GBHNRQGRM2QJU5PGEILXDXOOWNQ7NCUOQJOIBXQR5TQ4UUPRNCHUN6B7 to GCPEONTZCDJ4WN2HMMN7QSHNACKTIMUVILCX4BTSFZ2RBBLC3HKUJ2AH and 50 XXX from GBHNRQGRM2QJU5PGEILXDXOOWNQ7NCUOQJOIBXQR5TQ4UUPRNCHUN6B7 to GBT2R5M7YOW2AQUAUJFMPWITVCFJJ2EYHFPBYTTVDVDJWJVQR3U42VYV.
I can see the assets endpoint returns 150 with num_accounts being 1 when the authorization flag is set to authorized in GBHNRQGRM2QJU5PGEILXDXOOWNQ7NCUOQJOIBXQR5TQ4UUPRNCHUN6B7. And when I used allow_trust to authorize GBT2R5M7YOW2AQUAUJFMPWITVCFJJ2EYHFPBYTTVDVDJWJVQR3U42VYV, the result became 200 with num_accounts being 2.
If there is 1 AUTHORIZED trustline, then the asset will be in the horizon database. Let's say in the next ledger, the trustline is revoked, at that point because there are no trustlines for that asset the asset is removed from the horizon db.
What version are you using?
This is the current Horizon behavior as of the issue opened date with the latest commit sha being it
What did you do?
Someone issued 100 OOO tokens from GAWAYMF36WZTCPOTNDM5M7DBQTFAJZCQYAPPV2THVEDXIBS2MB3RWZIA to GDDCNH4CJ5UP56VLV6AANKAII6V3CU3FRURCWWO2CAYMIT5Q5YFCXLWI, but that person cannot see the asset through the assets endpoint with either the asset issuer or the asset code.
What did you expect to see?
I expected to see the assets is included in the response of the assets endpoint regardless asset holders' authorization state.
What did you see instead?
Nothing is returned in the response.
The text was updated successfully, but these errors were encountered: