Skip to content
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

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

Villaquiranm
Copy link
Contributor

Related to #1475

@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Dec 19, 2024
@Villaquiranm Villaquiranm changed the title Add gno implementation of crypto/bech32 feat(stdlibs): add package crypto/bech32 Dec 19, 2024
@Gno2D2
Copy link
Collaborator

Gno2D2 commented Dec 19, 2024

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
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:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 The pull request was created from a fork (head branch repo: Villaquiranm/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Dec 19, 2024
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Dec 19, 2024
@Villaquiranm Villaquiranm marked this pull request as ready for review December 30, 2024 13:06
@notJoon notJoon added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Jan 2, 2025
@zivkovicmilos zivkovicmilos requested review from mvertes and aeddi January 6, 2025 11:52
@Kouteki Kouteki added the in focus Core team is prioritizing this work label Jan 6, 2025
@Kouteki Kouteki added this to the 🚀 Mainnet beta launch milestone Jan 6, 2025
Copy link
Contributor

@n2p5 n2p5 left a 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 (
Copy link
Contributor

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.

Copy link
Contributor Author

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 ?

Copy link
Contributor

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.

Copy link
Contributor Author

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

@jefft0 jefft0 removed the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Jan 8, 2025
@jefft0
Copy link
Contributor

jefft0 commented Jan 8, 2025

Removed the review/triage-pending label because this PR was reviewed by core dev n2p5.

Copy link
Contributor

@n2p5 n2p5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in focus Core team is prioritizing this work 📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

6 participants