Utilities for Vyper

Convenient on-chain state compression via secure hashes and compiler-verified proofs

Utilities for Vyper

Created At

ETHNewYork 2022

Project Description

https://github.com/vyperlang/vyper/issues/2892 Build support into the compiler (vyper) for storing a secure hash of arbitrary data (e.g. a struct), and then "unpacking" (validating) the data back from a user-provided "proof" in calldata. Smart contract developers can conveniently compress (hash) their data and re-hydrate it with the "proofs".

How it's Made

We used the Vyper compiler (Python3). Charles (on the vyper team) helped us get started by copying/modifying compiler primitives for arrays and abi.encode. From there, we modified the type details to make this work on arbitrary structs/type. So you can have Witness[MyStruct] or Proof[MyStruct]. Our team was brand new to EVM compilers, and we got the parsing working really quickly!

background image mobile

Join the mailing list

Get the latest news and updates

Utilities for Vyper | ETHGlobal