introduce logic to perform base fee tamping around the upgrade time
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
bea31fdcb0
commit
5654322f54
@ -12,6 +12,9 @@ import (
|
|||||||
"github.com/filecoin-project/specs-actors/actors/builtin/power"
|
"github.com/filecoin-project/specs-actors/actors/builtin/power"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const UpgradeBreezeHeight = 42000
|
||||||
|
const BreezeGasTampingDuration = 120
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
power.ConsensusMinerMinPower = big.NewInt(10 << 40)
|
power.ConsensusMinerMinPower = big.NewInt(10 << 40)
|
||||||
miner.SupportedProofTypes = map[abi.RegisteredSealProof]struct{}{
|
miner.SupportedProofTypes = map[abi.RegisteredSealProof]struct{}{
|
||||||
|
@ -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) {
|
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)
|
zero := abi.NewTokenAmount(0)
|
||||||
|
|
||||||
// totalLimit is sum of GasLimits of unique messages in a tipset
|
// totalLimit is sum of GasLimits of unique messages in a tipset
|
||||||
|
Loading…
Reference in New Issue
Block a user