Skip to content

Add tx_volume across all layers#1199

Merged
ptrus merged 1 commit intomainfrom
ptrus/feature/stats-tx-volume
Nov 12, 2025
Merged

Add tx_volume across all layers#1199
ptrus merged 1 commit intomainfrom
ptrus/feature/stats-tx-volume

Conversation

@ptrus
Copy link
Member

@ptrus ptrus commented Nov 12, 2025

Fixes: #1190

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for querying transaction volume across all layers by introducing a new endpoint /v1/stats/tx_volume that aggregates tx_volume data from all layers, as opposed to the existing per-layer endpoint.

Key changes:

  • Added new API endpoint /stats/tx_volume that returns aggregated transaction volume across all layers
  • Modified SQL queries to support NULL layer parameter for aggregating across all layers using SUM and GROUP BY
  • Updated the TxVolumes function signature to accept a nullable layer parameter

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
api/spec/v1.yaml Added new /stats/tx_volume endpoint specification
api/v1/strict_server.go Implemented handler for the new endpoint and updated existing handler to pass layer as pointer
storage/client/client.go Modified TxVolumes function to accept nullable layer parameter
storage/client/queries/queries.go Updated SQL queries to support NULL layer parameter with aggregation logic
tests/e2e_regression/common_test_cases.sh Added test case for new endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ptrus ptrus force-pushed the ptrus/feature/stats-tx-volume branch from 1ba43c6 to 8c065f5 Compare November 12, 2025 18:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ptrus ptrus disabled auto-merge November 12, 2025 18:36
@ptrus ptrus merged commit a61e241 into main Nov 12, 2025
26 checks passed
@ptrus ptrus deleted the ptrus/feature/stats-tx-volume branch November 12, 2025 18:36
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.

Create global stats/tx_volume endpoint

2 participants