Code Monkey home page Code Monkey logo

Comments (9)

tarnas14 avatar tarnas14 commented on August 9, 2024

@alex1307 @CjS77

I assume blockchain stores the information about mined coins by each node
should we assume that this information is available from backend and we can just request it?

from tari.

tarnas14 avatar tarnas14 commented on August 9, 2024

question pending about "all" and "yearly" filters
answer included in description
image

from tari.

CjS77 avatar CjS77 commented on August 9, 2024

There are 2 ways of getting "blocks mined" information:

  • By querying UTXOs that are both coinbase UTXOs and are mined / confirmed. (This gets you history)
  • By signing up for notifications. We currently only allow notifications via a shell script, but are looking into piping the events directly to the Tauri FE (This gets you live events)

from tari.

CjS77 avatar CjS77 commented on August 9, 2024

@alex1307 - We should add Tauri commands that make this a simple call. The FE should not be wrangling this data.
Bear in mind that the historical events call is somewhat expensive, so some discussion on the API would serve us well.

How often will you be requesting the full history?
Can we assume the FE caches previous calls, so we can return new changes since a given timestamp?

from tari.

tarnas14 avatar tarnas14 commented on August 9, 2024

since I don't think historical data ever changes in blockchain, it wouldn't hurt us to save the data somewhere

is it possible to make an API that would return results with daily resolution, called for specific windows, e.g. from=2022-04-01&to=2022-04-30?
FE could then save the results internally and make sure never to call for that window again (assuming the window is in the past)
and then when the user changes filters on the statistics view, and we don't have data to show to them, we would call the api for missing windows?

I don't know how the UTXO is queried and how expensive this API is, so all suggestions are welcome.

from tari.

tarnas14 avatar tarnas14 commented on August 9, 2024

@CjS77 @alex1307 do you have any new info on this?

from tari.

CjS77 avatar CjS77 commented on August 9, 2024

@alex1307 is still busy with this.

from tari.

tarnas14 avatar tarnas14 commented on August 9, 2024

ok, I'll put backend integration on hold and wait till we get any info on the interface (y)

from tari.

tarnas14 avatar tarnas14 commented on August 9, 2024

backend contract: GET method from=<Date>&to=<Date>&interval='monthly'|'yearly'|'all'

interval is optional, if not provided, data will be returned with values per day
if it is provided, it will combine data yearly -> values per month, all -> values per year

UPDATE:
frontend will listen on transaction events and store them in sqlite (after #46 implements it)

from tari.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.