From 1f56bcf581c84f130acb622b30ee7891b00a7b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 5 Nov 2019 17:15:52 +0100 Subject: [PATCH] Some param changes --- build/params.go | 5 ++++- chain/actors/actor_miner.go | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build/params.go b/build/params.go index ef55c01bd..cd2fc738c 100644 --- a/build/params.go +++ b/build/params.go @@ -55,7 +55,7 @@ const Finality = 500 // Proofs // Blocks -const ProvingPeriodDuration = 60 +const ProvingPeriodDuration = 300 // PoStChallangeTime sets the window in which post computation should happen // Blocks @@ -71,6 +71,9 @@ const PoStRandomnessLookback = 1 // Blocks const SealRandomnessLookback = Finality +// Blocks +const SealRandomnessLookbackLimit = SealRandomnessLookback + 2000 + // ///// // Mining diff --git a/chain/actors/actor_miner.go b/chain/actors/actor_miner.go index 2ec36a253..963a469e9 100644 --- a/chain/actors/actor_miner.go +++ b/chain/actors/actor_miner.go @@ -231,8 +231,8 @@ func (sma StorageMinerActor) PreCommitSector(act *types.Actor, vmctx types.VMCon return nil, aerrors.Newf(1, "sector commitment must be based off past randomness (%d >= %d)", params.Epoch, vmctx.BlockHeight()+build.SealRandomnessLookback) } - if vmctx.BlockHeight()-params.Epoch+build.SealRandomnessLookback > 1000 { - return nil, aerrors.New(2, "sector commitment must be recent enough") + if vmctx.BlockHeight()-params.Epoch+build.SealRandomnessLookback > build.SealRandomnessLookbackLimit { + return nil, aerrors.Newf(2, "sector commitment must be recent enough (was %d)", vmctx.BlockHeight()-params.Epoch+build.SealRandomnessLookback) } mi, err := loadMinerInfo(vmctx, self)