Merge pull request #4313 from filecoin-project/fix/pcr-basefee

Look at block base fee for PCR
This commit is contained in:
Łukasz Magiera 2020-10-22 15:32:01 +02:00 committed by GitHub
commit f5960df544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -928,6 +928,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
@ -984,6 +989,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)