-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix(x/tx): default to using gogoproto.HybridResolver wherever possible #19845
Conversation
WalkthroughThe changes in this update aim to improve key handling within interfaces and structs across the codebase. Additionally, there are adjustments to database handling functions and testing setups for better organization and efficiency. Import statement reorganization and the adoption of Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
This comment has been minimized.
This comment has been minimized.
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.
lgtm! +1 for changelog
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (10)
- store/database.go (1 hunks)
- store/internal/encoding/changeset_test.go (1 hunks)
- store/storage/pebbledb/batch.go (1 hunks)
- store/storage/pebbledb/db.go (2 hunks)
- store/storage/sqlite/batch.go (1 hunks)
- store/storage/sqlite/db_test.go (1 hunks)
- x/tx/signing/aminojson/aminojson.go (2 hunks)
- x/tx/signing/aminojson/json_marshal.go (2 hunks)
- x/tx/signing/context.go (2 hunks)
- x/tx/signing/textual/handler.go (2 hunks)
Files skipped from review due to trivial changes (1)
- store/storage/sqlite/db_test.go
Additional comments: 10
store/storage/pebbledb/batch.go (2)
- 60-60: The addition of the
storeKey
parameter in theSet
method aligns well with the PR's objectives and doesn't introduce any apparent issues.- 64-64: The addition of the
storeKey
parameter in theDelete
method is consistent with the PR's goal to improve key handling, and the use of atombstone
value is a standard practice.store/storage/sqlite/batch.go (2)
- 65-65: The addition of the
storeKey
parameter in theSet
method aligns well with the PR's objectives and doesn't introduce any apparent issues.- 71-71: The addition of the
storeKey
parameter in theDelete
method is consistent with the PR's goal to improve key handling.store/internal/encoding/changeset_test.go (1)
- 7-8: Reordering the imports to group standard library, third-party, and project-specific imports separately improves readability and maintainability.
x/tx/signing/aminojson/aminojson.go (2)
- 8-8: The addition of the
gogoproto
import is necessary for the use ofgogoproto.HybridResolver
and is correctly placed in the import section.- 35-35: Changing the default assignment of
fileResolver
togogoproto.HybridResolver
in theNewSignModeHandler
function aligns with the PR's objectives and enhances flexibility.x/tx/signing/aminojson/json_marshal.go (2)
- 10-10: The addition of
gogoproto "github.com/cosmos/gogoproto/proto"
is consistent with the PR's objective to adoptgogoproto.HybridResolver
across various components. This change is correctly implemented.- 59-59: Changing the assignment of
options.FileResolver
togogoproto.HybridResolver
aligns with the PR's goal of enhancing serialization and deserialization efficiency. Ensure to verify the impact of this change on the overall functionality and performance.x/tx/signing/context.go (1)
- 83-83: The change from
protoregistry.GlobalFiles
togogoproto.HybridResolver
aligns with the PR's objective to enhance serialization and deserialization processes. This switch togogoproto.HybridResolver
is a strategic move to potentially offer performance benefits and better compatibility with different protobuf versions or configurations. However, it's crucial to ensure that this change does not introduce any unintended side effects, especially in terms of compatibility with existing protobuf files and their resolution.Ensure thorough testing is conducted to verify that the switch to
gogoproto.HybridResolver
does not negatively impact the resolution of protobuf files, especially in complex scenarios involving multiple protobuf versions or custom configurations.
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.
Review Status
Actionable comments generated: 1
Configuration used: .coderabbit.yml
Files selected for processing (1)
- x/tx/CHANGELOG.md (2 hunks)
Additional comments: 1
x/tx/CHANGELOG.md (1)
- 36-36: The entry for the hybrid resolver improvement is correctly placed under the "Improvements" section, aligning with the changelog's guiding principles.
cosmos#19845) Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit