Skip to content

Commit

Permalink
revert failed BlockGasLimit change in Upgrade8GiBSector
Browse files Browse the repository at this point in the history
  • Loading branch information
codefather-filestar committed Jul 23, 2021
1 parent 6aab4f4 commit 2e3a47c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
4 changes: 2 additions & 2 deletions build/params_shared_vals.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ const VerifSigCacheSize = 32000
// TODO: If this is gonna stay, it should move to specs-actors
const BlockMessageLimit = 10000

var BlockGasLimit = int64(10_000_000_000)
var BlockGasTarget = BlockGasLimit / 2
const BlockGasLimit = 10_000_000_000
const BlockGasTarget = BlockGasLimit / 2

const BaseFeeMaxChangeDenom = 8 // 12.5%
const InitialBaseFee = 100e6
Expand Down
16 changes: 1 addition & 15 deletions chain/stmgr/forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"context"
"encoding/binary"
"github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/lotus/chain/gen/genesis"
cron2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/cron"
"math"
Expand Down Expand Up @@ -97,7 +96,7 @@ func DefaultUpgradeSchedule() UpgradeSchedule {
}, {
Height: build.Upgrade8GiBSectorHeight,
Network: network.Version7,
Migration: Upgrade8GiBSector,
Migration: nil,
}, {
Height: build.UpgradeStakeHeight,
Network: network.Version8,
Expand Down Expand Up @@ -664,19 +663,6 @@ func UpgradeLiftoff(ctx context.Context, sm *StateManager, cb ExecCallback, root
return tree.Flush(ctx)
}

func Upgrade8GiBSector(ctx context.Context, sm *StateManager, cb ExecCallback, root cid.Cid, epoch abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) {
tree, err := sm.StateTree(root)
if err != nil {
return cid.Undef, xerrors.Errorf("getting state tree: %w", err)
}
policy.AddSupportedProofTypes(
abi.RegisteredSealProof_StackedDrg8GiBV1,
)
build.BlockGasLimit = build.BlockGasLimit * 4
build.BlockGasTarget = build.BlockGasTarget * 4
return tree.Flush(ctx)
}

func UpgradeStake(ctx context.Context, sm *StateManager, cb ExecCallback, root cid.Cid, epoch abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) {
tree, err := sm.StateTree(root)
if err != nil {
Expand Down

0 comments on commit 2e3a47c

Please sign in to comment.