From a36ec27230d1713aed62dcedaa6b1d19e9b2e723 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Sun, 11 Oct 2020 21:14:51 +0200 Subject: [PATCH] Look at block base fee Signed-off-by: Jakub Sztandera --- cmd/lotus-pcr/main.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/lotus-pcr/main.go b/cmd/lotus-pcr/main.go index 5491e4af2..b5da05883 100644 --- a/cmd/lotus-pcr/main.go +++ b/cmd/lotus-pcr/main.go @@ -926,6 +926,11 @@ func (r *refunder) processTipsetStorageMinerActor(ctx context.Context, tipset *t return false, messageMethod, types.NewInt(0), nil } + if tipset.Blocks()[0].ParentBaseFee.GreaterThan(r.proveFeeCapMax) { + log.Debugw("skipping high base fee message", "method", messageMethod, "cid", msg.Cid, "miner", m.To, "basefee", tipset.Blocks()[0].ParentBaseFee, "fee_cap_max", r.proveFeeCapMax) + return false, messageMethod, types.NewInt(0), nil + } + var sn abi.SectorNumber var proveCommitSector miner0.ProveCommitSectorParams @@ -982,6 +987,11 @@ func (r *refunder) processTipsetStorageMinerActor(ctx context.Context, tipset *t return false, messageMethod, types.NewInt(0), nil } + if tipset.Blocks()[0].ParentBaseFee.GreaterThan(r.preFeeCapMax) { + log.Debugw("skipping high base fee message", "method", messageMethod, "cid", msg.Cid, "miner", m.To, "basefee", tipset.Blocks()[0].ParentBaseFee, "fee_cap_max", r.preFeeCapMax) + return false, messageMethod, types.NewInt(0), nil + } + var precommitInfo miner.SectorPreCommitInfo if err := precommitInfo.UnmarshalCBOR(bytes.NewBuffer(m.Params)); err != nil { log.Warnw("failed to decode precommit params", "err", err, "method", messageMethod, "cid", msg.Cid, "miner", m.To)