File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- use aligned_sdk:: {
2- common:: {
3- constants:: CBOR_ARRAY_MAX_OVERHEAD ,
4- types:: { NoncedVerificationData , VerificationDataCommitment } ,
5- } ,
1+ use aligned_sdk:: common:: {
2+ constants:: CBOR_ARRAY_MAX_OVERHEAD ,
3+ types:: { NoncedVerificationData , VerificationDataCommitment } ,
64} ;
75use ethers:: types:: { Address , Signature , U256 } ;
86use priority_queue:: PriorityQueue ;
@@ -172,7 +170,9 @@ pub(crate) fn extract_batch_directly(
172170 let ( rejected_entry, rejected_priority) = batch_queue. pop ( ) . unwrap ( ) ;
173171
174172 // Update batch size
175- let verification_data_size = rejected_entry. nonced_verification_data . cbor_size_upper_bound ( ) ;
173+ let verification_data_size = rejected_entry
174+ . nonced_verification_data
175+ . cbor_size_upper_bound ( ) ;
176176 batch_size -= verification_data_size;
177177
178178 rejected_entries. push ( ( rejected_entry, rejected_priority) ) ;
Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ pub struct VerificationData {
7272 pub proof_generator_addr : Address ,
7373}
7474
75-
7675#[ derive( Debug , Serialize , Deserialize , Clone ) ]
7776pub struct NoncedVerificationData {
7877 pub verification_data : VerificationData ,
@@ -104,25 +103,25 @@ impl NoncedVerificationData {
104103 pub fn cbor_size_upper_bound ( & self ) -> usize {
105104 const CBOR_OVERHEAD_BYTES : usize = 256 ;
106105 let mut total_size = 0 ;
107-
106+
108107 // Add length of proof Vec<u8>
109108 total_size += self . verification_data . proof . len ( ) ;
110-
109+
111110 // Add length of pub_input Option<Vec<u8>>
112111 if let Some ( ref pub_input) = self . verification_data . pub_input {
113112 total_size += pub_input. len ( ) ;
114113 }
115-
114+
116115 // Add length of verification_key Option<Vec<u8>>
117116 if let Some ( ref verification_key) = self . verification_data . verification_key {
118117 total_size += verification_key. len ( ) ;
119118 }
120-
119+
121120 // Add length of vm_program_code Option<Vec<u8>>
122121 if let Some ( ref vm_program_code) = self . verification_data . vm_program_code {
123122 total_size += vm_program_code. len ( ) ;
124123 }
125-
124+
126125 // Add overhead bytes for the full NoncedVerificationData structure
127126 total_size + CBOR_OVERHEAD_BYTES
128127 }
You can’t perform that action at this time.
0 commit comments