Content pfp
Content
@
0 reply
0 recast
0 reaction

vlayer  pfp
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  pfp
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  pfp
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  pfp
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  pfp
vlayer
@vlayer
5/ πŸ”¨ Typical flow: β€” Decode and slice data. β€” Calculate cryptographic primitives. β€” Convert and compare data.
1 reply
0 recast
0 reaction

vlayer  pfp
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