-
Notifications
You must be signed in to change notification settings - Fork 238
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
Problem: don't support skipping check-tx in benchmark #1659
Conversation
WalkthroughThe pull request introduces several updates across the project, primarily focusing on bug fixes and improvements. Key changes include enhancements to benchmark functionality, the addition of a new transaction checking feature in the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Signed-off-by: yihuang <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1659 +/- ##
=======================================
Coverage 34.91% 34.91%
=======================================
Files 123 123
Lines 11811 11811
=======================================
Hits 4124 4124
Misses 7273 7273
Partials 414 414 |
Signed-off-by: yihuang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
CHANGELOG.md (1)
20-20
: Verify changelog entry format.The changelog entry follows the standard format with bullet point, component in parentheses, PR reference, and clear description. However, consider adding more details about the benchmark improvement and its impact.
Consider expanding the entry to:
-* (testground)[#1659](https://github.com/crypto-org-chain/cronos/pull/1659) Support skip check-tx in benchmark. +* (testground)[#1659](https://github.com/crypto-org-chain/cronos/pull/1659) Support skip check-tx in benchmark to improve performance of benchmark tests by bypassing transaction verification.app/app.go (1)
1477-1493
: Add security warning documentation for dummy check mode.While the implementation is correct, the dummy check mode skips critical transaction validations. This could be dangerous if accidentally enabled in production.
Consider adding a code comment explaining:
- The security implications of enabling dummy checks
- That this should only be used for benchmarking
- The specific validations that are being skipped
+// CheckTx implements the Application.CheckTx method. It handles transaction verification +// differently when dummy check mode is enabled. +// +// WARNING: Dummy check mode skips critical transaction validations and should ONLY be used +// for benchmarking purposes. Do not enable this in production as it bypasses: +// - Signature verification +// - Sequence checking +// - Fee validation +// - Any other ABCI-level transaction checks func (app *App) CheckTx(req *abci.RequestCheckTx) (*abci.ResponseCheckTx, error) {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- CHANGELOG.md (1 hunks)
- app/app.go (6 hunks)
🧰 Additional context used
🔇 Additional comments (3)
CHANGELOG.md (1)
Line range hint
1-1000
: LGTM - Well structured changelog.The changelog follows best practices with:
- Clear version sections in reverse chronological order
- Consistent categorization of changes (Bug Fixes, Improvements, etc.)
- PR references and descriptions for all entries
🧰 Tools
🪛 Markdownlint
22-22: null
Emphasis used instead of a heading(MD036, no-emphasis-as-heading)
app/app.go (2)
191-191
: LGTM! Flag naming follows convention.The
FlagUnsafeDummyCheckTx
constant follows the established naming pattern for unsafe flags and clearly indicates its testing/benchmarking purpose.
357-359
: LGTM! Field addition with appropriate documentation.The
dummyCheckTx
field is well-documented with a clear warning about validator usage restrictions.
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit
New Features
Bug Fixes
Improvements