feat: api: Clean API for Miners (#12112)

* proofparams alternate

* createminer

* const factored from /build and types updated to use it

* buildconstants for more places

* deprecate msg

* itest cleanup

* alerting interface

* house cleaning

* rm policy and drand from buildconstants

* clean up curio further

* aussie waffle

* pr fixes

* fix lints

* little fixes

* oops this got updated

* unbreak test builds

* test fixes

* comments - cleanups

* itests fix alerting

* rm obsolete alertinginterface

* spelling oops

* changelog

* tests need buildconstants port

* Fully migrate BlockGasTarget

* ulimit should not depend on build

* complete the simplest deprecations

* bringing back versions
This commit is contained in:
Andrew Jackson (Ajax)
2024-07-14 09:06:08 -05:00
committed by GitHub
parent a57dce3136
commit 21abfc69fb
64 changed files with 716 additions and 474 deletions

View File

@ -16,7 +16,7 @@ import (
"github.com/filecoin-project/go-state-types/big"
lapi "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/build/buildconstants"
"github.com/filecoin-project/lotus/chain/messagepool"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/node/config"
@ -712,7 +712,7 @@ var MpoolGasPerfCmd = &cli.Command{
baseFee := ts.Blocks()[0].ParentBaseFee
bigBlockGasLimit := big.NewInt(build.BlockGasLimit)
bigBlockGasLimit := big.NewInt(buildconstants.BlockGasLimit)
getGasReward := func(msg *types.SignedMessage) big.Int {
maxPremium := types.BigSub(msg.Message.GasFeeCap, baseFee)
@ -723,7 +723,7 @@ var MpoolGasPerfCmd = &cli.Command{
}
getGasPerf := func(gasReward big.Int, gasLimit int64) float64 {
// gasPerf = gasReward * build.BlockGasLimit / gasLimit
// gasPerf = gasReward * buildconstants.BlockGasLimit / gasLimit
a := new(stdbig.Rat).SetInt(new(stdbig.Int).Mul(gasReward.Int, bigBlockGasLimit.Int))
b := stdbig.NewRat(1, gasLimit)
c := new(stdbig.Rat).Mul(a, b)