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

feat: aggregator total gas paid metric #1592

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

JulianVentura
Copy link
Collaborator

Aggregator total gas paid metric

Description

This PR adds aggregator total gas paid while responding to tasks metric to the grafana dashboard.

How to test

  1. Start all services locally, including the metrics
  2. Start sending proofs
  3. Go to the "System Data" dashboard, you should see a new panel showing the total amount of ETH paid by the aggregator, right down the gas price of the last batch.
  4. Shut down the aggregator and start it over again
  5. You should see that on new batch finished, the metric will keep accumulating on previous data.

Type of change

Please delete options that are not relevant.

  • New feature
  • Bug fix
  • Optimization
  • Refactor

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

@JulianVentura JulianVentura self-assigned this Dec 6, 2024
@PatStiles
Copy link
Contributor

Ran it locally and it observed the expected behavior

core/chainio/avs_writer.go Outdated Show resolved Hide resolved
"type": "prometheus",
"uid": "prometheus"
},
"description": "Accumulated gas cost the aggregator paid for the batcher when the tx cost was higher than the respondToTaskFeeLimit.",
Copy link
Collaborator

@MarcosNicolau MarcosNicolau Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Accumulated gas cost the aggregator paid for the batcher when the tx cost was higher than the respondToTaskFeeLimit.",
"description": "Accumulated gas cost in ETH the Aggregator paid when sending RespondToTask transactions.",

Copy link
Collaborator

@MarcosNicolau MarcosNicolau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected.

@@ -21,6 +21,7 @@ type Metrics struct {
aggregatorGasCostPaidForBatcherTotal prometheus.Gauge
aggregatorNumTimesPaidForBatcher prometheus.Counter
numBumpedGasPriceForAggregatedResponse prometheus.Counter
aggregatorGasCostPaidTotal prometheus.Gauge
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a counter

metrics/metrics.go Show resolved Hide resolved
Copy link
Contributor

@uri-99 uri-99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: removed comment

@JuArce JuArce added this pull request to the merge queue Dec 10, 2024
Merged via the queue into staging with commit 010e93d Dec 10, 2024
3 checks passed
@JuArce JuArce deleted the feat/aggregator-total-gas-paid-metric branch December 10, 2024 21:29
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 this pull request may close these issues.

5 participants