-
Notifications
You must be signed in to change notification settings - Fork 586
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
refactor(08-wasm)!: Move internal wasm types to internal folder. #6177
Conversation
WalkthroughWalkthroughThe updates involve restructuring the Changes
Possibly related issues
Recent Review DetailsConfiguration used: .coderabbit.yml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
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 (
|
|
||
// SplitPrefix splits the key into the prefix and the key itself, if the key is prefixed with either "subject/" or "substitute/". | ||
// If the key is not prefixed with either "subject/" or "substitute/", the prefix is nil. | ||
func SplitPrefix(key []byte) ([]byte, []byte) { |
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.
no real reason to not have these public now.
// NewStoreAdapter constructor | ||
func NewStoreAdapter(s storetypes.KVStore) *StoreAdapter { | ||
if s == nil { | ||
panic(errors.New("types must not be nil")) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
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.
Looks great, just left some suggestions on naming and such. Curious to hear what you think
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.
Beautiful!
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.
There are also some API breaking changes for 08-wasm here, so would be nice to reflect that in the PR title with a conventional commit.
// Both stores are used for reads, but only the subjectStore is used for writes. For all operations, the key | ||
// is checked to determine which types to use and must be prefixed with either "subject/" or "substitute/" accordingly. | ||
// If the key is not prefixed with either "subject/" or "substitute/", a default action is taken (e.g. no-op for Set/Delete). | ||
type MergedClientStore struct { |
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.
Not sure about this name... Merging for me implies that two things are combined into one, but it's not really the case here, we are just grouping two things together... I actually don't dislike the name we had before...
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.
I'm def still feeling the point of not overloading the migrate term but fine to revert. Thoughts @damiannolan?
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.
But two things are combined into one! 😛
This is a struct with two storetypes.KVStore
fields defined within it!
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.
The previous name gave a clear indication of where this type is used, while the new one is more generic. Since probably we will not use this anywhere else, I think it would make sense to be more explicit. If I think of merging, I would think of both stores merging into one, which is not the case. But I am fine, if you guys are happy with this naming.
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.
I'll merge as is for now and discussion can be done in slack or an issue. Type is private now so renaming would have no API implications and would be easy to do.
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.
ClientRecoveryStore
would probably get the ronseal approval award - does exactly what it says on the tin. I'm not really fussed as long as it doesn't overlap with other naming constructs
Quality Gate passed for 'ibc-go'Issues Measures |
Description
#6103 (comment)
Decided to move it in its own
internal/types
package. Completely open to renaming/moving to ibcwasm if folks prefer.closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Tests