diff --git a/chain/gen/slashfilter/slashfilter.go b/chain/gen/slashfilter/slashfilter.go index a73f3e2f6..cb12ddb08 100644 --- a/chain/gen/slashfilter/slashfilter.go +++ b/chain/gen/slashfilter/slashfilter.go @@ -2,6 +2,7 @@ package slashfilter import ( "fmt" + "github.com/filecoin-project/lotus/build" "golang.org/x/xerrors" @@ -27,7 +28,9 @@ func New(dstore ds.Batching) *SlashFilter { } func (f *SlashFilter) MinedBlock(bh *types.BlockHeader, parentEpoch abi.ChainEpoch) error { - if bh.Height < build.UpgradeOrangeHeight+build.Finality { + if bh.Height > build.UpgradeOrangeHeight-build.Finality && + bh.Height < build.UpgradeOrangeHeight+build.Finality { + // consenssus faults disabled during Upgrade Orange return nil } diff --git a/chain/vm/syscalls.go b/chain/vm/syscalls.go index ba6ee2f1d..b063e5f25 100644 --- a/chain/vm/syscalls.go +++ b/chain/vm/syscalls.go @@ -17,6 +17,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/network" + "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/actors/policy" @@ -107,11 +108,20 @@ func (ss *syscallShim) VerifyConsensusFault(a, b, extra []byte) (*runtime2.Conse return nil, xerrors.Errorf("cannot decode second block header: %f", decodeErr) } + // workaround chain halt + if blockA.Height > build.UpgradeOrangeHeight-build.Finality && + blockA.Height < build.UpgradeOrangeHeight+build.Finality { + return nil, xerrors.Errorf("consensus reporting disabled around Upgrade Orange") + } + if blockB.Height > build.UpgradeOrangeHeight-build.Finality && + blockB.Height < build.UpgradeOrangeHeight+build.Finality { + return nil, xerrors.Errorf("consensus reporting disabled around Upgrade Orange") + } + // are blocks the same? if blockA.Cid().Equals(blockB.Cid()) { return nil, fmt.Errorf("no consensus fault: submitted blocks are the same") } - // (1) check conditions necessary to any consensus fault // were blocks mined by same miner?