Skip to content

Commit

Permalink
fix(data_request): add extra filter on wit/2 activation epoch for dis…
Browse files Browse the repository at this point in the history
…abling the normal build flow of TooManyWitnesses tally
  • Loading branch information
drcpu-github committed Dec 18, 2024
1 parent 60de10f commit 90dd8f4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions data_structures/src/data_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use crate::{
Epoch, Hash, Hashable, PublicKeyHash, ValueTransferOutput,
},
error::{DataRequestError, TransactionError},
get_protocol_version_activation_epoch,
proto::versioning::{ProtocolVersion, VersionedHashable},
radon_report::{RadonReport, Stage, TypeLike},
transaction::{CommitTransaction, DRTransaction, RevealTransaction, TallyTransaction},
Expand Down Expand Up @@ -100,11 +101,15 @@ impl DataRequestPool {
if let DataRequestStage::TALLY = dr_state.stage {
// Do not resolve data requests requiring too many witnesses using the normal
// tally creation path, but resolve them when building a block.
if data_request_has_too_many_witnesses(
&dr_state.data_request,
validator_count,
epoch,
) {
let wit2_activation_epoch =
get_protocol_version_activation_epoch(ProtocolVersion::V2_0);
if dr_state.epoch >= wit2_activation_epoch
&& data_request_has_too_many_witnesses(
&dr_state.data_request,
validator_count,
epoch,
)
{
None
} else {
let mut reveals: Vec<RevealTransaction> =
Expand Down

0 comments on commit 90dd8f4

Please sign in to comment.