Skip to content

Commit

Permalink
allow legacy proof specs without prehash_key_before_comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
avahowell committed Sep 15, 2023
1 parent 4bb834b commit 61c4e90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/core/component/ibc/src/component/client_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ pub fn validate_penumbra_client_state(

// check client proof specs match penumbra proof specs
if PENUMBRA_PROOF_SPECS.clone() != tm_client_state.proof_specs {
anyhow::bail!("invalid client state: proof specs do not match");
// allow legacy proof specs without prehash_key_before_comparison
let mut spec_with_prehash_key = tm_client_state.proof_specs.clone();
spec_with_prehash_key[0].prehash_key_before_comparison = true;
if PENUMBRA_PROOF_SPECS.clone() != spec_with_prehash_key {
anyhow::bail!("invalid client state: proof specs do not match");
}
}

// check that the trust level is correct
Expand Down

0 comments on commit 61c4e90

Please sign in to comment.