Skip to content

adding query-gas-limit to cli#102

Merged
aniketdivekar merged 2 commits into
devfrom
add-query-gas
Dec 5, 2025
Merged

adding query-gas-limit to cli#102
aniketdivekar merged 2 commits into
devfrom
add-query-gas

Conversation

@abdulazeem-tk4vr

@abdulazeem-tk4vr abdulazeem-tk4vr commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

added as a command line argument when starting a node
https://linear.app/shm/issue/EVM-211/query-gas-limit-addition

aniketdivekar
aniketdivekar previously approved these changes Nov 14, 2025
added as a command line argument when starting a node
Adds the ability to set a query gas limit to the baseapp.
This allows for better control over resource consumption during queries.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for configuring a query gas limit through a command-line argument when starting a node. This allows operators to control the maximum gas that can be consumed during query operations.

Key Changes:

  • Added a new FlagQueryGasLimit command-line flag to the start command
  • Integrated the query gas limit configuration into the base application setup

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
server/start.go Adds the --query-gas-limit CLI flag definition with uint64 type and default value of 0
shardeumd/cmd/shardeumd/cmd/root.go Configures the baseapp with the query gas limit value from the CLI flag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/start.go
cmd.Flags().String(srvflags.Transport, "socket", "Transport protocol: socket, grpc")
cmd.Flags().String(srvflags.TraceStore, "", "Enable KVStore tracing to an output file")
cmd.Flags().String(server.FlagMinGasPrices, "", "Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 20000000000aatom)") //nolint:lll
cmd.Flags().Uint64(server.FlagQueryGasLimit, 0, "Maximum gas that can be used in a query call")

Copilot AI Nov 26, 2025

Copy link

Choose a reason for hiding this comment

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

The default value of 0 for query gas limit may be ambiguous. Consider documenting whether 0 means 'unlimited' or 'disabled' in the flag description, or consider using a more explicit default value.

Suggested change
cmd.Flags().Uint64(server.FlagQueryGasLimit, 0, "Maximum gas that can be used in a query call")
cmd.Flags().Uint64(server.FlagQueryGasLimit, 0, "Maximum gas that can be used in a query call (0 means unlimited)")

Copilot uses AI. Check for mistakes.
@aniketdivekar aniketdivekar merged commit 6adf3f6 into dev Dec 5, 2025
14 of 17 checks passed
@aniketdivekar aniketdivekar deleted the add-query-gas branch December 5, 2025 06:39
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.

6 participants