Skip to content

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.

ARC link: ProvableHQ/ARCs#83

Open points:

  • 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

Signed-off-by: ljedrz <ljedrz@users.noreply.github.com>
@zkxuerb zkxuerb requested a review from vicsn December 10, 2024 15:03
@vicsn vicsn removed their request for review July 30, 2025 15:44
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