Skip to content

feat(listener): make blockchain event batch size configurable (#627) - #668

Merged
Abd-Standard merged 2 commits into
Core-Foundry:mainfrom
Abdullahi-Code9:feature/configurable-event-batch-size
Sep 1, 2026
Merged

feat(listener): make blockchain event batch size configurable (#627)#668
Abd-Standard merged 2 commits into
Core-Foundry:mainfrom
Abdullahi-Code9:feature/configurable-event-batch-size

Conversation

@Abdullahi-Code9

Copy link
Copy Markdown
Contributor

Summary

Resolves #627 by adding operator configuration for the number of blockchain events fetched per polling cycle (EVENT_BATCH_SIZE), replacing hardcoded event query limits while maintaining backwards compatibility and default behavior.


Key Changes

  • Configurable Batch Size: Introduced EVENT_BATCH_SIZE environment variable defaulting to 100.
  • Input Validation: Added validation in validateConfig to ensure eventBatchSize is a positive integer (>= 1), rejecting invalid/negative values.
  • RPC Query Update: Configured EventSubscriber to pass config.eventBatchSize to Stellar RPC getEvents requests.
  • Documentation & Testing: Added unit tests in config.test.ts and event-subscriber.test.ts, and documented the new variable in .env.example and ENVIRONMENT_VARIABLES_AND_SECRETS.md.

Acceptance Criteria Checklist

  • Batch size is configurable via EVENT_BATCH_SIZE.
  • Documented default (100) is provided in .env.example and documentation.
  • Invalid values (0, negative numbers, non-integers) are rejected during config validation.
  • Existing polling behavior remains unchanged when using the default batch size.

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Abdullahi-Code9 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Abd-Standard
Abd-Standard merged commit b5c7d7f into Core-Foundry:main Sep 1, 2026
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.

Make Blockchain Event Batch Size Configurable

2 participants