-
Notifications
You must be signed in to change notification settings - Fork 386
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(stdlibs): add package crypto/bech32 #3375
base: master
Are you sure you want to change the base?
Conversation
🛠 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):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
fe6cb0f
to
3ca82fc
Compare
51b4e9d
to
cd39189
Compare
675b56f
to
0e3a371
Compare
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.
This looks really good, I have a note on a comment you left in the code, but it otherwise seems like a pragmatic and straightforward PR.
Open question here: For libraries that we port from go -> gno. Do we have an established pattern where I can use some reference data, expected inputs and outputs, and run both the go and gno implementations to show that I get the exact same outputs between both systems? It seems like this would be a really nice way to prove feature parity.
// For some reason non native function fails with | ||
// gno.land/r/demo/keystore/keystore_test.gno:15:3: constant overflows (code=2) | ||
// TODO: check this issue after and if this PR is merged | ||
var ( |
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.
This comment either needs context that you changed const -> var, or the comment should be removed and become its issue tracked on why this behavior does not work. This way, the coding implementation stays clean.
From an implementation standpoint, I don't see a problem with this being var
since it is scoped to the test itself and, therefore, doesn't need a note. It is an interesting question to explore on its own merit though.
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.
Hello, thanks a lot for the review :)
yeah I add that in order to give some context on my change
I prefered to leave a comment instead of just changing const -> var without an explanation
I think there is an issue to be created, but the issue make sense only if the code is merged.
I agree with you and I'll remove this comment as soon as the Issue is created but I don't really know like do I create the issue right away ? or we wait for the PR to be close to be merged ?
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.
Right, but if we are to leave the comment, the comment needs to mention that you've changed this from const to var in the comment. if you look at only the lines added and not the lines removed, it doesn't let the reader know that you've replaced const with var. So, if you leave the comment, consider elaborating on the context.
The reason I think removing the comment is that const doesn't provide any additional safety here. This lives inside of a testing file and we don't have to worry about mutation here.
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.
Sorry you're right, I thought I specified that change...
Improved the (temporary comment, I hope) on bf2167b
Removed the |
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
Related to #1475