diff --git a/CHANGELOG.md b/CHANGELOG.md index 2065d909139..ae90ad6c8b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ This is the stable release of Lotus node v1.35.1, a patch release that extends E ## 👌 Improvements - fix(gateway): return `ErrFilterNotFound` error instead of empty result for unknown filter IDs in `EthGetFilterLogs` ([filecoin-project/lotus#13519](https://github.com/filecoin-project/lotus/pull/13519)) -- feat(basefee)!: premium-based base fee adjustment (FIP-0115), which may be included in a future upgrade ([filecoin-project/lotus#13531](https://github.com/filecoin-project/lotus/pull/13531)) +- feat(basefee)!: premium-based base fee adjustment, activating in nv28 ([filecoin-project/lotus#13531](https://github.com/filecoin-project/lotus/pull/13531)) - fix(eth): handle nil address in trace_filter for failed contract creates ([filecoin-project/lotus#13549](https://github.com/filecoin-project/lotus/pull/13549)) - fix(gas): stricter bounds for GasEstimateGasPremium lookback ([filecoin-project/lotus#13555](https://github.com/filecoin-project/lotus/pull/13555)) - fix(api): `StateSearchMsg` should respect `lookbackLimit` [filecoin-project/lotus#13562](https://github.com/filecoin-project/lotus/pull/13562) diff --git a/chain/store/basefee.go b/chain/store/basefee.go index f549bb98af9..9423d7806fa 100644 --- a/chain/store/basefee.go +++ b/chain/store/basefee.go @@ -54,10 +54,10 @@ func (cs *ChainStore) ComputeBaseFee(ctx context.Context, ts *types.TipSet) (abi if buildconstants.UpgradeBreezeHeight >= 0 && ts.Height() > buildconstants.UpgradeBreezeHeight && ts.Height() < buildconstants.UpgradeBreezeHeight+buildconstants.BreezeGasTampingDuration { return abi.NewTokenAmount(100), nil } - if cs.fip0115BaseFeeHeight >= 0 && ts.Height() >= cs.fip0115BaseFeeHeight { - return cs.ComputeNextBaseFeeFromPremiums(ctx, ts) + if ts.Height() < buildconstants.UpgradeFireHorseHeight { + return cs.ComputeNextBaseFeeFromUtilization(ctx, ts) } - return cs.ComputeNextBaseFeeFromUtilization(ctx, ts) + return cs.ComputeNextBaseFeeFromPremiums(ctx, ts) } func (cs *ChainStore) ComputeNextBaseFeeFromUtilization(ctx context.Context, ts *types.TipSet) (abi.TokenAmount, error) { diff --git a/chain/store/store.go b/chain/store/store.go index c28ddcd1613..438c0a7855e 100644 --- a/chain/store/store.go +++ b/chain/store/store.go @@ -129,8 +129,6 @@ type ChainStore struct { storeEvents bool - fip0115BaseFeeHeight abi.ChainEpoch - cancelFn context.CancelFunc wg sync.WaitGroup } @@ -158,7 +156,6 @@ func NewChainStore(chainBs bstore.Blockstore, stateBs bstore.Blockstore, ds dsto tsCache: tsc, cancelFn: cancel, journal: j, - fip0115BaseFeeHeight: -1, } cs.evtTypes = [1]journal.EventType{ @@ -1332,12 +1329,6 @@ func (cs *ChainStore) IsStoringEvents() bool { return cs.storeEvents } -// SetFIP0115Height sets the epoch at which FIP-0115 base fee calculation activates. -// A value of -1 disables it. -func (cs *ChainStore) SetFIP0115Height(height int64) { - cs.fip0115BaseFeeHeight = abi.ChainEpoch(height) -} - // true if ts1 wins according to the filecoin tie-break rule func breakWeightTie(ts1, ts2 *types.TipSet) bool { s := len(ts1.Blocks()) diff --git a/documentation/en/default-lotus-config.toml b/documentation/en/default-lotus-config.toml index 900b23a230d..b779c1c28e6 100644 --- a/documentation/en/default-lotus-config.toml +++ b/documentation/en/default-lotus-config.toml @@ -147,14 +147,6 @@ # env var: LOTUS_FEES_DEFAULTMAXFEE #DefaultMaxFee = "0.07 FIL" - # FIP0115Height sets the epoch at which FIP-0115 base fee calculation activates. - # Set to -1 to disable. - # WARNING: This is a consensus-breaking change and should only be used for testing. - # - # type: int64 - # env var: LOTUS_FEES_FIP0115HEIGHT - #FIP0115Height = -1 - [Chainstore] # type: bool diff --git a/node/builder.go b/node/builder.go index a87437b3e37..107c0e6f4e5 100644 --- a/node/builder.go +++ b/node/builder.go @@ -134,7 +134,6 @@ const ( SetApiEndpointKey StoreEventsKey - SetFIP0115BaseFeeHeightKey InitChainIndexerKey InitApiV2Key diff --git a/node/builder_chain.go b/node/builder_chain.go index 5f6140d51fe..523e1a830c2 100644 --- a/node/builder_chain.go +++ b/node/builder_chain.go @@ -273,10 +273,6 @@ func ConfigFullNode(c interface{}) Option { // as it enables us to serve logs in eth_getTransactionReceipt. If(cfg.Fevm.EnableEthRPC || cfg.Events.EnableActorEventsAPI || cfg.ChainIndexer.EnableIndexer, Override(StoreEventsKey, modules.EnableStoringEvents)), - Override(SetFIP0115BaseFeeHeightKey, func(cs *store.ChainStore) { - cs.SetFIP0115Height(cfg.Fees.FIP0115Height) - }), - If(cfg.Wallet.RemoteBackend != "", Override(new(*remotewallet.RemoteWallet), remotewallet.SetupRemoteWallet(cfg.Wallet.RemoteBackend)), ), diff --git a/node/config/def.go b/node/config/def.go index 0599a812535..5f8fab4b2ef 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -67,7 +67,6 @@ func DefaultFullNode() *FullNode { Fees: FeeConfig{ DefaultMaxFee: DefaultDefaultMaxFee(), - FIP0115Height: -1, }, Chainstore: Chainstore{ diff --git a/node/config/doc_gen.go b/node/config/doc_gen.go index 485c0f31d87..edebff5c2bb 100644 --- a/node/config/doc_gen.go +++ b/node/config/doc_gen.go @@ -270,14 +270,6 @@ rewards. This address should have adequate funds to cover gas fees.`, Comment: ``, }, - { - Name: "FIP0115Height", - Type: "int64", - - Comment: `FIP0115Height sets the epoch at which FIP-0115 base fee calculation activates. -Set to -1 to disable. -WARNING: This is a consensus-breaking change and should only be used for testing.`, - }, }, "FevmConfig": { { diff --git a/node/config/types.go b/node/config/types.go index 13686a33b00..20f0db71221 100644 --- a/node/config/types.go +++ b/node/config/types.go @@ -525,11 +525,6 @@ type Wallet struct { type FeeConfig struct { DefaultMaxFee types.FIL - - // FIP0115Height sets the epoch at which FIP-0115 base fee calculation activates. - // Set to -1 to disable. - // WARNING: This is a consensus-breaking change and should only be used for testing. - FIP0115Height int64 } type FevmConfig struct {