Skip to content

Lower MaxResultsPerQuery to 250 so getWorkflowListByDON fits under RPC gas caps - #24229

Merged
patrickhuie19 merged 1 commit into
developfrom
update-MaxResultsPerQuery
Nov 18, 2026
Merged

patrickhuie19 merged 1 commit into
developfrom
update-MaxResultsPerQuery

Conversation

@george-dorin

Copy link
Copy Markdown
Contributor

No description provided.

@george-dorin
george-dorin requested a review from a team as a code owner November 18, 2026 17:21
@github-actions

Copy link
Copy Markdown
Contributor

👋 george-dorin, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

// getWorkflowListByDON costs roughly 50k gas per returned workflow, so the page size must keep a
// single eth_call well under the RPC node's gas cap (commonly 16,777,216). At 1,000 the call needs
// >30M gas once ~600 workflows are indexed and is rejected outright; 250 keeps a page around 12.5M.
MaxResultsPerQuery = int64(250)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding it isn't the right solution.
We at the least need to change it to a cresetting. But also need to write code to smartly reduce it if gas errors are seen

@justinkaseman
justinkaseman dismissed prashantkumar1982’s stale review November 18, 2026 22:07

We are going with hardcoded to get a fix out immediately. The more robust fix can come after being tested thoroughly.

@patrickhuie19
patrickhuie19 added this pull request to the merge queue Nov 18, 2026
Merged via the queue into develop with commit 31bc3d9 Nov 18, 2026
322 of 326 checks passed
@patrickhuie19
patrickhuie19 deleted the update-MaxResultsPerQuery branch November 18, 2026 22:22
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.

4 participants