File tree Expand file tree Collapse file tree
aggregation_programs/sp1/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ impl SP1VkAndPubInputs {
1111 pub fn hash ( & self ) -> [ u8 ; 32 ] {
1212 let mut hasher = Keccak256 :: new ( ) ;
1313 for & word in & self . vk {
14- hasher. update ( word. to_le_bytes ( ) ) ;
14+ hasher. update ( word. to_be_bytes ( ) ) ;
1515 }
1616 hasher. update ( & self . public_inputs ) ;
1717 hasher. finalize ( ) . into ( )
Original file line number Diff line number Diff line change @@ -22,9 +22,8 @@ pub struct SP1ProofWithPubValuesAndElf {
2222impl SP1ProofWithPubValuesAndElf {
2323 pub fn hash_vk_and_pub_inputs ( & self ) -> [ u8 ; 32 ] {
2424 let mut hasher = Keccak256 :: new ( ) ;
25- for & word in & self . vk ( ) . hash_u32 ( ) {
26- hasher. update ( word. to_le_bytes ( ) ) ;
27- }
25+ let vk_bytes = & self . vk ( ) . hash_bytes ( ) ;
26+ hasher. update ( vk_bytes) ;
2827 hasher. update ( self . proof_with_pub_values . public_values . as_slice ( ) ) ;
2928 hasher. finalize ( ) . into ( )
3029 }
You can’t perform that action at this time.
0 commit comments