mirror of
				https://source.quilibrium.com/quilibrium/ceremonyclient.git
				synced 2025-10-31 14:27:40 +00:00 
			
		
		
		
	fix: verify frame output size before sending to VDF verifier (#60)
This commit is contained in:
		
							parent
							
								
									a441e5455f
								
							
						
					
					
						commit
						b681d489e9
					
				| @ -103,6 +103,13 @@ func (w *WesolowskiFrameProver) VerifyMasterClockFrame( | |||||||
| 		) | 		) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	if len(frame.Output) != 516 { | ||||||
|  | 		return errors.Wrap( | ||||||
|  | 			errors.New("invalid output"), | ||||||
|  | 			"verify clock frame", | ||||||
|  | 		) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	b := sha3.Sum256(input) | 	b := sha3.Sum256(input) | ||||||
| 	v := vdf.New(frame.Difficulty, b) | 	v := vdf.New(frame.Difficulty, b) | ||||||
| 	proof := [516]byte{} | 	proof := [516]byte{} | ||||||
| @ -421,6 +428,13 @@ func (w *WesolowskiFrameProver) VerifyDataClockFrame( | |||||||
| 		) | 		) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	if len(frame.Output) != 516 { | ||||||
|  | 		return errors.Wrap( | ||||||
|  | 			errors.New("invalid output"), | ||||||
|  | 			"verify clock frame", | ||||||
|  | 		) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	b := sha3.Sum256(input) | 	b := sha3.Sum256(input) | ||||||
| 	v := vdf.New(frame.Difficulty, b) | 	v := vdf.New(frame.Difficulty, b) | ||||||
| 	proof := [516]byte{} | 	proof := [516]byte{} | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Cassandra Heart
						Cassandra Heart