Skip to content

Commit

Permalink
Merge pull request #4313 from filecoin-project/fix/pcr-basefee
Browse files Browse the repository at this point in the history
Look at block base fee for PCR
  • Loading branch information
magik6k authored Oct 22, 2020
2 parents 93227bf + a36ec27 commit f5960df
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/lotus-pcr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f5960df

Please sign in to comment.