diff --git a/chain/actors/policy/policy.go b/chain/actors/policy/policy.go index 8606119f0..f29da9802 100644 --- a/chain/actors/policy/policy.go +++ b/chain/actors/policy/policy.go @@ -97,3 +97,13 @@ func DealProviderCollateralBounds( panic("unsupported network version") } } + +// Sets the challenge window and scales the proving period to match (such that +// there are always 48 challenge windows in a proving period). +func SetWPoStChallengeWindow(period abi.ChainEpoch) { + miner0.WPoStChallengeWindow = period + miner0.WPoStProvingPeriod = period * abi.ChainEpoch(miner0.WPoStPeriodDeadlines) + + miner2.WPoStChallengeWindow = period + miner2.WPoStProvingPeriod = period * abi.ChainEpoch(miner2.WPoStPeriodDeadlines) +} diff --git a/chain/actors/policy/policy_test.go b/chain/actors/policy/policy_test.go index 8d6aac09f..62e7f8964 100644 --- a/chain/actors/policy/policy_test.go +++ b/chain/actors/policy/policy_test.go @@ -43,5 +43,8 @@ func TestAssumptions(t *testing.T) { require.EqualValues(t, miner0.SupportedProofTypes, miner2.SupportedProofTypes) require.Equal(t, miner0.PreCommitChallengeDelay, miner2.PreCommitChallengeDelay) require.Equal(t, miner0.ChainFinality, miner2.ChainFinality) + require.Equal(t, miner0.WPoStChallengeWindow, miner2.WPoStChallengeWindow) + require.Equal(t, miner0.WPoStProvingPeriod, miner2.WPoStProvingPeriod) + require.Equal(t, miner0.WPoStPeriodDeadlines, miner2.WPoStPeriodDeadlines) require.True(t, verifreg0.MinVerifiedDealSize.Equals(verifreg2.MinVerifiedDealSize)) } diff --git a/extern/oni b/extern/oni index 9a0d5cd73..a5b57068d 160000 --- a/extern/oni +++ b/extern/oni @@ -1 +1 @@ -Subproject commit 9a0d5cd739de77b357589ac1fc8b756ed27299be +Subproject commit a5b57068d4c2ee0fda76f053edf9825613d1fe9b