set chunk size to 2000 for events#61
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #61 +/- ##
========================================
Coverage 84.84% 84.84%
========================================
Files 5 5
Lines 99 99
Branches 17 26 +9
========================================
Hits 84 84
Misses 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR makes the credit-distributor’s event log fetch window configurable, so the agent can tune how many blocks it scans per RPC query when reading PaymentReceived events from source CreditStation contracts.
Changes:
- Added
agent.events_chunk_sizeto the distributor config model with a default of2000. - Documented the new option in
config.toml.example. - Wired the configured chunk size into
distribute_credits_for_source()when fetching payment events.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
credit-distributor/src/main.py |
Passes the configured chunk size into payment event retrieval. |
credit-distributor/src/configs.py |
Adds the new agent config field and default value. |
credit-distributor/config.toml.example |
Documents the new optional events_chunk_size setting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DimaStebaev
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new configuration option to control the size of block ranges used when querying event logs, and updates the codebase to use this new setting. This change allows for more flexible and efficient event fetching by making the chunk size configurable.
Configuration improvements:
events_chunk_sizeoption to the[agent]section inconfig.toml.exampleto specify the block range size for event log queries.Agentmodel inconfigs.pyto include the newevents_chunk_sizeconfiguration with a default value of 2000.Event fetching logic update:
distribute_credits_for_sourcefunction inmain.pyto pass the configurablechunk_sizeparameter when fetching payment received events, improving control over event log query performance.