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

Payer Reports publishing #514

Open
fbac opened this issue Feb 19, 2025 · 0 comments
Open

Payer Reports publishing #514

fbac opened this issue Feb 19, 2025 · 0 comments
Assignees
Labels
payer Items related to the payer service

Comments

@fbac
Copy link
Collaborator

fbac commented Feb 19, 2025

Each node in the system publishes a PayerReport to the Rewards, containing the messages originated in it.

@fbac fbac added the payer Items related to the payer service label Feb 19, 2025
@fbac fbac changed the title Payer reports publishing Payer Reports publishing Feb 19, 2025
@fbac fbac moved this to Todo in Decentralization Feb 19, 2025
@neekolas neekolas added this to the Payer report creation milestone Feb 21, 2025
@neekolas neekolas self-assigned this Mar 18, 2025
neekolas added a commit that referenced this issue Mar 26, 2025
## tl;dr

- Defines structs for the off chain representation of Payer Reports
- Actually generates Payer Reports
- Alters the `unsettled_usage` table to keep track of the last known sequence ID for each originator/payer combo in a given minute. This makes it cheap to look up when generating a Payer Report

## Notes

### Minimum Report Size

- To generate a Payer Report you need a minimum of two messages, originated in two distinct minutes. This resolves #645

## Tickets

Implements part of #514

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced new queries to aggregate spending data and retrieve envelope details, enhancing data reporting.
  - Added a comprehensive mechanism for generating and verifying payer reports, improving overall reporting accuracy.
  - Improved envelope creation by integrating timestamp support for more precise data handling.
  - Added new queries for enhanced data retrieval capabilities, including payer reports and gateway envelope details.
  - Introduced a new field for tracking last sequence IDs in unsettled usage records, enhancing data integrity.

- **Bug Fixes**
  - Adjusted existing queries to return additional data fields, ensuring accurate reporting.

- **Tests**
  - Expanded test coverage to validate various report generation scenarios, ensuring reliable performance.
  - Added tests for handling out-of-order sequence IDs during database operations, improving robustness.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
payer Items related to the payer service
Projects
Status: Todo
Development

No branches or pull requests

2 participants