Skip to content

feat: allow configuring the block batch size for contract subscriptions #881

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

arcoraven
Copy link
Contributor

@arcoraven arcoraven commented Apr 24, 2025

Exposes an env var to configure larger batch sizes for contract subscription jobs. This is useful to reduce the amount of RPC calls and DB writes, at the expense of higher delay for jobs to capture events/receipts.


PR-Codex overview

This PR focuses on improving the handling of contract subscriptions by optimizing the deletion process and introducing configuration for block querying.

Detailed summary

  • Simplified the deleteContractSubscription call in remove-contract-subscription.ts.
  • Added CONTRACT_SUBSCRIPTION_BLOCK_RANGE to env.ts for configuring block queries.
  • Updated createScheduleSeconds in chain-indexer-registry.ts to use CONTRACT_SUBSCRIPTION_BLOCK_RANGE for scheduling.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

zeet-co bot commented Apr 24, 2025

We're building your pull request over on Zeet.
Click me for more info about your build and deployment.
Once built, this branch can be tested at: https://tw-unreal-demo-engine-vwn0-ph-con-97238c.engine-aws-usw2.zeet.app before merging 😉

@arcoraven arcoraven changed the title feat: allow configuring the block batch size for contract subcriptions feat: allow configuring the block batch size for contract subscriptions Apr 24, 2025
@arcoraven arcoraven merged commit b8422ea into main Apr 24, 2025
4 of 6 checks passed
@arcoraven arcoraven deleted the ph/configurable-block-range-contract-subscription branch April 24, 2025 12:43
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.

3 participants