Skip to content
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

feat: add flag to enable or disable heavy queries #258

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

forcodedancing
Copy link
Collaborator

@forcodedancing forcodedancing commented Jul 28, 2023

Description

This pr will add a flag enable-unsafe-query to enable/disable heavy or unsafe queries.

Rationale

Some queries are very heavy, we should have a flag to enable or disable such queries.

Example

enable-unsafe-query = "true"

Changes

Notable changes:

  • new flag

server/start.go Outdated
@@ -186,6 +188,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled.
cmd.Flags().Uint(FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks")
cmd.Flags().Uint64(FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks")
cmd.Flags().String(FlagEventing, sdk.EventingOptionEverything, "Eventing strategy (everything|nothing)")
cmd.Flags().Bool(FlagEnableUnsafeQuery, true, "Define if unsafe query should be enabled (unsafe - use it at your own risk)")
Copy link
Collaborator

Choose a reason for hiding this comment

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

The default value should be false, user need to set it to true only they know what exact it means.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

unclezoro
unclezoro previously approved these changes Aug 1, 2023
@forcodedancing
Copy link
Collaborator Author

Wired, the latest commit does not display here.
forcodedancing@d981d87

@forcodedancing forcodedancing changed the base branch from develop to master August 2, 2023 10:32
@forcodedancing forcodedancing dismissed unclezoro’s stale review August 2, 2023 10:32

The base branch was changed.

@forcodedancing forcodedancing changed the base branch from master to develop August 2, 2023 10:33
@forcodedancing
Copy link
Collaborator Author

Wired, the latest commit does not display here. forcodedancing@d981d87

After changing base branch, it shows.

@unclezoro unclezoro added this pull request to the merge queue Aug 3, 2023
Merged via the queue into bnb-chain:develop with commit 9216a6a Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants