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

Tracking Issue - Analytics #15

Closed
23 of 27 tasks
grtlr opened this issue Apr 4, 2022 · 6 comments · Fixed by #560
Closed
23 of 27 tasks

Tracking Issue - Analytics #15

grtlr opened this issue Apr 4, 2022 · 6 comments · Fixed by #560
Assignees

Comments

@grtlr
Copy link
Contributor

grtlr commented Apr 4, 2022

There are several statistics that can help us better understand how a network is used. The following analytic endpoints should be supported by Chronicle:

The activity analytics should be implemented for set time intervals of 24h, 7d, 30d, and 90d.

In addition to these required statistics @Alexandcoats has some more brainstorming ideas below, which we could tackle afterwards.

Here is what the endpoints will look like:

Activity

  • /activity ?startIndex & endIndex
    • /blocks (total count)
      • /transaction
      • /tagged-data
      • /milestone
      • /treasury-transaction
    • /outputs (total count/amount created
      • /alias
      • /basic
      • /nft
      • /foundry
      • /storage-deposit
    • /base-tokens (use ledger update table)
    • /native-tokens (use ledger update table)
    • /nfts (use ledger update table)

Ledger Status

  • /ledger ?ledger_index (total count unspent)
    • /storage-deposit (byte cost at ledger index)
    • /nfts (count of the number of unspent nft ouputs)
    • /native-tokens (count of the number of unspent foundry outputs)
@DaughterOfMars
Copy link
Collaborator

DaughterOfMars commented Apr 4, 2022

Some requirements:

Granularity

  • Daily
  • Weekly?
  • Monthly?

Messages

  • Total
  • Average per second

Transactions

  • Total
  • Average per second
  • Included count
  • Conflicting count?
  • Transferred tokens

Outputs

  • Average per address
  • Max per address

Addresses

  • Total unique used
  • Unique sending
  • Unique Receiving

grtlr added a commit that referenced this issue May 9, 2022
* 🚧 Still work in progress

* 🚧 More WIP

* Finished the remaining DTOs for you (#14)

* Complete DTOs

* Implement DTO types into API

* Update src/dto/output/unlock_condition/mod.rs

Co-authored-by: Jochen Görtler <[email protected]>

* Bug fixes (#15)

* Complete DTOs

* Implement DTO types into API

* Update src/dto/output/unlock_condition/mod.rs

* Fix a bug when inserting metadata, and cache successful selects in solidifier to avoid many requests

Co-authored-by: Jochen Görtler <[email protected]>

* Add `Ed25519Address`

* Rename to `stringify`

* Move `LedgerInclusionState` and add `ConflictReason`

* Fix docs

* Bring branch up to main (#16)

* chore!: remove `Archiver` (#125)

Creating archive files is performed by Hornet.

* fix!: improve compliance with core API spec (#116)

* Fix

* Format

* Doc comment

* Add TODO for missing comments

Co-authored-by: Alexandcoats <[email protected]>
@grtlr grtlr added this to the v0.2.0 milestone Jun 14, 2022
@grtlr grtlr modified the milestones: v0.2.0, v0.1.0 Jun 21, 2022
@grtlr grtlr changed the title Provide (optional) endpoints for online analytics Tracking Issue - Analytics Jun 21, 2022
@grtlr grtlr modified the milestones: v0.1.0, v0.2.0 Jun 22, 2022
@grtlr grtlr self-assigned this Jun 22, 2022
@grtlr grtlr pinned this issue Jul 13, 2022
@grtlr grtlr assigned DaughterOfMars and unassigned grtlr Jul 27, 2022
@dharam0034
Copy link

hello, i think It would be nice to have a feature to see the "value" activity on tangle (i.e. the number of blocks that contain transaction payloads within a given time period only, excluding other message type of Milestone, Indexed and No payload).

I think "value" TPS (or per day/week) is one of the important metrics from tokenomics point of view.

@DaughterOfMars
Copy link
Collaborator

This information is already (almost) provided by the proposed API, indirectly, as transactions per second/day/week can be calculated easily using the time period given to the API and the total count. However, this does not work if you do not send a start or end time. We could either:

  1. Provide the time range in the endpoint response.
  2. Directly calculate those values (perhaps based on query params?)
  3. Leave the endpoint as-is, so that it is only possible to calculate these values when providing both start and end time.

@grtlr
Copy link
Contributor Author

grtlr commented Jul 28, 2022

In general it might be cool to have a payload analytics endpoint that counts the number of different payloads during an interval.

@dharam0034
Copy link

dharam0034 commented Jul 28, 2022

if query params are 1) time range & 2) payload type
and if the response of query contains the "timestamp of transactions" instead of count

then that's exactly what would be needed to make a chart like ...
image

@grtlr
Copy link
Contributor Author

grtlr commented Jul 29, 2022

Thanks for the feedback @dharam0034! We will provide block level statistics that can be used to generate such a graph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants