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

Report Hydra head transaction history when closing head. #1467

Open
StakeWithPride opened this issue Jun 5, 2024 · 4 comments
Open

Report Hydra head transaction history when closing head. #1467

StakeWithPride opened this issue Jun 5, 2024 · 4 comments
Labels
💭 idea An idea or feature request

Comments

@StakeWithPride
Copy link

Why

Provide developers the ability to capture rich telemetry.

What

The original idea was to be able to track TPS by self-reporting the count of transactions and the period over which they occurred.

There are probably other use cases and applications that developers will want so probably best we keep reporting malleable. Should reporting be optional? Is an honor system used be having only one party report or is the metric signed by all parties? What else should we be discussing?

How

The ask is to start a discussion about what sort of transaction history could be reported upon closing the head.

@StakeWithPride StakeWithPride added the 💭 idea An idea or feature request label Jun 5, 2024
@v0d1ch
Copy link
Contributor

v0d1ch commented Jun 7, 2024

I think Hydra node logs could provide the metrics you are looking for already? Upon each valid transaction we output TxValid message so one could compute some metrics by looking at the start time, end time and all occurrences of TxValid. We can, of course, do more but I would say let's talk about the specific use-case you had in mind first and see if we actually need to do anything or the information hydra-node provides is already enough? TPS is not really a good metric but one that keeps popping back to us :)

@StakeWithPride
Copy link
Author

Hydra node logs could provide the metrics

This feature request is to provide standardization around posting these metrics publicly on-chain in an efficient manner. Substantial work will be performed within Hydra and publishing a summary would permit dashboards to highlight the success of Hydra beyond number of instantiations.

TPS is not really a good metric

Agreed. Was simply using it for illustration purposes. Hopefully this discussion with folks more familiar with Hydra can suggest other meaningful metrics that could be of interest and provide a generic enough function to meet current and future metric ideas.

Sebastian and Arnaud indicated in Discord this would be a good thread to initiate on GH so with their enthusiasm I created this

@ch1bo
Copy link
Collaborator

ch1bo commented Jun 14, 2024

Thanks for sharing this idea @StakeWithPride

FWIW there is already a basic prometheus monitor in place. Right now it allows to consume transaction confirmation times and number of txs IIRC. See https://hydra.family/head-protocol/docs/how-to/operating-hydra#monitoring for details.

With #183 we thought it might be good to adopt the open-telemetry approach which sounds a lot the standardization you would be interested as well.

What is new, is the idea of putting aggregated metrics on chain. Why would we want to do this?

I would love to see this or #183 progress as I think the metrics story is not very good with hydra right now. Is there something we can learn from the cardano-node and maybe provide similar transaction-based metrics - is there something standardized for Cardano (L1) even?

@StakeWithPride
Copy link
Author

What is new, is the idea of putting aggregated metrics on chain. Why would we want to do this?

For me, mainly to enable representing the work done off-chain by Hydra. e.g. TPS reports

Imagine adding up all the work produced by state-channels, ZK, L2s, partnerchains, etc.

Here's an example of such a request: https://x.com/oravecpeter/status/1825282864382136569

I suspect other similar requests and new use cases will surface.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 idea An idea or feature request
Projects
None yet
Development

No branches or pull requests

3 participants