Skip to content

Commit d9641e0

Browse files
committed
fix(validations): do not validate VRF value for commits in wit/2
1 parent d3bb323 commit d9641e0

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

validations/src/validations.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -749,13 +749,19 @@ pub fn validate_commit_transaction(
749749
let pkh = proof_pkh;
750750
let backup_witnesses = dr_state.backup_witnesses();
751751
let num_witnesses = dr_output.witnesses + backup_witnesses;
752-
let (target_hash, _) = calculate_reppoe_threshold(
753-
rep_eng,
754-
&pkh,
755-
num_witnesses,
756-
minimum_reppoe_difficulty,
757-
active_wips,
758-
);
752+
let target_hash = if protocol_version < ProtocolVersion::V2_0 {
753+
let (target_hash, _) = calculate_reppoe_threshold(
754+
rep_eng,
755+
&pkh,
756+
num_witnesses,
757+
minimum_reppoe_difficulty,
758+
active_wips,
759+
);
760+
761+
target_hash
762+
} else {
763+
Hash::max()
764+
};
759765
add_dr_vrf_signature_to_verify(
760766
signatures_to_verify,
761767
&co_tx.body.proof,

0 commit comments

Comments
 (0)