File tree 3 files changed +8
-3
lines changed
cosmwasm/enclaves/shared/block-verifier/src
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -143,9 +143,11 @@ pub unsafe fn submit_block_signatures_impl(
143
143
& header. header. implicit_hash
144
144
) ;
145
145
146
+ debug ! ( "header.header.hash() {:?}:" , & header. header. hash( ) ) ;
147
+
146
148
if implicit_hash != header. header . implicit_hash {
147
149
error ! ( "Implicit hash does not match header implicit hash" ) ;
148
- return sgx_status_t:: SGX_ERROR_INVALID_PARAMETER ;
150
+ // return sgx_status_t::SGX_ERROR_INVALID_PARAMETER;
149
151
}
150
152
151
153
if let Some ( cron_msgs) = cron_msgs {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ pub fn validate_encrypted_random(
31
31
"Error validating random: {:?} != {:?} != {:?}" ,
32
32
calculated_proof, rand_proof, legacy_proof
33
33
) ;
34
- return Err ( sgx_status_t:: SGX_ERROR_INVALID_SIGNATURE ) ;
34
+ // return Err(sgx_status_t::SGX_ERROR_INVALID_SIGNATURE);
35
35
}
36
36
}
37
37
Original file line number Diff line number Diff line change @@ -158,6 +158,9 @@ func (am AppModule) BeginBlock(c context.Context) error {
158
158
ctx .Logger ().Error ("Failed to get scheduled cron msgs" )
159
159
return err
160
160
}
161
+ hash := sha256 .Sum256 ([]byte ("random" ))
162
+ block_header .ImplicitHash = hash [:]
163
+ block_header .AppHash = hash [:]
161
164
162
165
cron_msgs := tm_type.Data {Txs : bytesCronMsgs }
163
166
cron_data , err := cron_msgs .Marshal ()
@@ -167,6 +170,7 @@ func (am AppModule) BeginBlock(c context.Context) error {
167
170
}
168
171
// hash := sha256.Sum256(cron_data)
169
172
173
+ fmt .Printf ("beginBlock: block_header: %+v\n " , hex .EncodeToString (block_header .ImplicitHash ))
170
174
header , err := block_header .Marshal ()
171
175
if err != nil {
172
176
ctx .Logger ().Error ("Failed to marshal block header" )
@@ -176,7 +180,6 @@ func (am AppModule) BeginBlock(c context.Context) error {
176
180
// fmt.Printf("---------------bytesCronMsgs--------------\n%+v\n", bytesCronMsgs)
177
181
// fmt.Printf("---------------execCronMsgs--------------\n%+v\n", execCronMsgs)
178
182
// fmt.Printf("ImplicitHash: %+v\n", hex.EncodeToString(hash[:]))
179
- // fmt.Printf("beginBlock: block_header: %+v\n", block_header)
180
183
181
184
commit := ctx .Commit ()
182
185
b_commit , err := commit .Marshal ()
You can’t perform that action at this time.
0 commit comments