1- use crate :: proofs:: BatchProof ;
1+ use crate :: { proofs:: BatchProof , VALIDIUM_VERSION } ;
22use eyre:: Result ;
33use scroll_zkvm_types:: {
4- bundle:: { BundleInfo , BundleWitness } ,
5- public_inputs:: ForkName ,
4+ bundle:: { BundleInfo , BundleWitness , LegacyBundleWitness } ,
5+ public_inputs:: { ForkName , Version } ,
66 task:: ProvingTask ,
77 utils:: { to_rkyv_bytes, RancorError } ,
88} ;
@@ -41,6 +41,7 @@ impl BundleProvingTask {
4141
4242 fn build_guest_input ( & self ) -> BundleWitness {
4343 BundleWitness {
44+ version : VALIDIUM_VERSION ,
4445 batch_proofs : self . batch_proofs . iter ( ) . map ( |proof| proof. into ( ) ) . collect ( ) ,
4546 batch_infos : self
4647 . batch_proofs
@@ -59,7 +60,7 @@ impl BundleProvingTask {
5960 let witness = self . build_guest_input ( ) ;
6061 let metadata = BundleInfo :: from ( & witness) ;
6162
62- super :: check_aggregation_proofs ( self . batch_proofs . as_slice ( ) , fork_name ) ?;
63+ super :: check_aggregation_proofs ( self . batch_proofs . as_slice ( ) , Version :: validium_v1 ( ) ) ?;
6364
6465 Ok ( metadata)
6566 }
@@ -71,7 +72,8 @@ impl TryFrom<BundleProvingTask> for ProvingTask {
7172 fn try_from ( value : BundleProvingTask ) -> Result < Self > {
7273 let witness = value. build_guest_input ( ) ;
7374 let serialized_witness = if crate :: witness_use_legacy_mode ( ) {
74- to_rkyv_bytes :: < RancorError > ( & witness) ?. into_vec ( )
75+ let legacy = LegacyBundleWitness :: from ( witness) ;
76+ to_rkyv_bytes :: < RancorError > ( & legacy) ?. into_vec ( )
7577 } else {
7678 super :: encode_task_to_witness ( & witness) ?
7779 } ;
0 commit comments