1. 引言
rkyv(archive)为Dusk network赞助的第一个ZKP研究项目——致力于Zero-Knowledge Recrusion研究。
相关代码见:
- https://github.com/rkyv/rkyv(Rust语言)
Dusk network自身实现了PLONKup proof system:
借助PLONKup算法,可在减少prove time的同时提升性能。
Dusk network与 University of Barcelona 的 Javier Silva and Xavier Salleras 进行了合作。
Dusk团队主要关注的研究话题有:
- 1-Level recursion:支持a validity proof of one single blockchain block。
- Multi-block validation via aggregation of proof:支持verification of validity of several proofs by validating one single proof。
- ZK-squared rollups:为1-Level recursion和unbounded recursion之间的中间层。
- Unbounded recursion:包含chain interoperability and more efficient & secure state sharding。
2. rkyv——Zero-Copy Deserialization
rkyv为用纯Rust语言实现的zero-copy deserialization framework。
rkyv的主要特征是“zero-copy”:即the act of “deserialization” of data is as simple as casting a pointer, with serialization occurring in a way that makes its in-memory representation the same as its archived representation。
rkyv的主要意义在于:其deserialization方法可大幅减少load times 且 使用了尽可能少的memory。
rkyv与现有Rust serialization方案的性能对比可参看:
主要特征对比为:
Feature | rkyv | Cap’n Proto | FlatBuffers |
---|---|---|---|
Open type system (用户自定义类型) | yes | no | no |
Scalars | yes | no | yes |
Tables | no* | yes | yes |
Schema evolution | no* | yes | yes |
Zero-copy | yes | yes | yes |
Random-access reads | yes | yes | yes |
Validation | upfront* | on-demand | yes |
Reflection | no* | yes | yes |
Object order | bottom-up | either | bottom-up |
Schema language | derive | custom | custom |
Usable as mutable state | yes | no | no |
Padding takes space on wire? | yes* | optional | no |
Unset fields take space on wire? | yes | yes | no |
Pointers take space on wire? | yes | yes | yes |
Cross-language | no | yes | yes |
Hash maps and B-trees | yes | no | no |
Shared pointers | yes | no | no |
* rkyv’s open type system allows extension types that provide these capabilities
参考资料
[1] Dusk Network to use Grants program for Zero-Knowledge research