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

Develop #22

Merged
merged 4 commits into from
Feb 24, 2025
Merged

Develop #22

merged 4 commits into from
Feb 24, 2025

Conversation

thang14
Copy link
Contributor

@thang14 thang14 commented Feb 24, 2025

This pull request includes several changes across multiple files, focusing on configuration updates, service initialization adjustments, and improvements to the verifier's timestamp validation logic. The most important changes are summarized below:

Configuration Updates:

  • Added DefaultChainID constant to config/default_config.go.

Service Initialization Adjustments:

  • Updated NewAccountService to use config.DefaultChainID instead of a hardcoded value in core/account/service.go.
  • Moved the initialization of the verifier in Service.Start method in core/apps/service.go [1] [2].

Verifier Improvements:

  • Removed redundant error message when failing to parse metadata in core/apps/types/types.go.
  • Simplified error handling in getUsageInfoFromDB method in core/apps/verifier/store.go.
  • Adjusted timestamp validation logic in onUsageReport method in core/apps/verifier/verifier.go to improve accuracy and readability [1] [2] [3].

- Update the timestamp validation logic in the `onUsageReport` function to use `msg.Timestamp` for checking the report time threshold.
- Ensure the validation accounts for potential client latency.
@thang14 thang14 merged commit 7bc87d0 into main Feb 24, 2025
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.

1 participant