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

Add total mint transaction count and metalabels count per epoch #124

Open
rdlrt opened this issue Nov 2, 2022 · 5 comments
Open

Add total mint transaction count and metalabels count per epoch #124

rdlrt opened this issue Nov 2, 2022 · 5 comments
Assignees
Milestone

Comments

@rdlrt
Copy link
Contributor

rdlrt commented Nov 2, 2022

Currently there isnt a way to monitor total mint transactions per epoch.
The request here is:

  • Create a cache table that contains epoch_no, distinct metalabel keys for that epoch, count of mint transactions for that epoch against each metalabel key
  • Expose this data via a new RPC endpoint
@rdlrt rdlrt moved this to Next Up in Koios Project Nov 2, 2022
@rdlrt rdlrt added this to the Koios vNext milestone Nov 2, 2022
@rdlrt rdlrt changed the title Add total mint transaction count to /epoch_info (via cache) Add total mint transaction count and metalabels count per epoch Nov 2, 2022
@rdlrt
Copy link
Contributor Author

rdlrt commented Nov 3, 2022

Needs a bit of consideration for cache table design - as there are different type of counts that'd be needed for cache (sample columns from @edridudi ):

Epoch, NFTs count, FTs Count, medianfts (cip25) (721), Royalty Tokens (cip27) (777), etc
Above columns can go as RPC

Cache - Could instead be:
epoch_no, asset_id, minted, burnt, type

@edridudi
Copy link
Contributor

edridudi commented Nov 3, 2022

Query rules for the different columns:

For NFT count:
sum(multi_assets.quantity)=1

For FT count:
sum(multi_assets.quantity)<>1

For media NFT count:
sum(quantity)=1 and metalabel.key = 721

(I wonder if we actually need to dive into each mint tx metadata and verify it according to cip-25 mandatory fields)

For Royalty Tokens count:
In cip-27 it was decided by the community that the royalty token is valid only if it is the first minted asset in a specific policy.
If it is burned afterwards it's still count as valid.

So... It makes things a lil bit more complex ☺️

So db query should be like
metalabel.key = 777 And count only if its first asset in a policy

Here we should count once only if the rules apply.

(Same as above, should we verify the existence of "address" and "rate" fields in the tx metadata according to cip-27?)

@Scitz0
Copy link
Contributor

Scitz0 commented Nov 17, 2022

2nd asset cache table should include the following fields:
asset_id, total_supply, first_mint_tx_id, first_mint_keys, last_mint_tx_id, last_mint_keys, decimals

Also, need to ensure that all asset-related endpoints are accordingly updated as well to include asset type and decimals

@Scitz0
Copy link
Contributor

Scitz0 commented Nov 27, 2022

@edridudi
I have spent time this weekend looking into the cache tables discussed for this. To be able to provide missing data as you suggested. Though I have run into a a few road forks and I'm currently unsure what data is actually needed.

Would you be willing to jump onto our bi-weekly call on Thursday at 22 UTC to discuss this further?

@edridudi
Copy link
Contributor

Hey @Scitz0 ,
It would be midnight where I'm at but yeah I will make an effort.
Just if you can, send me an invite to the meeting so I will have a reminder.
The main idea is to have the ability to overview the Cardano Ledger over time (per epoch).
for starters, it could be assets minted but really it can be a lot of things such as the number of Transactions per epoch or new Policies per epoch/new Accounts per epoch ...

I know that it might be a lil bit complex but it's just a suggestion to have something no other API has.

@rdlrt rdlrt moved this from Next Up to In Progress in Koios Project Dec 22, 2022
@rdlrt rdlrt moved this from In Progress to Testing in Koios Project Dec 29, 2022
@rdlrt rdlrt moved this from Testing to In Progress in Koios Project Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

3 participants