-
Notifications
You must be signed in to change notification settings - Fork 398
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
chore: clean up the params
keeper
#3105
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
Co-authored-by: Guilhem Fanton <[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.
Looking good 👍
@moul |
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):No automated checks match this pull request. ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
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.
Started to review, but I need a little bit more time. Blocking to avoid merging without my review.
Please check this PR when you get the chance 🙏 I've integrated changes from previously merged params PRs on |
Description
This PR cleans up a bit the
params
keeper, and starts a discussion on some functionality that seems sketchy. It moves some testing code outside the binary, and into test files.Additionally, I've updated some parsing methods so they're quicker now, by ~40ns:
Before:
The keeper could probably be fully made generic, but for the sake of readability, this was not pursued.
cc @gfanton @moul
Topics that need discussing:
Internal funky returns
gno/tm2/pkg/sdk/params/keeper.go
Lines 118 to 128 in 4f27a57
The method is called GetXXX, but it doesn't alter the pointer value internally if the value is missing.
Keeper (store) not being thread safe
The params keeper can be concurrently called, but it's not thread safe, actually. The underlying store is not thread safe
What if different modules concurrently call the keeper to store params?
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description