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
4 changed files with 13 additions and 0 deletions
+3
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{}{
+3
View File
@@ -69,4 +69,7 @@ var (
PackingEfficiencyNum int64 = 4
PackingEfficiencyDenom int64 = 5
UpgradeBreezeHeight abi.ChainEpoch = 0
BreezeGasTampingDuration abi.ChainEpoch = 0
)
+3
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{}{
+4
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