Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
In order to be able to support objects like proofs and hashes in programs, we first need to have the plumbing necessary to represent them. The purpose of this ARC is to introduce a new snarkVM type that can facilitate this.
Goals
Considerations
1. Preexisting types
String
- its set of features (support for a wide range of Unicode characters, UTF-8 validation) is much greater, making it inherently less efficient than what is needed to just encode arbitrary bytesArray
- its representation in programs is suitable to contain relatively small numbers of entries, but using it for objects like proofs would make it bloated and unreadable; it is also not ergonomic for handling hashes2. Encoded size
3. Overall capacity
Literal
"supertype" has an upper size limit ofu16::MAX
(65535
) bytes, meaning the same would apply to the newly proposed type32767
, and with base64 it would be ~43689
struct
4. Internal representation
Vec<u8>
internally, which has several benefits:5. The circuit-side counterpart
References
Beta Was this translation helpful? Give feedback.
All reactions