Content
@
0 reply
0 recast
0 reaction
vlayer
@vlayer
1/ π In this thread and blog post, we dive into idiomatic code in Noir, focusing on data parsing today. https://www.vlayer.xyz/blog/idiomatic-noir-part-2-parsing-data Letβs get started π§΅π
1 reply
0 recast
5 reactions
vlayer
@vlayer
2/ π Parsing data from formats like Base64, RLP, JSON, and verifying against cryptographic primitives is a common routine. Key steps: β Compute cryptographic primitives. β Decode data to verify correctness. ZK projects do this daily.
1 reply
0 recast
0 reaction
vlayer
@vlayer
3/ π In ZK circuits, encoding and decoding are interchangeable. Decoding is often preferred due to efficiency and cheaper computation.
1 reply
0 recast
0 reaction
vlayer
@vlayer
4/ π‘ "Fragment" stores references to the original string, offset, and length of the parsed input. We can generalize "Fragment" to support any array.
1 reply
0 recast
0 reaction
vlayer
@vlayer
5/ π¨ Typical flow: β Decode and slice data. β Calculate cryptographic primitives. β Convert and compare data.
1 reply
0 recast
0 reaction
vlayer
@vlayer
6/ π Read more about parsing in Noir in the blog post by @zkMarek, and let us know your thoughts! https://www.vlayer.xyz/blog/idiomatic-noir-part-2-parsing-data
0 reply
0 recast
0 reaction