From fff69b50e017b5102f413dddb1a103c5fe0432c2 Mon Sep 17 00:00:00 2001 From: vlad Date: Mon, 7 Oct 2024 07:26:53 +0000 Subject: [PATCH] removed debug prints and restored logic on header vs validator set verification. --- .../shared/block-verifier/src/verify/header.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cosmwasm/enclaves/shared/block-verifier/src/verify/header.rs b/cosmwasm/enclaves/shared/block-verifier/src/verify/header.rs index 60b5930a2..1c78157cd 100644 --- a/cosmwasm/enclaves/shared/block-verifier/src/verify/header.rs +++ b/cosmwasm/enclaves/shared/block-verifier/src/verify/header.rs @@ -15,12 +15,6 @@ pub fn validate_block_header( height: u64, commit: Commit, ) -> Result { - println!( - "my validator set h={}, validators={}", - height, - validator_set.validators().len() - ); - let header =
>::decode(block_header_slice).map_err(|e| { error!("Error parsing header from proto: {:?}", e); sgx_status_t::SGX_ERROR_INVALID_PARAMETER @@ -31,16 +25,11 @@ pub fn validate_block_header( sgx_status_t::SGX_ERROR_INVALID_PARAMETER })?; - println!( - "proposed block height={}", - signed_header.header.height.value() - ); - // validate that we have the validator set for the current height if signed_header.header.height.value() != height { error!("Validator set height does not match stored validator set. Ignoring"); // we use this error code to signal that the validator set is not synced with the current block - //return Err(sgx_status_t::SGX_ERROR_FILE_RECOVERY_NEEDED); + return Err(sgx_status_t::SGX_ERROR_FILE_RECOVERY_NEEDED); } let untrusted_block = UntrustedBlockState {