Merge pull request #3623 from filecoin-project/feat/base-fee-tamping

introduce logic to perform base fee tamping around the upgrade time
This commit is contained in:
Jakub Sztandera 2020-09-07 22:43:34 +02:00 committed by GitHub
commit 8a018ce3ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 0 deletions

View File

@ -10,6 +10,9 @@ import (
"github.com/filecoin-project/specs-actors/actors/builtin/verifreg"
)
const UpgradeBreezeHeight = 0
const BreezeGasTampingDuration = 0
func init() {
power.ConsensusMinerMinPower = big.NewInt(2048)
miner.SupportedProofTypes = map[abi.RegisteredSealProof]struct{}{

View File

@ -69,4 +69,7 @@ var (
PackingEfficiencyNum int64 = 4
PackingEfficiencyDenom int64 = 5
UpgradeBreezeHeight abi.ChainEpoch = 0
BreezeGasTampingDuration abi.ChainEpoch = 0
)

View File

@ -12,6 +12,9 @@ import (
"github.com/filecoin-project/specs-actors/actors/builtin/power"
)
const UpgradeBreezeHeight = 41280
const BreezeGasTampingDuration = 120
func init() {
power.ConsensusMinerMinPower = big.NewInt(10 << 40)
miner.SupportedProofTypes = map[abi.RegisteredSealProof]struct{}{

View File

@ -40,6 +40,10 @@ func computeNextBaseFee(baseFee types.BigInt, gasLimitUsed int64, noOfBlocks int
}
func (cs *ChainStore) ComputeBaseFee(ctx context.Context, ts *types.TipSet) (abi.TokenAmount, error) {
if ts.Height() > build.UpgradeBreezeHeight && ts.Height() < build.UpgradeBreezeHeight+build.BreezeGasTampingDuration {
return abi.NewTokenAmount(100), nil
}
zero := abi.NewTokenAmount(0)
// totalLimit is sum of GasLimits of unique messages in a tipset