adding query-gas-limit to cli#102
Merged
Merged
Conversation
aniketdivekar
previously approved these changes
Nov 14, 2025
urnotsam
approved these changes
Nov 20, 2025
added as a command line argument when starting a node
75a7527 to
e3838f3
Compare
Adds the ability to set a query gas limit to the baseapp. This allows for better control over resource consumption during queries.
There was a problem hiding this comment.
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
FlagQueryGasLimitcommand-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.
| 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") |
There was a problem hiding this comment.
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)") |
devendra-shardeum
approved these changes
Nov 26, 2025
jintukumardas
approved these changes
Nov 26, 2025
aniketdivekar
approved these changes
Nov 26, 2025
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
added as a command line argument when starting a node
https://linear.app/shm/issue/EVM-211/query-gas-limit-addition