-
Notifications
You must be signed in to change notification settings - Fork 110
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
Additional improvements for the stats RPCs #367
Comments
For #5, here's the queries we had for sqlite + postgres, we need to add a slim abstraction so we an define an interfaces and have an implementation for sqlite vs postges: sqlite
postgres:
|
The first item appears to already be resolved. I recently learned that there is a testnet universe REST server setup already which doesn't require a macaroon to access. |
I pushed up a (very) early WIP branch here: https://github.com/lightninglabs/taproot-assets/tree/asset-stats-improvements Basically it's a bit more involved than initially thought: But fortunately the whole "different queries for SQLite and Postgres" worked out pretty well. Added a commit for detecting the database backend at runtime. Also, the queries are a bit simpler as shown above as we can just use the unix timestamp directly. |
@jamaljsr in #396 I did not include |
@guggero Ah, I thought that a proof represented a transfer of an asset even after the genesis. So I expected |
Once we finish the multi-verse feature (cc @ffranr) that'll be the case. Until then, it's just the total amount of total assets created in that interval. We have an event type (rn just: new proof + new log), so we can use that to expose transfers in the future. |
Ah ok. Thanks for that clarification. |
There are currently two universe RPC methods (QueryAssetStats and UniverseStats) which return stats about the assets the node is aware of. As I am working on exposing this information in Terminal, I've discovered some improvements that could be made to improve the dev/user experience.
QueryAssetStats
can currently sort by asset id, name, and type. We also would like to be able to sort bytotal_syncs
,total_proofs
,genesis_height
QueryAssetStats
, also include the fieldsgenesis_point
andgroup_key
for each asset.QueryAssetStats
, each asset has agenesis_height
field. Would it be possible to also include the timestamp of this block so that the web app doesn't need to make N more API requests to convert the block height to a timestamp? We'd like to display the date/time of when the asset was created.timestamp
,total_assets
,total_syncs
,total_proofs
. There would be one entry for each day between the supplied dates.The text was updated successfully, but these errors were encountered: