Skip to content

Conversation

cypriansakwa
Copy link
Contributor

@cypriansakwa cypriansakwa commented Jul 12, 2025

HI @critesjosh .Kindly review the changes.

Description

This pull request updates the lib_examples/base64_example to compile and work with Noir version 1.0.0-beta.6.
The code now uses only the noir_base64 library, specifically version v0.4.2 from https://github.com/noir-lang/noir_base64.git.
All previous incompatible dependencies were removed, and the example now runs correctly.

Problem

The existing base64 example could not compile against Noir 1.0.0-beta.6.
It was using outdated libraries and syntax that were incompatible with the latest Noir toolchain.

Summary

  • Updated Nargo.toml to use noir_base64 = {tag = "v0.4.2", git = "https://github.com/noir-lang/noir_base64.git"}.
  • Removed outdated imports and dependencies.
  • Refactored the main circuit to use only noir_base64.
  • Verified that the example compiles and runs successfully with Noir 1.0.0-beta.6.

Additional Context

See issue #49 for previous discussion and error reports.
After these changes, the example passes compilation and can be executed with both short and long input test cases.

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@cypriansakwa cypriansakwa changed the title Add Base64 Encode/Decode Circuit with Strict Input Validation Update lib_examples/base64_example Jul 12, 2025
Copy link
Collaborator

@critesjosh critesjosh left a comment

Choose a reason for hiding this comment

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

I dont think there should be 1613 file changes in this PR. Can you update the .gitignore?

@cypriansakwa
Copy link
Contributor Author

I dont think there should be 1613 file changes in this PR. Can you update the .gitignore?

Hi @critesjosh ,
You're absolutely right — the large number of file changes was caused by build artifacts and other generated files that weren’t excluded initially.
I've now updated the .gitignore to properly exclude those files.
Let me know if anything else needs adjustment.

@cypriansakwa
Copy link
Contributor Author

I dont think there should be 1613 file changes in this PR. Can you update the .gitignore?

Hi @critesjosh . The large number of file changes was due to auto-generated files in contract/cache/ and contract/out/ being tracked.

I've now done the following:

  • Added contract/cache/ and contract/out/ to .gitignore
  • Removed the previously tracked files using git rm --cached
  • Re-committed and pushed the cleaned-up branch

Please let me know if the file change count looks okay now.

Thanks.

@cypriansakwa cypriansakwa requested a review from critesjosh July 22, 2025 11:45
@critesjosh
Copy link
Collaborator

Can you just update it to work with the latest version with minimal modifications to the existing code? I'd like to keep the example as simple as possible.

@cypriansakwa
Copy link
Contributor Author

Can you just update it to work with the latest version with minimal modifications to the existing code? I'd like to keep the example as simple as possible.

Hello @critesjosh ,

I hope you’re well. I’ve made the requested updates and resolved the issues highlighted in your previous review. Thanks for your guidance.

Could you please take another look at the pull request when you have a moment? Your feedback is greatly appreciated.

Thank you very much for your time!

Best regards,
Cyprian

@critesjosh
Copy link
Collaborator

Thanks for the progress on this! Can you add a CI workflow that tests the code and alerts the developer relations team if it fails, like you did for the bignum example?

@cypriansakwa
Copy link
Contributor Author

Thanks for the progress on this! Can you add a CI workflow that tests the code and alerts the developer relations team if it fails, like you did for the bignum example?

Hi @critesjosh ,

I've added a nightly test workflow for base64_example following the same format as the other examples. The workflow runs tests on PRs and nightly, and will notify the developer relations team if a nightly run fails. Thanks for your guidance.
Let me know if any further adjustments are needed!

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants