基于Nova的MinRoot VDF实现

news2024/11/25 6:38:01

1. 引言

前序博客有:

  • Nova代码解析

代码见:

  • https://github.com/Microsoft/Nova(Rust)

有多种类型的VDF算法:
在这里插入图片描述
同一类型的VDF,根据所选择的曲线不同,所使用的参数也有所不同:
在这里插入图片描述
https://github.com/Microsoft/Nova 中的MinRoot,所采用的为:
f ( x i + 1 , y i + 1 ) = ( ( x i + y i ) 1 / 5 , x i ) f(x_{i+1},y_{i+1})=((x_i+y_i)^{1/5}, x_i) f(xi+1,yi+1)=((xi+yi)1/5,xi)

详细代码见examples/minroot.rs

Nova-based VDF with MinRoot delay function
=========================================================
Proving 1024 iterations of MinRoot per step
Producing public parameters...
PublicParams::setup, took 73.078327592s 
Number of constraints per step (primary circuit): 12888
Number of constraints per step (secondary circuit): 10347
Number of variables per step (primary circuit): 12882
Number of variables per step (secondary circuit): 10329
Generating a RecursiveSNARK...
RecursiveSNARK::prove_step 0: true, took 4.624µs 
RecursiveSNARK::prove_step 1: true, took 1.166330261s 
RecursiveSNARK::prove_step 2: true, took 1.224084382s 
RecursiveSNARK::prove_step 3: true, took 1.275612276s 
RecursiveSNARK::prove_step 4: true, took 1.247531567s 
RecursiveSNARK::prove_step 5: true, took 1.276658484s 
RecursiveSNARK::prove_step 6: true, took 1.233760567s 
RecursiveSNARK::prove_step 7: true, took 1.230236579s 
RecursiveSNARK::prove_step 8: true, took 1.24617902s 
RecursiveSNARK::prove_step 9: true, took 1.202719954s 
Verifying a RecursiveSNARK...
RecursiveSNARK::verify: true, took 381.332458ms
Generating a CompressedSNARK using Spartan with IPA-PC...
CompressedSNARK::prove: true, took 33.365056086s
CompressedSNARK::len 9403 bytes
Verifying a CompressedSNARK...
CompressedSNARK::verify: true, took 388.515267ms
=========================================================
Proving 2048 iterations of MinRoot per step
Producing public parameters...
PublicParams::setup, took 70.355994544s 
Number of constraints per step (primary circuit): 15960
Number of constraints per step (secondary circuit): 10347
Number of variables per step (primary circuit): 15954
Number of variables per step (secondary circuit): 10329
Generating a RecursiveSNARK...
RecursiveSNARK::prove_step 0: true, took 4.213µs 
RecursiveSNARK::prove_step 1: true, took 1.163035595s 
RecursiveSNARK::prove_step 2: true, took 1.211507467s 
RecursiveSNARK::prove_step 3: true, took 1.228544979s 
RecursiveSNARK::prove_step 4: true, took 1.218547311s 
RecursiveSNARK::prove_step 5: true, took 1.221717836s 
RecursiveSNARK::prove_step 6: true, took 1.218962179s 
RecursiveSNARK::prove_step 7: true, took 1.230055614s 
RecursiveSNARK::prove_step 8: true, took 1.218389455s 
RecursiveSNARK::prove_step 9: true, took 1.220260741s 
Verifying a RecursiveSNARK...
RecursiveSNARK::verify: true, took 327.467486ms
Generating a CompressedSNARK using Spartan with IPA-PC...
CompressedSNARK::prove: true, took 28.405642566s
CompressedSNARK::len 9404 bytes
Verifying a CompressedSNARK...
CompressedSNARK::verify: true, took 338.551301ms
=========================================================
Proving 4096 iterations of MinRoot per step
Producing public parameters...
PublicParams::setup, took 70.092380898s 
Number of constraints per step (primary circuit): 22104
Number of constraints per step (secondary circuit): 10347
Number of variables per step (primary circuit): 22098
Number of variables per step (secondary circuit): 10329
Generating a RecursiveSNARK...
RecursiveSNARK::prove_step 0: true, took 4.543µs 
RecursiveSNARK::prove_step 1: true, took 1.262449816s 
RecursiveSNARK::prove_step 2: true, took 1.30737881s 
RecursiveSNARK::prove_step 3: true, took 1.315299705s 
RecursiveSNARK::prove_step 4: true, took 1.298120798s 
RecursiveSNARK::prove_step 5: true, took 1.293002033s 
RecursiveSNARK::prove_step 6: true, took 1.296309126s 
RecursiveSNARK::prove_step 7: true, took 1.304054547s 
RecursiveSNARK::prove_step 8: true, took 1.290177872s 
RecursiveSNARK::prove_step 9: true, took 1.291139605s 
Verifying a RecursiveSNARK...
RecursiveSNARK::verify: true, took 371.391454ms
Generating a CompressedSNARK using Spartan with IPA-PC...
CompressedSNARK::prove: true, took 42.00665964s
CompressedSNARK::len 9704 bytes
Verifying a CompressedSNARK...
CompressedSNARK::verify: true, took 456.396603ms
=========================================================
Proving 8192 iterations of MinRoot per step
Producing public parameters...
PublicParams::setup, took 73.216632509s 
Number of constraints per step (primary circuit): 34392
Number of constraints per step (secondary circuit): 10347
Number of variables per step (primary circuit): 34386
Number of variables per step (secondary circuit): 10329
Generating a RecursiveSNARK...
RecursiveSNARK::prove_step 0: true, took 3.449µs 
RecursiveSNARK::prove_step 1: true, took 1.539035436s 
RecursiveSNARK::prove_step 2: true, took 1.622303693s 
RecursiveSNARK::prove_step 3: true, took 1.534060709s 
RecursiveSNARK::prove_step 4: true, took 1.500765389s 
RecursiveSNARK::prove_step 5: true, took 1.541102208s 
RecursiveSNARK::prove_step 6: true, took 1.521414059s 
RecursiveSNARK::prove_step 7: true, took 1.498017567s 
RecursiveSNARK::prove_step 8: true, took 1.507547714s 
RecursiveSNARK::prove_step 9: true, took 1.654619421s 
Verifying a RecursiveSNARK...
RecursiveSNARK::verify: true, took 608.025166ms
Generating a CompressedSNARK using Spartan with IPA-PC...
CompressedSNARK::prove: true, took 73.425426802s
CompressedSNARK::len 10001 bytes
Verifying a CompressedSNARK...
CompressedSNARK::verify: true, took 694.724361ms
=========================================================
Proving 16384 iterations of MinRoot per step
Producing public parameters...
PublicParams::setup, took 105.921985131s 
Number of constraints per step (primary circuit): 58968
Number of constraints per step (secondary circuit): 10347
Number of variables per step (primary circuit): 58962
Number of variables per step (secondary circuit): 10329
Generating a RecursiveSNARK...
RecursiveSNARK::prove_step 0: true, took 25.76µs 
RecursiveSNARK::prove_step 1: true, took 1.813137744s 
RecursiveSNARK::prove_step 2: true, took 1.878074321s 
RecursiveSNARK::prove_step 3: true, took 1.80861029s 
RecursiveSNARK::prove_step 4: true, took 2.396045213s 
RecursiveSNARK::prove_step 5: true, took 1.729798055s 
RecursiveSNARK::prove_step 6: true, took 1.729107037s 
RecursiveSNARK::prove_step 7: true, took 1.720501846s 
RecursiveSNARK::prove_step 8: true, took 1.743876552s 
RecursiveSNARK::prove_step 9: true, took 1.737904666s 
Verifying a RecursiveSNARK...
RecursiveSNARK::verify: true, took 711.567199ms
Generating a CompressedSNARK using Spartan with IPA-PC...
CompressedSNARK::prove: true, took 78.038337919s
CompressedSNARK::len 9998 bytes
Verifying a CompressedSNARK...
CompressedSNARK::verify: true, took 668.522336ms
=========================================================
Proving 32768 iterations of MinRoot per step
Producing public parameters...
PublicParams::setup, took 107.353152111s 
Number of constraints per step (primary circuit): 108120
Number of constraints per step (secondary circuit): 10347
Number of variables per step (primary circuit): 108114
Number of variables per step (secondary circuit): 10329
Generating a RecursiveSNARK...
RecursiveSNARK::prove_step 0: true, took 4.849µs 
RecursiveSNARK::prove_step 1: true, took 2.265852376s 
RecursiveSNARK::prove_step 2: true, took 2.2747954s 
RecursiveSNARK::prove_step 3: true, took 2.281599611s 
RecursiveSNARK::prove_step 4: true, took 2.306338036s 
RecursiveSNARK::prove_step 5: true, took 2.320080158s 
RecursiveSNARK::prove_step 6: true, took 2.281631356s 
RecursiveSNARK::prove_step 7: true, took 2.297964832s 
RecursiveSNARK::prove_step 8: true, took 2.281593708s 
RecursiveSNARK::prove_step 9: true, took 2.410508168s 
Verifying a RecursiveSNARK...
RecursiveSNARK::verify: true, took 1.256136737s
Generating a CompressedSNARK using Spartan with IPA-PC...
CompressedSNARK::prove: true, took 138.11442845s
CompressedSNARK::len 10296 bytes
Verifying a CompressedSNARK...
CompressedSNARK::verify: true, took 1.098852882s
=========================================================
Proving 65535 iterations of MinRoot per step
Producing public parameters...
PublicParams::setup, took 191.407999313s 
Number of constraints per step (primary circuit): 206421
Number of constraints per step (secondary circuit): 10347
Number of variables per step (primary circuit): 206415
Number of variables per step (secondary circuit): 10329
Generating a RecursiveSNARK...
RecursiveSNARK::prove_step 0: true, took 17.903µs 
RecursiveSNARK::prove_step 1: true, took 3.626168253s 
RecursiveSNARK::prove_step 2: true, took 3.637881318s 
RecursiveSNARK::prove_step 3: true, took 3.746542026s 
RecursiveSNARK::prove_step 4: true, took 3.559443813s 
RecursiveSNARK::prove_step 5: true, took 3.556236556s 
RecursiveSNARK::prove_step 6: true, took 3.591468574s 
RecursiveSNARK::prove_step 7: true, took 3.784589713s 
RecursiveSNARK::prove_step 8: true, took 3.766741089s 
RecursiveSNARK::prove_step 9: true, took 3.712172217s 
Verifying a RecursiveSNARK...
RecursiveSNARK::verify: true, took 2.256590247s
Generating a CompressedSNARK using Spartan with IPA-PC...
CompressedSNARK::prove: true, took 262.484895111s
CompressedSNARK::len 10590 bytes
Verifying a CompressedSNARK...
CompressedSNARK::verify: true, took 1.846402449s
=========================================================

参考资料

[1] Origami: Fold a Plonk for Ethereum’s VDF
[2] MinRoot: Candidate Sequential Function for Ethereum VDF
[3] VDF Proving with SnarkPack

Nova系列博客

  • Nova: Recursive Zero-Knowledge Arguments from Folding Schemes学习笔记
  • Nova 和 SuperNova:无需通用电路的通用机器执行证明系统
  • Sangria:类似Nova folding scheme的relaxed PLONK for PLONK
  • 基于Nova/SuperNova的zkVM
  • SuperNova:为多指令虚拟机执行提供递归证明
  • Lurk——Recursive zk-SNARKs编程语言
  • Research Day 2023:Succinct ZKP最新进展
  • 2023年 ZK Hack以及ZK Summit 亮点记
  • 基于cycle of curves的Nova证明系统(1)
  • 基于cycle of curves的Nova证明系统(2)
  • Nova代码解析
  • Nova中 Vitalik R1CS例子 的 folding scheme

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/701708.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

基于matlab使用点特征匹配稳定从抖动平台捕获的视频(附源码)

一、前言 此示例演示如何稳定从抖动平台捕获的视频。稳定视频的一种方法是跟踪图像中的显著特征,并将其用作锚点以消除与其相关的所有扰动。但是,此过程必须了解第一个视频帧中这种显着特征的位置。在此示例中,我们探索了一种无需任何此类先…

rz、sz常见报错怎么解决?

使用shell和mobaxterm 中上传下载文件遇到的问题 常见报错一: 首先要使用Ctrlx 来退出,或者等待一会; 然后重新输入sz 要下载的文件名 空格 ,然后按ctrl右键,选择如下选项 常见错误二: sz还有一些参数&#xff0…

java之路——带你了解Hibernate与基本过程

文章目录 前言一、Hibernate用来干嘛的二、Hibernate与mybatisHibernate的基本开发步骤 前言 Hibernate框架的发展可以追溯到2001年,它在过去的几年里获得了广泛的应用和持续的发展。 其中的发展演变: 初期版本(2001-2006年)&am…

记一次 JMeter 压测 HTTPS 性能问题

目录 前言: 问题背景 问题分析 切入点:垃圾回收 调整思路:为什么频繁 SSL 握手 问题验证 回归测试 源码验证 前言: 在进行性能测试时,JMeter是一个常用的工具,可以模拟大量并发用户来测试系统的负…

QT学习笔记3--信号和槽

作用 信号槽是用来连接信号的发出端和接收端,其本身是没有关联的。利用connect函数将两个端耦合在一起。 函数格式 connect(信号的发送者,发送的具体信号,信号的接受者,信号的处理(槽)) 实例 利用按键关…

MultiTimer 软件定时器扩展模块的研究与优化【原创】

文章目录 前言收获main.cMultiTimer.cMultiTimer.h 前言 博主花费几天时间研究了此开源软件定时器扩展模块代码,并参考别的博主讲解解决了定时器计数值会溢出的问题(很多博主写的文章并没有谈到这个计数溢出问题,我就想问一下看代码自己都不思…

MathType公式批量转换为Word自带公式的VBA实现及error ‘4198‘ 处理

VBA 纯新手,程序可能比较傻,大家将就看。有改进建议,欢迎留言 参考链接: 1、2种办法把MathType公式转换为Word公式 2、一键批量将mathtype公式转换成word自带公式-vba/vbnet_mathtype批量转word自带_一路向前的小Q的博客-CSDN博…

如何保证缓存与数据库的双写一致性?

分析? 你只要用缓存,就可能会涉及到缓存与数据库双存储双写,你只要是双写,就一定会有数据一 致性的问题,那么你如何解决一致性问题? 一般来说,如果允许缓存可以稍微的跟数据库偶尔有不一致的情…

合同数智化如何助力地产企业实现变革“突围”?

从稳步发展到求新求变, 数智化成破局关键 近年来,随着宏观经济政策调整,在中央房住不炒的大基调下,房地产逐步回归居住属性。在这样的大背景下,针对不同类型的房地产企业,国家出台了不同的数字化转型指导文…

【Bio】头骨组成,及其剖切面

在总结这篇文章之前,我看过了一本书《认知觉醒》,里边有提到一个观点:我们不仅要去获取新知识,也要注重对新知识的“缝接”,这个过程也就是关联。这样,如沙粒般的新知识才能关联到一起,达到聚沙…

go get google.golang.org/grpc报错

win10环境,报错完整内容如下 go get google.golang.org/grpc: module google.golang.org/grpc: Get https://proxy.golang.org/google.golang.org/grpc/v/list: dial tcp [2404:6800:4012:3::2011]:443: connectex: A connection attempt failed because the conne…

Spring 的依赖注入(DI)

前言 欢迎来到本篇文章,书接上回,本篇说说 Spring 中的依赖注入,包括注入的方式,写法,该选择哪个注入方式以及可能出现的循环依赖问题等内容。 如果正在阅读的朋友还不清楚什么是「依赖」,建议先看看我第一…

34岁上岸,我终于圆了自己的考研梦

​ 大家好,我是独孤风,一位曾经的港口煤炭工人,目前在某国企任大数据负责人,公众号大数据流动的作者。 ​ 虽然告诉自己要平静,但是当接到EMS录取通知书的那一刻,眼眶还是忍不住有些湿润。今年正好是是东北…

SpringBoot源码分析(1)--@SpringBootApplication注解使用和原理/SpringBoot的自动配置原理详解

文章目录 前言主启动类的配置1、SpringBootApplication注解1.1、SpringBootConfiguration注解验证启动类是否被注入到spring容器中 1.2、ComponentScan 注解ComponentScan 注解解析与路径扫描 1.3、EnableAutoConfiguration注解1.3.1、AutoConfigurationPackage注解1.3.2、Impo…

【MySQL】事务及其隔离性/隔离级别

目录 一、事务的概念 1、事务的四种特性 2、事务的作用 3、存储引擎对事务的支持 4、事务的提交方式 二、事务的启动、回滚与提交 1、准备工作:调整MySQL的默认隔离级别为最低/创建测试表 2、事务的启动、回滚与提交 3、启动事务后未commit,但是…

HTB-Pilgrimage

HTB-Pilgrimage 信息收集80端口立足emily -> root 信息收集 80端口 扫描目录发现存在.git。 通过scrabble获取网站的git文件。 有如下这些文件。 在index.php中使用了magick来处理图像。 正好我们靠git弄了一个,查看一下版本。 这个版本似乎有些不得了的东西…

Quiz 9: Dictionaries | Python for Everybody 配套练习_解题记录

文章目录 课程简介Quiz 9: Dictionaries 单选题(1-11)编程题Exercise 9.4 课程简介 Python for Everybody 零基础程序设计(Python 入门) This course aims to teach everyone the basics of programming computers using Python.…

conda的多线程下载工具mamba(解决Anaconda3 solving environment 巨慢的方法)

solving environment为什么会越来越慢? 根据原博的解释以及我查阅的相关资料,这是由于conda在新安装一个包或者更新包时需要搜索当前环境中所有的包的依赖空间,以找到满足所有依赖项的版本,随着用户安装的包越来越多,…

C#核心知识回顾——1.结构体、构造函数、GC、成员属性、索引器

1.结构体: 在 C# 中,结构体是值类型数据结构。它使得一个单一变量可以存储各种数据类型的相关数据。例如我定义了一个结构体,它有两个变量,创建一个这个类型的结构体,通过一个变量名调用多个变量,这些变量可…

Layui时间范围选择器,添加【本周、本月、本季度、本年等常用时间快捷键】

文章目录 1. 界面实现2. JS具体实现2.1 第一种实现2.2 第二种实现 1. 界面实现 <input id"Date_select" type"text" class"form-control" placeholder"请选择时间范围" style"border-radius: 4px;" /><input id&qu…