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

[Feature] Introduce a console literal for raw bytes #2584

Draft
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

ljedrz
Copy link
Collaborator

@ljedrz ljedrz commented Dec 5, 2024

This PR is a draft/RFC proposal for a new console literal containing raw bytes, which would allow us to e.g. handle hashes (example use case) and proofs in Aleo programs.

Open points:

  • does this proposal require an ARC?
  • the encoding to be used in programs
    • it is currently a hex encoding for simplicity, but that incurs a 100% penalty in size when encoded
    • e.g. base64 would reduce that penalty to ~33%
  • the length limit(s)
    • is u16::MAX enough/too much?
    • should the length prefix be an order of magnitude greater for potential future compatibility? this is the reason for the additional implementation in snarkvm-utilities
  • a call to unimplemented!() in circuit::Literal::new
    • it is safe to make it unimplemented! as long as Inject::new is not intended to be used externally
    • this new feature could be extended with a circuit counterpart, removing the need for it

@zkxuerb zkxuerb requested a review from vicsn December 10, 2024 15:03
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.

1 participant