diff --git a/CHANGELOG.md b/CHANGELOG.md index f07dce0ac8e..ff1140aa606 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,10 +20,12 @@ - chore: upgrade to a minimum Golang version of `1.23.6` ([filecoin-project/lotus#12910](https://github.com/filecoin-project/lotus/pull/12910) - feat: add a `LOTUS_DISABLE_F3_ACTIVATION` enviroment variable allowing disabling F3 activation for a specific contract address or epoch ([filecoin-project/lotus#12920](https://github.com/filecoin-project/lotus/pull/12920)). The `LOTUS_DISABLE_F3` env-var has been renamed to `LOTUS_DISABLE_F3_SUBSYSTEM` to distinguish it from the other F3-related environment variables: `LOTUS_DISABLE_F3_PASSIVE_TESTING` and `LOTUS_DISABLE_F3_ACTIVATION`. - feat: add `GenesisTimestamp` field to `StateGetNetworkParams` response ([filecoin-project/lotus#12925](https://github.com/filecoin-project/lotus/pull/12925)) -- chore: upgrade drand client +- chore: upgrade drand client. ([filecoin-project/lotus#12830](https://github.com/filecoin-project/lotus/pull/12830)) - chore: upgrade go-state-types with big.Int{} change that means an empty big.Int is now treated as zero for all operations ([filecoin-project/lotus#12936](https://github.com/filecoin-project/lotus/pull/12936)) - feat: expose `ChainGetMessagesInTipset` in the Lotus Gateway API ([filecoin-project/lotus#12947](https://github.com/filecoin-project/lotus/pull/12947)) - feat: add `Agent` to the `Filecoin.Version` response ([#12904](https://github.com/filecoin-project/lotus/issues/12904)) that will be used to identify the node type. +- fix!: change circulating supply calculation for calibnet, butterflynet and 2k for nv25 upgrade. ([filecoin-project/lotus#12938](https://github.com/filecoin-project/lotus/pull/12938)) +- feat: add DailyFee integration tests ([filecoin-project/lotus#12942](https://github.com/filecoin-project/lotus/pull/12942)) # UNRELEASED v.1.32.0 diff --git a/api/api_full.go b/api/api_full.go index 9d39606ba7b..cf492db1469 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -1398,6 +1398,7 @@ const ( type Deadline struct { PostSubmissions bitfield.BitField DisputableProofCount uint64 + DailyFee abi.TokenAmount } type Partition struct { diff --git a/api/api_gateway.go b/api/api_gateway.go index 6e39bd10f01..252bf92796e 100644 --- a/api/api_gateway.go +++ b/api/api_gateway.go @@ -10,7 +10,7 @@ import ( "github.com/filecoin-project/go-f3/certs" "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-state-types/abi" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/dline" apitypes "github.com/filecoin-project/lotus/api/types" diff --git a/api/mocks/mock_full.go b/api/mocks/mock_full.go index 970d14dd901..bb7b99781ae 100644 --- a/api/mocks/mock_full.go +++ b/api/mocks/mock_full.go @@ -28,17 +28,16 @@ import ( auth "github.com/filecoin-project/go-jsonrpc/auth" abi "github.com/filecoin-project/go-state-types/abi" big "github.com/filecoin-project/go-state-types/big" - miner "github.com/filecoin-project/go-state-types/builtin/v13/miner" + miner "github.com/filecoin-project/go-state-types/builtin/v16/miner" + verifreg "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" paych "github.com/filecoin-project/go-state-types/builtin/v8/paych" - miner0 "github.com/filecoin-project/go-state-types/builtin/v9/miner" - verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" crypto "github.com/filecoin-project/go-state-types/crypto" dline "github.com/filecoin-project/go-state-types/dline" network "github.com/filecoin-project/go-state-types/network" api "github.com/filecoin-project/lotus/api" apitypes "github.com/filecoin-project/lotus/api/types" - miner1 "github.com/filecoin-project/lotus/chain/actors/builtin/miner" + miner0 "github.com/filecoin-project/lotus/chain/actors/builtin/miner" types "github.com/filecoin-project/lotus/chain/types" ethtypes "github.com/filecoin-project/lotus/chain/types/ethtypes" alerting "github.com/filecoin-project/lotus/journal/alerting" @@ -3453,7 +3452,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerInfo(arg0, arg1, arg2 interface{}) } // StateMinerInitialPledgeCollateral mocks base method. -func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { +func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(big.Int) @@ -3513,7 +3512,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerPower(arg0, arg1, arg2 interface{} } // StateMinerPreCommitDepositForPower mocks base method. -func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { +func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(big.Int) @@ -3678,10 +3677,10 @@ func (mr *MockFullNodeMockRecorder) StateSearchMsg(arg0, arg1, arg2, arg3, arg4 } // StateSectorExpiration mocks base method. -func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorExpiration, error) { +func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorExpiration, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateSectorExpiration", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*miner1.SectorExpiration) + ret0, _ := ret[0].(*miner0.SectorExpiration) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -3708,10 +3707,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorGetInfo(arg0, arg1, arg2, arg3 in } // StateSectorPartition mocks base method. -func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorLocation, error) { +func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorLocation, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*miner1.SectorLocation) + ret0, _ := ret[0].(*miner0.SectorLocation) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -3723,10 +3722,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorPartition(arg0, arg1, arg2, arg3 } // StateSectorPreCommitInfo mocks base method. -func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorPreCommitOnChainInfo, error) { +func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*miner0.SectorPreCommitOnChainInfo) + ret0, _ := ret[0].(*miner.SectorPreCommitOnChainInfo) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/api/proxy_gen.go b/api/proxy_gen.go index 3a1f8ad050d..b061ffffeaf 100644 --- a/api/proxy_gen.go +++ b/api/proxy_gen.go @@ -24,8 +24,8 @@ import ( "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/go-state-types/abi" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/builtin/v8/paych" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" abinetwork "github.com/filecoin-project/go-state-types/network" diff --git a/api/types.go b/api/types.go index d4d34f718b0..6943d127e35 100644 --- a/api/types.go +++ b/api/types.go @@ -194,6 +194,7 @@ type ForkUpgradeParams struct { UpgradeWaffleHeight abi.ChainEpoch UpgradeTuktukHeight abi.ChainEpoch UpgradeTeepHeight abi.ChainEpoch + UpgradeTockHeight abi.ChainEpoch } // ChainExportConfig holds configuration for chain ranged exports. diff --git a/api/v0api/full.go b/api/v0api/full.go index b1e196211d4..50e748041a7 100644 --- a/api/v0api/full.go +++ b/api/v0api/full.go @@ -9,8 +9,8 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-state-types/abi" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/builtin/v8/paych" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" abinetwork "github.com/filecoin-project/go-state-types/network" diff --git a/api/v0api/gateway.go b/api/v0api/gateway.go index 1a7f7d3ac92..93b01b9c464 100644 --- a/api/v0api/gateway.go +++ b/api/v0api/gateway.go @@ -8,7 +8,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/dline" abinetwork "github.com/filecoin-project/go-state-types/network" diff --git a/api/v0api/proxy_gen.go b/api/v0api/proxy_gen.go index a8756894951..cca5d95082a 100644 --- a/api/v0api/proxy_gen.go +++ b/api/v0api/proxy_gen.go @@ -12,8 +12,8 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-state-types/abi" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/builtin/v8/paych" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" abinetwork "github.com/filecoin-project/go-state-types/network" diff --git a/api/v0api/v0mocks/mock_full.go b/api/v0api/v0mocks/mock_full.go index 092d93b67bf..ec34e16831d 100644 --- a/api/v0api/v0mocks/mock_full.go +++ b/api/v0api/v0mocks/mock_full.go @@ -23,17 +23,16 @@ import ( auth "github.com/filecoin-project/go-jsonrpc/auth" abi "github.com/filecoin-project/go-state-types/abi" big "github.com/filecoin-project/go-state-types/big" - miner "github.com/filecoin-project/go-state-types/builtin/v13/miner" + miner "github.com/filecoin-project/go-state-types/builtin/v16/miner" + verifreg "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" paych "github.com/filecoin-project/go-state-types/builtin/v8/paych" - miner0 "github.com/filecoin-project/go-state-types/builtin/v9/miner" - verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" crypto "github.com/filecoin-project/go-state-types/crypto" dline "github.com/filecoin-project/go-state-types/dline" network "github.com/filecoin-project/go-state-types/network" api "github.com/filecoin-project/lotus/api" apitypes "github.com/filecoin-project/lotus/api/types" - miner1 "github.com/filecoin-project/lotus/chain/actors/builtin/miner" + miner0 "github.com/filecoin-project/lotus/chain/actors/builtin/miner" types "github.com/filecoin-project/lotus/chain/types" alerting "github.com/filecoin-project/lotus/journal/alerting" dtypes "github.com/filecoin-project/lotus/node/modules/dtypes" @@ -2296,7 +2295,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerInfo(arg0, arg1, arg2 interface{}) } // StateMinerInitialPledgeCollateral mocks base method. -func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { +func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(big.Int) @@ -2341,7 +2340,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerPower(arg0, arg1, arg2 interface{} } // StateMinerPreCommitDepositForPower mocks base method. -func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { +func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(big.Int) @@ -2521,10 +2520,10 @@ func (mr *MockFullNodeMockRecorder) StateSearchMsgLimited(arg0, arg1, arg2 inter } // StateSectorExpiration mocks base method. -func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorExpiration, error) { +func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorExpiration, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateSectorExpiration", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*miner1.SectorExpiration) + ret0, _ := ret[0].(*miner0.SectorExpiration) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -2551,10 +2550,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorGetInfo(arg0, arg1, arg2, arg3 in } // StateSectorPartition mocks base method. -func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorLocation, error) { +func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorLocation, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*miner1.SectorLocation) + ret0, _ := ret[0].(*miner0.SectorLocation) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -2566,10 +2565,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorPartition(arg0, arg1, arg2, arg3 } // StateSectorPreCommitInfo mocks base method. -func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (miner0.SectorPreCommitOnChainInfo, error) { +func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(miner0.SectorPreCommitOnChainInfo) + ret0, _ := ret[0].(miner.SectorPreCommitOnChainInfo) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/build/actors/v16.tar.zst b/build/actors/v16.tar.zst index bb764108bdb..0117d85f91c 100644 Binary files a/build/actors/v16.tar.zst and b/build/actors/v16.tar.zst differ diff --git a/build/buildconstants/params_2k.go b/build/buildconstants/params_2k.go index 8679aada4ca..7b0614007dd 100644 --- a/build/buildconstants/params_2k.go +++ b/build/buildconstants/params_2k.go @@ -65,29 +65,33 @@ var UpgradeThunderHeight = abi.ChainEpoch(-23) var UpgradeWatermelonHeight = abi.ChainEpoch(-24) +// This fix upgrade only ran on calibrationnet +const UpgradeWatermelonFixHeight = -100 + +// This fix upgrade only ran on calibrationnet +const UpgradeWatermelonFix2Height = -101 + var UpgradeDragonHeight = abi.ChainEpoch(-24) +// This fix upgrade only ran on calibrationnet +const UpgradeCalibrationDragonFixHeight = -102 + var UpgradePhoenixHeight = abi.ChainEpoch(-25) var UpgradeWaffleHeight = abi.ChainEpoch(-26) var UpgradeTuktukHeight = abi.ChainEpoch(-27) -var UpgradeTeepHeight = abi.ChainEpoch(200) - // FIP-0081: for the power actor state for pledge calculations. // UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after // Tuktuk migration. along with a RampStartEpoch matching the upgrade height. var UpgradeTuktukPowerRampDurationEpochs uint64 = 200 -// This fix upgrade only ran on calibrationnet -const UpgradeWatermelonFixHeight = -100 +var UpgradeTeepHeight = abi.ChainEpoch(200) -// This fix upgrade only ran on calibrationnet -const UpgradeWatermelonFix2Height = -101 +var UpgradeTeepInitialFilReserved = wholeFIL(1_400_000_000) // FIP-0100: 300M -> 1.4B FIL -// This fix upgrade only ran on calibrationnet -const UpgradeCalibrationDragonFixHeight = -102 +var UpgradeTockHeight = abi.ChainEpoch(300) var DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandQuicknet, @@ -166,6 +170,7 @@ func init() { UpgradePhoenixHeight = getUpgradeHeight("LOTUS_PHOENIX_HEIGHT", UpgradePhoenixHeight) UpgradeTuktukHeight = getUpgradeHeight("LOTUS_TUKTUK_HEIGHT", UpgradeTuktukHeight) UpgradeTeepHeight = getUpgradeHeight("LOTUS_TEEP_HEIGHT", UpgradeTeepHeight) + UpgradeTockHeight = getUpgradeHeight("LOTUS_TOCK_HEIGHT", UpgradeTockHeight) DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandQuicknet, diff --git a/build/buildconstants/params_butterfly.go b/build/buildconstants/params_butterfly.go index 7d26b28faca..363a1b525e6 100644 --- a/build/buildconstants/params_butterfly.go +++ b/build/buildconstants/params_butterfly.go @@ -53,27 +53,32 @@ const UpgradeHyggeHeight = -21 const UpgradeLightningHeight = -22 const UpgradeThunderHeight = -23 const UpgradeWatermelonHeight = -24 + +// This fix upgrade only ran on calibrationnet +const UpgradeWatermelonFixHeight = -100 + +// This fix upgrade only ran on calibrationnet +const UpgradeWatermelonFix2Height = -101 const UpgradeDragonHeight = -25 + +// This fix upgrade only ran on calibrationnet +const UpgradeCalibrationDragonFixHeight = -102 const UpgradePhoenixHeight = -26 const UpgradeWaffleHeight = -27 const UpgradeTuktukHeight = -28 -// ?????? -const UpgradeTeepHeight = 100 - // FIP-0081: for the power actor state for pledge calculations. // UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after // Tuktuk migration. along with a RampStartEpoch matching the upgrade height. var UpgradeTuktukPowerRampDurationEpochs = uint64(builtin.EpochsInYear) -// This fix upgrade only ran on calibrationnet -const UpgradeWatermelonFixHeight = -100 +// ?????? +const UpgradeTeepHeight = 100 -// This fix upgrade only ran on calibrationnet -const UpgradeWatermelonFix2Height = -101 +var UpgradeTeepInitialFilReserved = wholeFIL(1_600_000_000) // FIP-0100: 300M -> 1.6B FIL -// This fix upgrade only ran on calibrationnet -const UpgradeCalibrationDragonFixHeight = -102 +// ?????? +const UpgradeTockHeight = 200 var ConsensusMinerMinPower = abi.NewStoragePower(2 << 30) var PreCommitChallengeDelay = abi.ChainEpoch(150) diff --git a/build/buildconstants/params_calibnet.go b/build/buildconstants/params_calibnet.go index e3516f569f9..1232924831c 100644 --- a/build/buildconstants/params_calibnet.go +++ b/build/buildconstants/params_calibnet.go @@ -30,80 +30,77 @@ var ActorDebugging = false const BootstrappersFile = "calibnet.pi" const GenesisFile = "calibnet.car.zst" -const UpgradeBreezeHeight = -1 +const UpgradeBreezeHeight abi.ChainEpoch = -1 const BreezeGasTampingDuration = 120 -const UpgradeSmokeHeight = -2 +const UpgradeSmokeHeight abi.ChainEpoch = -2 -const UpgradeIgnitionHeight = -3 -const UpgradeRefuelHeight = -4 +const UpgradeIgnitionHeight abi.ChainEpoch = -3 +const UpgradeRefuelHeight abi.ChainEpoch = -4 var UpgradeAssemblyHeight = abi.ChainEpoch(30) -const UpgradeTapeHeight = 60 +const UpgradeTapeHeight abi.ChainEpoch = 60 -const UpgradeLiftoffHeight = -5 +const UpgradeLiftoffHeight abi.ChainEpoch = -5 -const UpgradeKumquatHeight = 90 +const UpgradeKumquatHeight abi.ChainEpoch = 90 -const UpgradeCalicoHeight = 120 -const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1) +const UpgradeCalicoHeight abi.ChainEpoch = 120 +const UpgradePersianHeight abi.ChainEpoch = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1) -const UpgradeClausHeight = 270 +const UpgradeClausHeight abi.ChainEpoch = 270 -const UpgradeOrangeHeight = 300 +const UpgradeOrangeHeight abi.ChainEpoch = 300 -const UpgradeTrustHeight = 330 +const UpgradeTrustHeight abi.ChainEpoch = 330 -const UpgradeNorwegianHeight = 360 +const UpgradeNorwegianHeight abi.ChainEpoch = 360 -const UpgradeTurboHeight = 390 +const UpgradeTurboHeight abi.ChainEpoch = 390 -const UpgradeHyperdriveHeight = 420 +const UpgradeHyperdriveHeight abi.ChainEpoch = 420 -const UpgradeChocolateHeight = 450 +const UpgradeChocolateHeight abi.ChainEpoch = 450 -const UpgradeOhSnapHeight = 480 +const UpgradeOhSnapHeight abi.ChainEpoch = 480 -const UpgradeSkyrHeight = 510 +const UpgradeSkyrHeight abi.ChainEpoch = 510 -const UpgradeSharkHeight = 16800 // 6 days after genesis +const UpgradeSharkHeight abi.ChainEpoch = 16800 // 6 days after genesis // 2023-02-21T16:30:00Z -const UpgradeHyggeHeight = 322354 +const UpgradeHyggeHeight abi.ChainEpoch = 322354 // 2023-04-20T14:00:00Z -const UpgradeLightningHeight = 489094 +const UpgradeLightningHeight abi.ChainEpoch = 489094 // 2023-04-21T16:00:00Z -const UpgradeThunderHeight = UpgradeLightningHeight + 3120 +const UpgradeThunderHeight abi.ChainEpoch = UpgradeLightningHeight + 3120 // 2023-10-19T13:00:00Z -const UpgradeWatermelonHeight = 1013134 +const UpgradeWatermelonHeight abi.ChainEpoch = 1013134 // 2023-11-07T13:00:00Z -const UpgradeWatermelonFixHeight = 1070494 +const UpgradeWatermelonFixHeight abi.ChainEpoch = 1070494 // 2023-11-21T13:00:00Z -const UpgradeWatermelonFix2Height = 1108174 +const UpgradeWatermelonFix2Height abi.ChainEpoch = 1108174 // 2024-03-11T14:00:00Z -const UpgradeDragonHeight = 1427974 +const UpgradeDragonHeight abi.ChainEpoch = 1427974 // This epoch, 120 epochs after the "rest" of the nv22 upgrade, is when we switch to Drand quicknet -const UpgradePhoenixHeight = UpgradeDragonHeight + 120 +const UpgradePhoenixHeight abi.ChainEpoch = UpgradeDragonHeight + 120 // 2024-04-03T11:00:00Z -const UpgradeCalibrationDragonFixHeight = 1493854 +const UpgradeCalibrationDragonFixHeight abi.ChainEpoch = 1493854 // 2024-07-11T12:00:00Z -const UpgradeWaffleHeight = 1779094 +const UpgradeWaffleHeight abi.ChainEpoch = 1779094 // 2024-10-23T13:30:00Z -const UpgradeTuktukHeight = 2078794 - -// Canceled - See update in: https://github.com/filecoin-project/community/discussions/74#discussioncomment-11549619 -const UpgradeTeepHeight = 9999999999 +const UpgradeTuktukHeight abi.ChainEpoch = 2078794 // FIP-0081: for the power actor state for pledge calculations. // UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after @@ -113,6 +110,15 @@ const UpgradeTeepHeight = 9999999999 // ramp behavior before mainnet upgrade. var UpgradeTuktukPowerRampDurationEpochs = uint64(builtin.EpochsInDay * 3) +// Canceled - See update in: https://github.com/filecoin-project/community/discussions/74#discussioncomment-11549619 +const UpgradeTeepHeight abi.ChainEpoch = 9999999999 + +var UpgradeTeepInitialFilReserved = wholeFIL(1_200_000_000) // FIP-0100: 300M -> 1.2B FIL + +// This epoch, 90 days after Teep is the completion of FIP-0100 where actors will start applying +// the new daily fee to pre-Teep sectors being extended. +var UpgradeTockHeight = UpgradeTeepHeight + builtin.EpochsInDay*90 + var ConsensusMinerMinPower = abi.NewStoragePower(32 << 30) var PreCommitChallengeDelay = abi.ChainEpoch(150) diff --git a/build/buildconstants/params_interop.go b/build/buildconstants/params_interop.go index 1f00426535a..648ee50d2f6 100644 --- a/build/buildconstants/params_interop.go +++ b/build/buildconstants/params_interop.go @@ -52,26 +52,32 @@ var UpgradeHyggeHeight = abi.ChainEpoch(-21) var UpgradeLightningHeight = abi.ChainEpoch(-22) var UpgradeThunderHeight = abi.ChainEpoch(-23) var UpgradeWatermelonHeight = abi.ChainEpoch(-24) + +// This fix upgrade only ran on calibrationnet +const UpgradeWatermelonFixHeight abi.ChainEpoch = -1 + +// This fix upgrade only ran on calibrationnet +const UpgradeWatermelonFix2Height abi.ChainEpoch = -2 + var UpgradeDragonHeight = abi.ChainEpoch(-25) + +// This fix upgrade only ran on calibrationnet +const UpgradeCalibrationDragonFixHeight abi.ChainEpoch = -3 + var UpgradePhoenixHeight = abi.ChainEpoch(-26) var UpgradeWaffleHeight = abi.ChainEpoch(-27) var UpgradeTuktukHeight = abi.ChainEpoch(-28) -const UpgradeTeepHeight = 50 - // FIP-0081: for the power actor state for pledge calculations. // UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after // Tuktuk migration. along with a RampStartEpoch matching the upgrade height. var UpgradeTuktukPowerRampDurationEpochs = uint64(builtin.EpochsInYear) -// This fix upgrade only ran on calibrationnet -const UpgradeWatermelonFixHeight = -1 +const UpgradeTeepHeight abi.ChainEpoch = 50 -// This fix upgrade only ran on calibrationnet -const UpgradeWatermelonFix2Height = -2 +var UpgradeTeepInitialFilReserved = InitialFilReserved // FIP-0100: no change for interop -// This fix upgrade only ran on calibrationnet -const UpgradeCalibrationDragonFixHeight = -3 +const UpgradeTockHeight abi.ChainEpoch = 100 var DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandQuicknet, diff --git a/build/buildconstants/params_mainnet.go b/build/buildconstants/params_mainnet.go index 5dba1cdffa7..3433b0a6c89 100644 --- a/build/buildconstants/params_mainnet.go +++ b/build/buildconstants/params_mainnet.go @@ -43,7 +43,7 @@ const UpgradeSmokeHeight abi.ChainEpoch = 51000 const UpgradeIgnitionHeight abi.ChainEpoch = 94000 const UpgradeRefuelHeight abi.ChainEpoch = 130800 -const UpgradeAssemblyHeight abi.ChainEpoch = 138720 +var UpgradeAssemblyHeight abi.ChainEpoch = 138720 const UpgradeTapeHeight abi.ChainEpoch = 140760 @@ -99,9 +99,18 @@ const UpgradeThunderHeight abi.ChainEpoch = UpgradeLightningHeight + 2880*21 // 2023-12-12T13:30:00Z const UpgradeWatermelonHeight abi.ChainEpoch = 3469380 +// This fix upgrade only ran on calibrationnet +const UpgradeWatermelonFixHeight abi.ChainEpoch = -1 + +// This fix upgrade only ran on calibrationnet +const UpgradeWatermelonFix2Height abi.ChainEpoch = -2 + // 2024-04-24T14:00:00Z const UpgradeDragonHeight abi.ChainEpoch = 3855360 +// This fix upgrade only ran on calibrationnet +const UpgradeCalibrationDragonFixHeight abi.ChainEpoch = -3 + // This epoch, 120 epochs after the "rest" of the nv22 upgrade, is when we switch to Drand quicknet // 2024-04-11T15:00:00Z const UpgradePhoenixHeight abi.ChainEpoch = UpgradeDragonHeight + 120 @@ -113,22 +122,19 @@ const UpgradeWaffleHeight abi.ChainEpoch = 4154640 // var because of TestMigrationNV24 in itests/migration_test.go to test the FIP-0081 pledge ramp var UpgradeTuktukHeight abi.ChainEpoch = 4461240 -// ?????? -var UpgradeTeepHeight = abi.ChainEpoch(9999999999) - // FIP-0081: for the power actor state for pledge calculations. // UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after // Tuktuk migration. along with a RampStartEpoch matching the upgrade height. var UpgradeTuktukPowerRampDurationEpochs = uint64(builtin.EpochsInYear) -// This fix upgrade only ran on calibrationnet -const UpgradeWatermelonFixHeight abi.ChainEpoch = -1 +// ?????? +var UpgradeTeepHeight = abi.ChainEpoch(9999999999) -// This fix upgrade only ran on calibrationnet -const UpgradeWatermelonFix2Height abi.ChainEpoch = -2 +// This epoch, 90 days after Teep is the completion of FIP-0100 where actors will start applying +// the new daily fee to pre-Teep sectors being extended. +var UpgradeTockHeight = UpgradeTeepHeight + builtin.EpochsInDay*90 -// This fix upgrade only ran on calibrationnet -const UpgradeCalibrationDragonFixHeight abi.ChainEpoch = -3 +var UpgradeTeepInitialFilReserved = InitialFilReserved // FIP-0100: no change for mainnet var ConsensusMinerMinPower = abi.NewStoragePower(10 << 40) var PreCommitChallengeDelay = abi.ChainEpoch(150) diff --git a/build/buildconstants/params_shared_vals.go b/build/buildconstants/params_shared_vals.go index d6b150cc3dd..901d6142195 100644 --- a/build/buildconstants/params_shared_vals.go +++ b/build/buildconstants/params_shared_vals.go @@ -4,7 +4,6 @@ package buildconstants import ( - "math/big" "os" "github.com/ipfs/go-cid" @@ -59,21 +58,12 @@ const AddressMainnetEnvVar = "_mainnet_" var ZeroAddress = MustParseAddress("f3yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaby2smx7a") const FilBase = uint64(2_000_000_000) -const FilAllocStorageMining = uint64(1_100_000_000) - const FilecoinPrecision = uint64(1_000_000_000_000_000_000) -const FilReserved = uint64(300_000_000) -var InitialRewardBalance *big.Int -var InitialFilReserved *big.Int +var InitialRewardBalance = wholeFIL(1_100_000_000) +var InitialFilReserved = wholeFIL(300_000_000) func init() { - InitialRewardBalance = big.NewInt(int64(FilAllocStorageMining)) - InitialRewardBalance = InitialRewardBalance.Mul(InitialRewardBalance, big.NewInt(int64(FilecoinPrecision))) - - InitialFilReserved = big.NewInt(int64(FilReserved)) - InitialFilReserved = InitialFilReserved.Mul(InitialFilReserved, big.NewInt(int64(FilecoinPrecision))) - if os.Getenv("LOTUS_ADDRESS_TYPE") == AddressMainnetEnvVar { SetAddressNetwork(address.Mainnet) } diff --git a/build/buildconstants/params_testground.go b/build/buildconstants/params_testground.go index e7dab38f444..a29fd614ee2 100644 --- a/build/buildconstants/params_testground.go +++ b/build/buildconstants/params_testground.go @@ -73,39 +73,40 @@ var ( UpgradeBreezeHeight abi.ChainEpoch = -1 BreezeGasTampingDuration abi.ChainEpoch = 0 - UpgradeSmokeHeight abi.ChainEpoch = -1 - UpgradeIgnitionHeight abi.ChainEpoch = -2 - UpgradeRefuelHeight abi.ChainEpoch = -3 - UpgradeTapeHeight abi.ChainEpoch = -4 - UpgradeAssemblyHeight abi.ChainEpoch = 10 - UpgradeLiftoffHeight abi.ChainEpoch = -5 - UpgradeKumquatHeight abi.ChainEpoch = -6 - UpgradeCalicoHeight abi.ChainEpoch = -8 - UpgradePersianHeight abi.ChainEpoch = -9 - UpgradeOrangeHeight abi.ChainEpoch = -10 - UpgradeClausHeight abi.ChainEpoch = -11 - UpgradeTrustHeight abi.ChainEpoch = -12 - UpgradeNorwegianHeight abi.ChainEpoch = -13 - UpgradeTurboHeight abi.ChainEpoch = -14 - UpgradeHyperdriveHeight abi.ChainEpoch = -15 - UpgradeChocolateHeight abi.ChainEpoch = -16 - UpgradeOhSnapHeight abi.ChainEpoch = -17 - UpgradeSkyrHeight abi.ChainEpoch = -18 - UpgradeSharkHeight abi.ChainEpoch = -19 - UpgradeHyggeHeight abi.ChainEpoch = -20 - UpgradeLightningHeight abi.ChainEpoch = -21 - UpgradeThunderHeight abi.ChainEpoch = -22 - UpgradeWatermelonHeight abi.ChainEpoch = -23 - UpgradeWatermelonFixHeight abi.ChainEpoch = -24 - UpgradeWatermelonFix2Height abi.ChainEpoch = -25 - UpgradeDragonHeight abi.ChainEpoch = -26 - UpgradePhoenixHeight abi.ChainEpoch = -27 - UpgradeCalibrationDragonFixHeight abi.ChainEpoch = -28 - UpgradeWaffleHeight abi.ChainEpoch = -29 - UpgradeTuktukHeight abi.ChainEpoch = -30 - UpgradeTeepHeight abi.ChainEpoch = -31 - - UpgradeTuktukPowerRampDurationEpochs uint64 = 0 + UpgradeSmokeHeight abi.ChainEpoch = -1 + UpgradeIgnitionHeight abi.ChainEpoch = -2 + UpgradeRefuelHeight abi.ChainEpoch = -3 + UpgradeTapeHeight abi.ChainEpoch = -4 + UpgradeAssemblyHeight abi.ChainEpoch = 10 + UpgradeLiftoffHeight abi.ChainEpoch = -5 + UpgradeKumquatHeight abi.ChainEpoch = -6 + UpgradeCalicoHeight abi.ChainEpoch = -8 + UpgradePersianHeight abi.ChainEpoch = -9 + UpgradeOrangeHeight abi.ChainEpoch = -10 + UpgradeClausHeight abi.ChainEpoch = -11 + UpgradeTrustHeight abi.ChainEpoch = -12 + UpgradeNorwegianHeight abi.ChainEpoch = -13 + UpgradeTurboHeight abi.ChainEpoch = -14 + UpgradeHyperdriveHeight abi.ChainEpoch = -15 + UpgradeChocolateHeight abi.ChainEpoch = -16 + UpgradeOhSnapHeight abi.ChainEpoch = -17 + UpgradeSkyrHeight abi.ChainEpoch = -18 + UpgradeSharkHeight abi.ChainEpoch = -19 + UpgradeHyggeHeight abi.ChainEpoch = -20 + UpgradeLightningHeight abi.ChainEpoch = -21 + UpgradeThunderHeight abi.ChainEpoch = -22 + UpgradeWatermelonHeight abi.ChainEpoch = -23 + UpgradeWatermelonFixHeight abi.ChainEpoch = -24 + UpgradeWatermelonFix2Height abi.ChainEpoch = -25 + UpgradeDragonHeight abi.ChainEpoch = -26 + UpgradePhoenixHeight abi.ChainEpoch = -27 + UpgradeCalibrationDragonFixHeight abi.ChainEpoch = -28 + UpgradeWaffleHeight abi.ChainEpoch = -29 + UpgradeTuktukHeight abi.ChainEpoch = -30 + UpgradeTuktukPowerRampDurationEpochs uint64 = 0 + UpgradeTeepHeight abi.ChainEpoch = -31 + UpgradeTeepInitialFilReserved *big.Int = wholeFIL(300_000_000) + UpgradeTockHeight abi.ChainEpoch = -32 DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandMainnet, diff --git a/build/buildconstants/shared_funcs.go b/build/buildconstants/shared_funcs.go index fba5750ebf3..114452753d6 100644 --- a/build/buildconstants/shared_funcs.go +++ b/build/buildconstants/shared_funcs.go @@ -1,6 +1,8 @@ package buildconstants import ( + "math/big" + logging "github.com/ipfs/go-log/v2" "github.com/libp2p/go-libp2p/core/peer" @@ -40,3 +42,8 @@ func MustParseID(id string) peer.ID { } return p } + +func wholeFIL(whole uint64) *big.Int { + bigWhole := big.NewInt(int64(whole)) + return bigWhole.Mul(bigWhole, big.NewInt(int64(FilecoinPrecision))) +} diff --git a/build/builtin_actors_gen.go b/build/builtin_actors_gen.go index 3d9d673a508..edfcbf74e17 100644 --- a/build/builtin_actors_gen.go +++ b/build/builtin_actors_gen.go @@ -189,25 +189,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "butterflynet", Version: 16, - BundleGitTag: "v16.0.0-dev1", - ManifestCid: cid.MustParse("bafy2bzaced3ucmgzcrkvaw6qgqdzl56t3rctlb7i66vrj23dacgeath7jcxne"), - Actors: map[string]cid.Cid{ - "account": cid.MustParse("bafk2bzaceaw5z2sungnovruolbxdc43xbsksx7ajlr2bw7insd55nho3gfbne"), - "cron": cid.MustParse("bafk2bzacec7zpiconapx4veuplh5hk3iumnigsbx7yxhxfz7hirqbf2vpexqa"), - "datacap": cid.MustParse("bafk2bzaceb4owttyigypvl6pguxhqwe45rgfjubgpoitqhiyzumhlwwu6buge"), - "eam": cid.MustParse("bafk2bzaceapofadtnyiulmdc5k3nujthqwyht67xu2pohatqjcexojm34j7ng"), - "ethaccount": cid.MustParse("bafk2bzacebtz62oxftksx4f6efbuh6i5wb5nvuo447uefkbz5lis4rcw7djw2"), - "evm": cid.MustParse("bafk2bzacebdhgopsxunxykgehkbwtj5iyyvbqygi5uuvhtm7m4vsz3vcsp5iw"), - "init": cid.MustParse("bafk2bzaced6b6odw6vt3ak7z7idhatex6gjsxck57wkum2yud6wubhpbwtm5e"), - "multisig": cid.MustParse("bafk2bzacebius3sex65rxav4oo2qbbm6vuv5pcer3shgutqyyxy3vvcgezayg"), - "paymentchannel": cid.MustParse("bafk2bzacebmpquxfvdh2lmgi7huqcln3ey56run7hkrsuhi6lgcwekbozhxac"), + BundleGitTag: "v16.0.0-rc2", + ManifestCid: cid.MustParse("bafy2bzacecaewe7t4wtq42thu5uu4qin4obctme3m4g2w6lvsgqhz6e367zeg"), + Actors: map[string]cid.Cid{ + "account": cid.MustParse("bafk2bzaceawakvrcvqbwebmwr6zqmjttg2xqicbwvnkl6modlblxaeghwuy3a"), + "cron": cid.MustParse("bafk2bzacebge7sgxs77lbuykuqfloiznsktdl5xav4sefscjfiyjbtlvz6flg"), + "datacap": cid.MustParse("bafk2bzaceaqmafsmo6p2l7hey6alaq7alwumbvfg35q2bryvz7lnyjdfq2cti"), + "eam": cid.MustParse("bafk2bzacebzscpzmpo5c6sfujxhvmt6tho3uhp2crv54ib4ddzljr3ey6mwcy"), + "ethaccount": cid.MustParse("bafk2bzacedqfll5hhupk5j476epnkutc2fni5c6vj7zq47earteoxryjva7pc"), + "evm": cid.MustParse("bafk2bzacebu5l4o57l4dmv62xcf43qlc62is5ngssii54eh6ytyej435xw4wy"), + "init": cid.MustParse("bafk2bzacebz2sqhhlmeipp2nhuhc6w2pmnjgg3vrrcrhpl5dqxl3bvqbzlkem"), + "multisig": cid.MustParse("bafk2bzaced4cykaf6tugpopnwi2wptchjuizg2e2xmyqu5exmzj3fh4wmmmqi"), + "paymentchannel": cid.MustParse("bafk2bzacecqbngn6hkrdr3gvixczlcuu2mputricbmh5lenlo3lnvo732v7mi"), "placeholder": cid.MustParse("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": cid.MustParse("bafk2bzaceagmmgu3wt7fozbp3uhd6aepdl6c2ykt7xbpbldh2lvmmvvmt56gw"), - "storagemarket": cid.MustParse("bafk2bzaceblznz3yqthmh2jbrknljiqu3kdfr7x7j2wn62abnszs4ziettqmm"), - "storageminer": cid.MustParse("bafk2bzaceca27d33cwxwwbhbmijt453wkc3dvrnfkrdsuznol4cq33z3oqxbk"), - "storagepower": cid.MustParse("bafk2bzacebnq5klygudstkq5tx6y7xusn2frygtotahiagmda3zy6rvzmyqme"), - "system": cid.MustParse("bafk2bzacea5dls7jx2bhbhdkwl2c3qgyv22ldbeoc2me5z7qe5kbutf7tjeow"), - "verifiedregistry": cid.MustParse("bafk2bzacecqbljsk5utms7pe4g3uy7zvrpwmwgop4spx6pjrpi4tjx663gkq2"), + "reward": cid.MustParse("bafk2bzacecpqhokd5d55riee24ff4ht7y65remkj3vbwouk4kzfbw53uaj5so"), + "storagemarket": cid.MustParse("bafk2bzaceditnshsgi5l3oq5rp6brkor23rlnbnleis7ijdktaf2dbuv3igsc"), + "storageminer": cid.MustParse("bafk2bzaceahuxqgqui2dv3mklvg5cgodb52shankdbagyz7wnpw3qxlizjlii"), + "storagepower": cid.MustParse("bafk2bzaceaup2fbszew74inx6yt6dcepdpfufch54v57xvkmhudem55ofslc6"), + "system": cid.MustParse("bafk2bzacebm65k6zpl3tf674kypziurkdyxyk6dwbzpqlr2q6ky5ayi2omndk"), + "verifiedregistry": cid.MustParse("bafk2bzacebbf7yue4ertuascvmccwi4xgd6h6zdhjk44inhbdon7sva2xbqyc"), }, }, { Network: "calibrationnet", @@ -387,25 +387,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "calibrationnet", Version: 16, - BundleGitTag: "v16.0.0-dev1", - ManifestCid: cid.MustParse("bafy2bzacedyuehqrepafsb55cm5pbbagu554rr24myh5hlgidpfzsp7m6k5ci"), - Actors: map[string]cid.Cid{ - "account": cid.MustParse("bafk2bzacecppofh4oryxw4h32k2wsh7wsranplxzzdmxlvt3ji4dczfbk772i"), - "cron": cid.MustParse("bafk2bzacebovrwtd77bivvfx3dechd7sxmkz4xvquksuhthuyrbfprnog6ygq"), - "datacap": cid.MustParse("bafk2bzacea3zugtto5midza37z3rkmpbgwjkidkislyl72lgizklj5meiqlw4"), - "eam": cid.MustParse("bafk2bzacebfafdslh6vjgjupv5runnatcgyqffxo7fxaahlwfmdsbglbxedfi"), - "ethaccount": cid.MustParse("bafk2bzacedj3wxhx6gam7dxksl2tlzgd5h7eaoeeyzvl32noimnneolnicbhe"), - "evm": cid.MustParse("bafk2bzacebiisokxcsafd7zzrrdt7e2ilatwfmnfbccna7cm2ayjc4snwipeu"), - "init": cid.MustParse("bafk2bzacebw5em2nwbyethwv47dstvnhgxciqbr3duhqvpsvgzl7gkohvlsi2"), - "multisig": cid.MustParse("bafk2bzaceavw4okqdej7hylut6ilaabo4ocurfyo3ufwxqlj4zgsnzvnkxnee"), - "paymentchannel": cid.MustParse("bafk2bzaceapxleybdulu7ny5esksz2paveq6kj3hy2uv7akfqx6wipjf77voe"), + BundleGitTag: "v16.0.0-rc2", + ManifestCid: cid.MustParse("bafy2bzacecaf5mhtylyarnp62cqgjtkh2sozf75ilpi2qqh6t2q4aratrsd4g"), + Actors: map[string]cid.Cid{ + "account": cid.MustParse("bafk2bzacebxalfzawxpgrvxibkyerv2xaoaf55s5ew4o5vo5cb5bkwwyh7psu"), + "cron": cid.MustParse("bafk2bzacebemv6g4op5lqmgwbqvtwlm7nn42zyli25zpbfmgku3az3nkwoxxs"), + "datacap": cid.MustParse("bafk2bzacebpkr4bvsxqwpcd4mqaelbxdhhdduvaoydu7t3bjnrbeca7yuoefs"), + "eam": cid.MustParse("bafk2bzacedhj7mb6vw75m567ywdf36ajn5vqahedihytiwolbmbabz4q7f67s"), + "ethaccount": cid.MustParse("bafk2bzacebsyp4f4wjvtyqyrnzwcbaifcekfdibzlnlnd23dcoco7hu6zfl5a"), + "evm": cid.MustParse("bafk2bzacec7w5hc3kflbe7zhx3oudydzi65y3myppgep2zulbshokufgdppbi"), + "init": cid.MustParse("bafk2bzacedvieth6krc5i6ep4a2pgbnm3spbgeho6tsgysw57hbsntkfusgdq"), + "multisig": cid.MustParse("bafk2bzaceanobksy4ujnhy4exupk53bsphcjzalqlxkkge6m7tyzlsss6tnbe"), + "paymentchannel": cid.MustParse("bafk2bzaceb6ewlsbefttz277clnegzdyv5hsvqcmlgbnezlapr75eglbm2h46"), "placeholder": cid.MustParse("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": cid.MustParse("bafk2bzacebdmguorldk4jvdpxmvxiypahqumga7e5b64qbhmjehbxwnsanip4"), - "storagemarket": cid.MustParse("bafk2bzacebvlrsigczseacown6mxy2ewwh3ig3analf4zf5pvh4n2fazzu2go"), - "storageminer": cid.MustParse("bafk2bzaceardbhguonfp2tpatwnd6qces6hrmhpudeddk464vatz7qhg2tpho"), - "storagepower": cid.MustParse("bafk2bzacebyfcf6spszdfjtulyxokruxwddrzywkz76jvad3benv3cs7v52q2"), - "system": cid.MustParse("bafk2bzacec43onu7oy7epjvqruhcreidzyjfxhi2r4r5kefivgwzxouebwwt4"), - "verifiedregistry": cid.MustParse("bafk2bzacebpeww6apu22xgc24rotydriibrh7svyparr3yci3l3xnvwwdq4si"), + "reward": cid.MustParse("bafk2bzacecdh76unbhvcbrzmfckzmiuhbbnqvahymcn2j7jegamjlsd6m3e5c"), + "storagemarket": cid.MustParse("bafk2bzacebrlree6tawt6eva5ol3tnt2mqfvfi6jpgrriocfzvz34kezgw6r6"), + "storageminer": cid.MustParse("bafk2bzaceb4ytskiz4icqzbzcqaaq33x3dyxpwlavwuxdfsowip2zh4bizalm"), + "storagepower": cid.MustParse("bafk2bzaceaacdkp6yfdiobgvnvqklly2yo5n53nxs4j27sbbadbbfiv6tdvrk"), + "system": cid.MustParse("bafk2bzacebi6356ud4rdotrs46enkc6tjmaqt3jm6wswq5qviumskuzah7jcs"), + "verifiedregistry": cid.MustParse("bafk2bzacecevtxeni56xlctgns6apuguvsaacwikzb5gjgm3d2au2tvnfusdi"), }, }, { Network: "caterpillarnet", @@ -594,25 +594,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "caterpillarnet", Version: 16, - BundleGitTag: "v16.0.0-dev1", - ManifestCid: cid.MustParse("bafy2bzacedqqjqicweamstbiqfllldodwdwqhkl7rcgqs27denzh7z3hwpz3i"), - Actors: map[string]cid.Cid{ - "account": cid.MustParse("bafk2bzaceajwzqsl45wmdum5nmaxiopfjvjt5qdeaxkrlhmwmc4utb4o3lcam"), - "cron": cid.MustParse("bafk2bzacea52btlgmq5a3y6yuav35hmxbfni4n6kisc47ptg2pazawnaxtmxs"), - "datacap": cid.MustParse("bafk2bzacedhbmvomkiz2fnpukuni5byzx66itmzl7ybighcqviv24hwyvnqxy"), - "eam": cid.MustParse("bafk2bzaceav4taadep3gx5347v3yqpwucgxtoopwdr6cmztifnd4jh4da7k26"), - "ethaccount": cid.MustParse("bafk2bzaced3gcp763wpsbk4uuapabx6wvna7zj5f4z5ncneh6izft2qysjqyq"), - "evm": cid.MustParse("bafk2bzacea3gzumpldx37cyhbiy4h3ya2xvzbjsjcwpry4rk3pbzxdj6kieb6"), - "init": cid.MustParse("bafk2bzaceb6ktoltdgictkwdqipl3xxpv4hb26pdmzmlxkni6yur467d6h4bs"), - "multisig": cid.MustParse("bafk2bzaceacficvknw56svvd345dnmt37ixn37aa4v7crp3cvpujvvj5mexg2"), - "paymentchannel": cid.MustParse("bafk2bzaceb25lrqqycu6exgwreyecuucmw3tvazfq74p6skyninxdt2xzwrva"), + BundleGitTag: "v16.0.0-rc2", + ManifestCid: cid.MustParse("bafy2bzacedk57ogtyxbn5r67sp7rh4oyworpc5circ7bt7rdzj5jegrcwwtru"), + Actors: map[string]cid.Cid{ + "account": cid.MustParse("bafk2bzacedzq4ralecmx5mcsc72fno5vlxrbxjhyplnfe4qp2j4ikiltqdt72"), + "cron": cid.MustParse("bafk2bzacecv2ee5klhgcsmnj5yyoicsuvney6i4zykbkylgeq3c2uid22bgxw"), + "datacap": cid.MustParse("bafk2bzaceaynthzeaqooqorcq6kemk7o7c3mrwmk2ohlg22bougojqxbpjluy"), + "eam": cid.MustParse("bafk2bzacedztag7flrpnxkcszvbhb7vqp6qawgznchx4hvnm4qp4g3dglvzrm"), + "ethaccount": cid.MustParse("bafk2bzacecvt4a4t2l6mdd5hiiv3fxsehzjr7qxqpq7ebo7bwgw3rnkjk7eo2"), + "evm": cid.MustParse("bafk2bzaced5c5jyrrpfxioinbvxxnb7mkfxstpzg24vahszj52c6366ovg6c4"), + "init": cid.MustParse("bafk2bzacedvswwyu6p42uismgddfjtxyombwyrmrxrexrhwqcdrnpvsw4j7co"), + "multisig": cid.MustParse("bafk2bzaceas2ybcf5cmtgeskdkg4cfb5ccruvpkk4caj7tavs2yqygmznvtai"), + "paymentchannel": cid.MustParse("bafk2bzacecejvyaduuqv2gvlx5nqi72x6lyqcs2iprzi4ivw5boojj47ouipe"), "placeholder": cid.MustParse("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": cid.MustParse("bafk2bzacedsoxtcutavwgcjsvpmnriqgyknrifr7gtqlh7a6cpi7tbb63aza2"), - "storagemarket": cid.MustParse("bafk2bzacebjcyc7m465cu2en2qtmn53swblzpsjykmdi6ukfsfwv4n2qyzsww"), - "storageminer": cid.MustParse("bafk2bzacedfyh3jmd2hlt47za2tkhe2rihfr6mpklg5zb44xywuelyda5nogq"), - "storagepower": cid.MustParse("bafk2bzacedlqxltci4dzwjllqunx2diegsf4budqpph642woh6z6nthxgljuc"), - "system": cid.MustParse("bafk2bzacebrghlk4nlvqpe4qvdg2kdr7hjpqx2yiim6idg2dqrwts4tli7wew"), - "verifiedregistry": cid.MustParse("bafk2bzaceavaeuhy2yyjz5qam4seiwm3dfpsuvnn23q65c47h5caa3xt5rgjs"), + "reward": cid.MustParse("bafk2bzacedkcueknp5s3fii5tntkhc5lb6ncoxqwvqzc7ioox3zw3smxfdsle"), + "storagemarket": cid.MustParse("bafk2bzaceckuw7zb22yi3xe5eq6rzaj3dtwymf3cq4ozx2ut4u64tb64vykxi"), + "storageminer": cid.MustParse("bafk2bzacecfmwbdb3ajo5gchncyw3ww2n5avnobxxzeykfzu6wgkxxizi2p2i"), + "storagepower": cid.MustParse("bafk2bzacecwrqpgypxqzmjonwnmmzml7sdu4q77tchoxqv45qwtkp3vg5qep6"), + "system": cid.MustParse("bafk2bzacecf3vl5vfsfnkxkkhagayzvsukgcsjidzooy2ta5yqdafdf7mt4ky"), + "verifiedregistry": cid.MustParse("bafk2bzaceb3daflyn5ireai6whlt7fvj55deh3q7kdn4624ttyp2dsuhiqv72"), }, }, { Network: "devnet", @@ -792,25 +792,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "devnet", Version: 16, - BundleGitTag: "v16.0.0-dev1", - ManifestCid: cid.MustParse("bafy2bzacebdyuvdaovs5lnwfnn2uu5ckvinokhctuym2wt4zradxmb2emh3gu"), - Actors: map[string]cid.Cid{ - "account": cid.MustParse("bafk2bzacealpbfzpfb33rka6rnoaepbona5elxjmw5p45fjop3sd35pecns7o"), - "cron": cid.MustParse("bafk2bzacedpy6vfqq34qzhzpzinrdk3worasime5zmen64qtkgtkg5kqte3yw"), - "datacap": cid.MustParse("bafk2bzacebmhg4qkcgdznshes4h3merddbtjwd6yw2snv4biaqmub5joydk6a"), - "eam": cid.MustParse("bafk2bzaceckp43jqgtb4ekoayk3cy7jajw4r2itas4xuew7pqk5b3ufbbvu7i"), - "ethaccount": cid.MustParse("bafk2bzacebacuiyeqwjpow5tqh6zs3wdexp5lkxtre252m5d2asrunxfgshwk"), - "evm": cid.MustParse("bafk2bzacecgr6ohvx467l4bsx2l2342xbnhd3mme4cnavvufuuomzjqra254g"), - "init": cid.MustParse("bafk2bzacedswii2q6om3az7ugpamedwiylofpgcmly6xlajenlqrorsipu5kw"), - "multisig": cid.MustParse("bafk2bzacebe2shj2fjwvr3epqyqt7ywg23hlb7fulek6dkh3hrrfcl2cqh5ds"), - "paymentchannel": cid.MustParse("bafk2bzaced23mx42bux7adtm3flefrpgom5vkn7rkufpwo7gbbpp3fr6hckna"), + BundleGitTag: "v16.0.0-rc2", + ManifestCid: cid.MustParse("bafy2bzacedwwo4bbwjejqh7ht53vz3mrbhpvbybyxlfwa7sl64h4wyoevc7gm"), + Actors: map[string]cid.Cid{ + "account": cid.MustParse("bafk2bzacebnfuootbnjfzuilxfdmcustrmryrifnzlgncugx773izoqkuchya"), + "cron": cid.MustParse("bafk2bzaced7kuowigusckzzyncdyknh7i6vfqymqzzo3ejcnlgynzwtf4ssqs"), + "datacap": cid.MustParse("bafk2bzacebeskul6p6hynmg2mdwpvzrv26jqjzk72hvztcq67gjrwzi3szgqu"), + "eam": cid.MustParse("bafk2bzaceac62rjegdxhfwmbowvrfhtnfal4p32darfb4bhjzj2rloigwe2kk"), + "ethaccount": cid.MustParse("bafk2bzacede7aecfuwuntqr3mv27ugp5bt6ur3tnbi52bjbdw34fgbg3whema"), + "evm": cid.MustParse("bafk2bzacecnigm5e7n5v2ziejpt2zur6zlbxf63e5633vivt3nvfe4itsterc"), + "init": cid.MustParse("bafk2bzaceci6onhfjy5lstnmghil3nsv3uunjaemrc76k7of2emaezgfgb5dm"), + "multisig": cid.MustParse("bafk2bzaced6jx3hsddygmwjpmi2tdtfvyucebjql6hn7mw5oshjhrechyrryu"), + "paymentchannel": cid.MustParse("bafk2bzacecym23tw6s5r6cnzmg2vghajcx2oedeac3z4njroa7eqzhjsqlrsa"), "placeholder": cid.MustParse("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": cid.MustParse("bafk2bzacecigv24xqawuvyuxz5lt2qhf46dq2naminkv3xqhouremg6zqmtfg"), - "storagemarket": cid.MustParse("bafk2bzacebtldhghd3jwnozzaoxvz4562aqe2qdzgbc5vjtg4yhbaj2dappco"), - "storageminer": cid.MustParse("bafk2bzacedrc3piyuw44yeu27gquwzaprlf7wxmjpf53kvkbydqe3h6637tg6"), - "storagepower": cid.MustParse("bafk2bzacear7ktjlxbpfkspvlkqo7m7aqhdwvfplvx4l5mbppo2mxwcjf2jkw"), - "system": cid.MustParse("bafk2bzacecnaympyv5m6oqsy6dqznpderjztjlsodx3vipm5zctvkk3esohyw"), - "verifiedregistry": cid.MustParse("bafk2bzacean7z35x3pvlypt53qxz4rnutdycr63xsa7um2bf5b5qhgpkftih6"), + "reward": cid.MustParse("bafk2bzaceayjg33yemcjuz5nhcbseh5lgki5snihk7jy2jd6e6gudasck7my6"), + "storagemarket": cid.MustParse("bafk2bzaceddxhmoclzxgawwqkvfrh4vjmnrczkt5ce2k2ml5cb76tb4hicxdk"), + "storageminer": cid.MustParse("bafk2bzaceb3ijffh67l44z7bnflnxz5sapimvojm7npu7rkteciou7v35gatk"), + "storagepower": cid.MustParse("bafk2bzaceaieekkzkcaorzw7tehkuxtsoh2bv3ja3x5yjpvi3pczcc77dcbgy"), + "system": cid.MustParse("bafk2bzacede3jnwbzj2zjz65v2ksi6bq6rlhvsnv6p2f72gohbu6ocu5snngg"), + "verifiedregistry": cid.MustParse("bafk2bzacedgx5hvmqsijkpzvbyppxvt2ixgxaqi77h22k5cxmbavdcqxlm5vy"), }, }, { Network: "hyperspace", @@ -1013,25 +1013,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "mainnet", Version: 16, - BundleGitTag: "v16.0.0-dev1", - ManifestCid: cid.MustParse("bafy2bzacec5qnjmoi5ka2qozkkktzwca5i6icodrlpzkk5rr4u2rygfltieze"), - Actors: map[string]cid.Cid{ - "account": cid.MustParse("bafk2bzacecoqf4u4raiqmo4gieinfzxbctadwea5ey3gt6fy6umgjos4uv2wm"), - "cron": cid.MustParse("bafk2bzaced76r6luvpfa3vpzqrffmaof55m2afu3gnptj3ldbfpdfsyenrxoi"), - "datacap": cid.MustParse("bafk2bzacedxwmfej347do4gjidkwqkpbjc6iz3xj4ja6y5nj6mvsvfv4iojv6"), - "eam": cid.MustParse("bafk2bzaced3d4ilqia434l42dib5n2nh444duzdx6ny3equfkr6sa4w5jstt6"), - "ethaccount": cid.MustParse("bafk2bzacebnl5u6326h6t6zn2xqqvxyzj3j5vw2axg5bsuj7bk4qgclpyr3r2"), - "evm": cid.MustParse("bafk2bzaceczkcwusuxv4xz6h74krybegh4idmjwdv3cx7opsegq77mdontuwa"), - "init": cid.MustParse("bafk2bzacea3vbeqljcbzxdkbdh7rcayy64tvn7mihgj5riazw5ocgr57fwgji"), - "multisig": cid.MustParse("bafk2bzaceacef3z3biucyasjuj4j75gpsi4ozebwwoygfpojg4xkqssly7pi6"), - "paymentchannel": cid.MustParse("bafk2bzacebshacfsdlvmqihamcipuksxxwhaxgpibnmb5nvdr76hilo5aodka"), + BundleGitTag: "v16.0.0-rc2", + ManifestCid: cid.MustParse("bafy2bzaceccxjrlqq3xdkfxyujd2tvcfktvd2jegz5vjaip26jaskudb7d5wg"), + Actors: map[string]cid.Cid{ + "account": cid.MustParse("bafk2bzaceaxmf5rgkgcwehdsy6ujmohcnyajgp6hdxoj6vz6fnsmgiyl4ww3g"), + "cron": cid.MustParse("bafk2bzacebp2k26g7u3tadbommcgbs7e4cbfsqtcsxec6esde3omkekzlk4ls"), + "datacap": cid.MustParse("bafk2bzaceaac4i3elexg4ixx25dk6odqwlafneot5hbqgesa56xtrhs6gl5y6"), + "eam": cid.MustParse("bafk2bzaceb6btms3mxpkxdevirtywbnpkk2txegria3pw47lmsip3c4igewoo"), + "ethaccount": cid.MustParse("bafk2bzaceb2cb4mapkcwj6zeagflneifegkdq2si47nf3zzf2jyyoosdrhuqy"), + "evm": cid.MustParse("bafk2bzacebmypi6ihewk5f2paj6fmvgkxyr6xsrsjrrrwkdkqadhhbv5t7oie"), + "init": cid.MustParse("bafk2bzaceaus3kduo7kuhl5ulbsdhm6iyqbladbl7qm3rxb7f6q6x76amwxwm"), + "multisig": cid.MustParse("bafk2bzacebkeb6n6a2245fe65xl5y5x5sxu7if2xgkofpacok2zjmgmqznkas"), + "paymentchannel": cid.MustParse("bafk2bzacecq6pdyvenzhj65awa6umt3ebjjqxclh732siscqyem3h3to6k6fg"), "placeholder": cid.MustParse("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": cid.MustParse("bafk2bzaceakdar6t32u2inwowtrjtcldaulrk7cpbi5undxaoudpq6z5kz5sg"), - "storagemarket": cid.MustParse("bafk2bzacedtxidrhj7dopxfu7lg3c7q275dhqdtlvudm5du5yazx47w2ym7m2"), - "storageminer": cid.MustParse("bafk2bzacedyweom7dmzqipufvlnr63e3bcjmw4o4s75vhk2ui6grb56bemvpi"), - "storagepower": cid.MustParse("bafk2bzacebai2uhmoc7ci37wzie4yjkvxldyyapmetgsysnojdefaacdkhzoa"), - "system": cid.MustParse("bafk2bzaceb32mgt4dsh2my7q5ahsfolmderipv5mjh7ulukikyccgigwmzhmm"), - "verifiedregistry": cid.MustParse("bafk2bzaceddowq4s3qxa7nyehl3fqbr654xbh66lzqpwaucuc4jhdvoeds72m"), + "reward": cid.MustParse("bafk2bzaceaaqbfp56t6cads77akyslbr26xac4mju3j7tks7mhybxfy5pslfc"), + "storagemarket": cid.MustParse("bafk2bzacebgsdebrtbqwiv6bc4aieh5ok23p3qe3ibdq7d7sf5ybmmo52xf5i"), + "storageminer": cid.MustParse("bafk2bzaceawa6bukpifir7aqfy5jwfzudwucim44jeagos3pkxkj7wrh4yl66"), + "storagepower": cid.MustParse("bafk2bzacec2b6kge6zihsb55ks7h4hxak2l6a2z2a2gt4ipfyolzmcizatpda"), + "system": cid.MustParse("bafk2bzacedkdz5xmv4ahevqkboumuox6om2bxw4eskrkuabf4gxziheahkfnw"), + "verifiedregistry": cid.MustParse("bafk2bzaceaaf4pvwdcs23dh5f5nn3fbf4xkzqx7kjcrndwsk2er4dsn4eu6be"), }, }, { Network: "testing", @@ -1211,25 +1211,25 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "testing", Version: 16, - BundleGitTag: "v16.0.0-dev1", - ManifestCid: cid.MustParse("bafy2bzacebnqlrdxkjwqv5cvfhn2zliyuarrh3pmxjtrhpxoe4ig45ntoksys"), - Actors: map[string]cid.Cid{ - "account": cid.MustParse("bafk2bzaceayo2leixvtge6enn2bb6cn3zpzq66flq24tmapn5dejhz5giyvbm"), - "cron": cid.MustParse("bafk2bzacebdog27oj2wcwzrtx3iushg7lerfa2g36ij4kjjayewtcntrya3ry"), - "datacap": cid.MustParse("bafk2bzacecwhgrubpfbswc5ww2klbb4fegpzrpttz3b23idhij5cdunws6ktg"), - "eam": cid.MustParse("bafk2bzaceamqzyqot6stioffyr4uaof6ldl4qvk3kdrwythdoshxebnitv5fw"), - "ethaccount": cid.MustParse("bafk2bzacebx6gjzqykce6rjscvfi5ve4cssp2vr2sq5mo4pgdv76pnogpp4ns"), - "evm": cid.MustParse("bafk2bzaceazcaj7a3qxer2cmnclwfttpjoaytz6rq6dv4xi4vdvt3n5a5xicg"), - "init": cid.MustParse("bafk2bzacedmklpc2hjsgb4s6gbihofnactg7isj7fyarpqvm3ka2q7vgmmt2o"), - "multisig": cid.MustParse("bafk2bzaceafeksx5kbucsn23zypsqcqzhuhlp7dbo4lgbrttq3c3qhtttbrbi"), - "paymentchannel": cid.MustParse("bafk2bzaceacphrzczhfilynn43zcze3k42rqbswlrj2cytweaie664tqgzapy"), + BundleGitTag: "v16.0.0-rc2", + ManifestCid: cid.MustParse("bafy2bzacebedmqcpjwttumvbyrwiv3sqqwfwvql3qft3o536k5iibs52j5gqs"), + Actors: map[string]cid.Cid{ + "account": cid.MustParse("bafk2bzacebdj2i7layys2dybhtrb4lrau2dzaqly4omnuns3bvlduj52kz6o2"), + "cron": cid.MustParse("bafk2bzaceatxj4meu3ey65seye2r5zev3iipvx3c6m3gj5y3x3sxorzvmy2ye"), + "datacap": cid.MustParse("bafk2bzacebfcq3esrphbpgf7ukh7hfbzwoh4z7imtcehcrpnkrrcfnjyax2wo"), + "eam": cid.MustParse("bafk2bzacea5ntqqvkldavugdwfwvteb2u7vbqx36yxfabjydq6owfg54t6aiu"), + "ethaccount": cid.MustParse("bafk2bzaceb2d7np5w3btsa3omxf2vtt7oaxkv4ywrkdzftyqunoobz6ftg772"), + "evm": cid.MustParse("bafk2bzacebbopkorao4ptzbvuo5cmfpdudcf5argzy4qjfy3ewcq5tr2wcqqi"), + "init": cid.MustParse("bafk2bzaced7l425bajf7andfrq26bylr3abrz4o5rluvmf26po575yfw5f4zy"), + "multisig": cid.MustParse("bafk2bzaceb3x5v4ncyds7v2vr7bwy736ale4big6kszkzfp4rwsnphyxwpbro"), + "paymentchannel": cid.MustParse("bafk2bzaceck6jbxlcu6ctfhcpt3u2wnmh3mlkrrt5wuvkfxjkwkomwiaqnc4u"), "placeholder": cid.MustParse("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": cid.MustParse("bafk2bzaceah7txfotq2bxwiekiiw2cthwgho5kjagak5u2ovbe3dkewkkonsa"), - "storagemarket": cid.MustParse("bafk2bzacedju7nktksmy5ndapkgrwfmne5qojm45lc2ofzdou7hb6tg2tieg2"), - "storageminer": cid.MustParse("bafk2bzacea76f5hhwd66vjjtpd5t4gwuou54cjm6p2qlvw4de32fgzxhkdvu4"), - "storagepower": cid.MustParse("bafk2bzacedy7ccvrnoartrax62r7fyjqripuhluesw7gmdkkbxiyxjwfwhlay"), - "system": cid.MustParse("bafk2bzacea7a7o25gfrvgzd56kyfew54h7zvkkwwtjo4522bls5ziaey5qvn4"), - "verifiedregistry": cid.MustParse("bafk2bzaceduyj3egxhzaorf3g2tt26ndstjzjvktv5bdp5u7w4kohyyo3divm"), + "reward": cid.MustParse("bafk2bzaceakkqi7gdjh64fliznfd5cys75nz7udpxpfya77dnk2iyfcsm22qq"), + "storagemarket": cid.MustParse("bafk2bzacecu7so4kof34ighkoqluy6dhotrjprblxbg2fm5cy2idlehde4oro"), + "storageminer": cid.MustParse("bafk2bzacebiietua6ujbmew2mqljz6krkintlurmo3dnepaswxxwyv5jrxeiq"), + "storagepower": cid.MustParse("bafk2bzaceb4wzuk5ku4yqrojihpnlith3zbkpnwccdaqn7vdqnapj56ctsiok"), + "system": cid.MustParse("bafk2bzacedg7eilhpqlgidvrtskksn6s6b4enj4ztm6hrc4vbmcgdqh54esxu"), + "verifiedregistry": cid.MustParse("bafk2bzacec7q3upb43c6tagdzks3pmiwofphaiizqwqunk6zgbdsvhwdy7kow"), }, }, { Network: "testing-fake-proofs", @@ -1409,24 +1409,24 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{ }, { Network: "testing-fake-proofs", Version: 16, - BundleGitTag: "v16.0.0-dev1", - ManifestCid: cid.MustParse("bafy2bzacecmw3pjfiwtdu3aksvihiloaygqdmw2sxsqfdqe23w7z23vmeg6g6"), - Actors: map[string]cid.Cid{ - "account": cid.MustParse("bafk2bzaceayo2leixvtge6enn2bb6cn3zpzq66flq24tmapn5dejhz5giyvbm"), - "cron": cid.MustParse("bafk2bzacebdog27oj2wcwzrtx3iushg7lerfa2g36ij4kjjayewtcntrya3ry"), - "datacap": cid.MustParse("bafk2bzacecwhgrubpfbswc5ww2klbb4fegpzrpttz3b23idhij5cdunws6ktg"), - "eam": cid.MustParse("bafk2bzaceamqzyqot6stioffyr4uaof6ldl4qvk3kdrwythdoshxebnitv5fw"), - "ethaccount": cid.MustParse("bafk2bzacebx6gjzqykce6rjscvfi5ve4cssp2vr2sq5mo4pgdv76pnogpp4ns"), - "evm": cid.MustParse("bafk2bzaceazcaj7a3qxer2cmnclwfttpjoaytz6rq6dv4xi4vdvt3n5a5xicg"), - "init": cid.MustParse("bafk2bzacedmklpc2hjsgb4s6gbihofnactg7isj7fyarpqvm3ka2q7vgmmt2o"), - "multisig": cid.MustParse("bafk2bzacecmwhignsepjxfubhfkhh25ktvpvozbqhtspu77h3ja4xa65ntbtk"), - "paymentchannel": cid.MustParse("bafk2bzaceacphrzczhfilynn43zcze3k42rqbswlrj2cytweaie664tqgzapy"), + BundleGitTag: "v16.0.0-rc2", + ManifestCid: cid.MustParse("bafy2bzacebokirhkko3apr76hblv5cezawbxvsyrib2gykfovru4r4d4rhgiq"), + Actors: map[string]cid.Cid{ + "account": cid.MustParse("bafk2bzacebdj2i7layys2dybhtrb4lrau2dzaqly4omnuns3bvlduj52kz6o2"), + "cron": cid.MustParse("bafk2bzaceatxj4meu3ey65seye2r5zev3iipvx3c6m3gj5y3x3sxorzvmy2ye"), + "datacap": cid.MustParse("bafk2bzacebfcq3esrphbpgf7ukh7hfbzwoh4z7imtcehcrpnkrrcfnjyax2wo"), + "eam": cid.MustParse("bafk2bzacea5ntqqvkldavugdwfwvteb2u7vbqx36yxfabjydq6owfg54t6aiu"), + "ethaccount": cid.MustParse("bafk2bzaceb2d7np5w3btsa3omxf2vtt7oaxkv4ywrkdzftyqunoobz6ftg772"), + "evm": cid.MustParse("bafk2bzacebbopkorao4ptzbvuo5cmfpdudcf5argzy4qjfy3ewcq5tr2wcqqi"), + "init": cid.MustParse("bafk2bzaced7l425bajf7andfrq26bylr3abrz4o5rluvmf26po575yfw5f4zy"), + "multisig": cid.MustParse("bafk2bzaceavsrxbnx3x6j3jh22bnad2jqa7jehqvip3tmtsipfz4nl567fxys"), + "paymentchannel": cid.MustParse("bafk2bzaceck6jbxlcu6ctfhcpt3u2wnmh3mlkrrt5wuvkfxjkwkomwiaqnc4u"), "placeholder": cid.MustParse("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), - "reward": cid.MustParse("bafk2bzaceah7txfotq2bxwiekiiw2cthwgho5kjagak5u2ovbe3dkewkkonsa"), - "storagemarket": cid.MustParse("bafk2bzacedju7nktksmy5ndapkgrwfmne5qojm45lc2ofzdou7hb6tg2tieg2"), - "storageminer": cid.MustParse("bafk2bzacebntmeef2evhgtlfut72g5bxoihhq6glucmlnaytxyst7bf3vp6ec"), - "storagepower": cid.MustParse("bafk2bzacedy7ccvrnoartrax62r7fyjqripuhluesw7gmdkkbxiyxjwfwhlay"), - "system": cid.MustParse("bafk2bzacea7a7o25gfrvgzd56kyfew54h7zvkkwwtjo4522bls5ziaey5qvn4"), - "verifiedregistry": cid.MustParse("bafk2bzaceduyj3egxhzaorf3g2tt26ndstjzjvktv5bdp5u7w4kohyyo3divm"), + "reward": cid.MustParse("bafk2bzaceakkqi7gdjh64fliznfd5cys75nz7udpxpfya77dnk2iyfcsm22qq"), + "storagemarket": cid.MustParse("bafk2bzacecu7so4kof34ighkoqluy6dhotrjprblxbg2fm5cy2idlehde4oro"), + "storageminer": cid.MustParse("bafk2bzacedbgj2vkcz7ubt65ny6suewae3esxqwieb6v4zfh4b6wldkdghhku"), + "storagepower": cid.MustParse("bafk2bzaceb4wzuk5ku4yqrojihpnlith3zbkpnwccdaqn7vdqnapj56ctsiok"), + "system": cid.MustParse("bafk2bzacedg7eilhpqlgidvrtskksn6s6b4enj4ztm6hrc4vbmcgdqh54esxu"), + "verifiedregistry": cid.MustParse("bafk2bzacec7q3upb43c6tagdzks3pmiwofphaiizqwqunk6zgbdsvhwdy7kow"), }, }} diff --git a/build/openrpc/full.json b/build/openrpc/full.json index 248d1ae83ab..3d1baa08885 100644 --- a/build/openrpc/full.json +++ b/build/openrpc/full.json @@ -19968,7 +19968,8 @@ "UpgradePhoenixHeight": 10101, "UpgradeWaffleHeight": 10101, "UpgradeTuktukHeight": 10101, - "UpgradeTeepHeight": 10101 + "UpgradeTeepHeight": 10101, + "UpgradeTockHeight": 10101 }, "Eip155ChainID": 123, "GenesisTimestamp": 42 @@ -20091,6 +20092,10 @@ "title": "number", "type": "number" }, + "UpgradeTockHeight": { + "title": "number", + "type": "number" + }, "UpgradeTrustHeight": { "title": "number", "type": "number" @@ -21479,7 +21484,7 @@ "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -21494,7 +21499,8 @@ "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ] ], @@ -21506,7 +21512,15 @@ "title": "number", "type": "number" }, - "DealIDs": { + "DailyFee": { + "additionalProperties": false, + "type": "object" + }, + "DealWeight": { + "additionalProperties": false, + "type": "object" + }, + "DeprecatedDealIDs": { "items": { "description": "Number is a number", "title": "number", @@ -21514,10 +21528,6 @@ }, "type": "array" }, - "DealWeight": { - "additionalProperties": false, - "type": "object" - }, "ExpectedDayReward": { "additionalProperties": false, "type": "object" @@ -21781,7 +21791,8 @@ 5, 1 ], - "DisputableProofCount": 42 + "DisputableProofCount": 42, + "DailyFee": "0" } ] ], @@ -21789,6 +21800,10 @@ { "additionalProperties": false, "properties": { + "DailyFee": { + "additionalProperties": false, + "type": "object" + }, "DisputableProofCount": { "title": "number", "type": "number" @@ -23152,7 +23167,7 @@ "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -23167,7 +23182,8 @@ "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ] ], @@ -23179,7 +23195,15 @@ "title": "number", "type": "number" }, - "DealIDs": { + "DailyFee": { + "additionalProperties": false, + "type": "object" + }, + "DealWeight": { + "additionalProperties": false, + "type": "object" + }, + "DeprecatedDealIDs": { "items": { "description": "Number is a number", "title": "number", @@ -23187,10 +23211,6 @@ }, "type": "array" }, - "DealWeight": { - "additionalProperties": false, - "type": "object" - }, "ExpectedDayReward": { "additionalProperties": false, "type": "object" @@ -24217,7 +24237,7 @@ "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -24232,7 +24252,8 @@ "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ], "additionalProperties": false, @@ -24241,7 +24262,15 @@ "title": "number", "type": "number" }, - "DealIDs": { + "DailyFee": { + "additionalProperties": false, + "type": "object" + }, + "DealWeight": { + "additionalProperties": false, + "type": "object" + }, + "DeprecatedDealIDs": { "items": { "description": "Number is a number", "title": "number", @@ -24249,10 +24278,6 @@ }, "type": "array" }, - "DealWeight": { - "additionalProperties": false, - "type": "object" - }, "ExpectedDayReward": { "additionalProperties": false, "type": "object" diff --git a/build/openrpc/gateway.json b/build/openrpc/gateway.json index e044fbd4765..bf58339c537 100644 --- a/build/openrpc/gateway.json +++ b/build/openrpc/gateway.json @@ -9679,7 +9679,8 @@ "UpgradePhoenixHeight": 10101, "UpgradeWaffleHeight": 10101, "UpgradeTuktukHeight": 10101, - "UpgradeTeepHeight": 10101 + "UpgradeTeepHeight": 10101, + "UpgradeTockHeight": 10101 }, "Eip155ChainID": 123, "GenesisTimestamp": 42 @@ -9802,6 +9803,10 @@ "title": "number", "type": "number" }, + "UpgradeTockHeight": { + "title": "number", + "type": "number" + }, "UpgradeTrustHeight": { "title": "number", "type": "number" @@ -10282,7 +10287,8 @@ 5, 1 ], - "DisputableProofCount": 42 + "DisputableProofCount": 42, + "DailyFee": "0" } ] ], @@ -10290,6 +10296,10 @@ { "additionalProperties": false, "properties": { + "DailyFee": { + "additionalProperties": false, + "type": "object" + }, "DisputableProofCount": { "title": "number", "type": "number" @@ -11707,7 +11717,7 @@ "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -11722,7 +11732,8 @@ "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ], "additionalProperties": false, @@ -11731,7 +11742,15 @@ "title": "number", "type": "number" }, - "DealIDs": { + "DailyFee": { + "additionalProperties": false, + "type": "object" + }, + "DealWeight": { + "additionalProperties": false, + "type": "object" + }, + "DeprecatedDealIDs": { "items": { "description": "Number is a number", "title": "number", @@ -11739,10 +11758,6 @@ }, "type": "array" }, - "DealWeight": { - "additionalProperties": false, - "type": "object" - }, "ExpectedDayReward": { "additionalProperties": false, "type": "object" diff --git a/build/params_shared_vals.go b/build/params_shared_vals.go index 370e8fb8dad..d3478d5c693 100644 --- a/build/params_shared_vals.go +++ b/build/params_shared_vals.go @@ -34,11 +34,9 @@ var ZeroAddress = buildconstants.ZeroAddress // Deprecated: Use buildconstants.Z var Devnet = buildconstants.Devnet // Deprecated: Use buildconstants.Devnet instead -var FilBase = buildconstants.FilBase // Deprecated: Use buildconstants.FilBase instead -var FilAllocStorageMining = buildconstants.FilAllocStorageMining // Deprecated: Use buildconstants.FilAllocStorageMining instead +var FilBase = buildconstants.FilBase // Deprecated: Use buildconstants.FilBase instead var FilecoinPrecision = buildconstants.FilecoinPrecision // Deprecated: Use buildconstants.FilecoinPrecision instead -var FilReserved = buildconstants.FilReserved // Deprecated: Use buildconstants.FilReserved instead var InitialRewardBalance = buildconstants.InitialRewardBalance // Deprecated: Use buildconstants.InitialRewardBalance instead var InitialFilReserved = buildconstants.InitialFilReserved // Deprecated: Use buildconstants.InitialFilReserved instead diff --git a/chain/actors/builtin/market/actor.go.template b/chain/actors/builtin/market/actor.go.template index 9750f1352a7..771453a5ca4 100644 --- a/chain/actors/builtin/market/actor.go.template +++ b/chain/actors/builtin/market/actor.go.template @@ -15,8 +15,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "github.com/filecoin-project/go-state-types/manifest" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" {{range .versions}} {{if (le . 7)}} builtin{{.}} "github.com/filecoin-project/specs-actors{{import .}}actors/builtin" diff --git a/chain/actors/builtin/market/market.go b/chain/actors/builtin/market/market.go index 10e58663c0c..1e1a88126c5 100644 --- a/chain/actors/builtin/market/market.go +++ b/chain/actors/builtin/market/market.go @@ -12,8 +12,8 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" builtintypes "github.com/filecoin-project/go-state-types/builtin" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/cbor" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/go-state-types/network" diff --git a/chain/actors/builtin/market/state.go.template b/chain/actors/builtin/market/state.go.template index 65f228bc3e7..87c0d555543 100644 --- a/chain/actors/builtin/market/state.go.template +++ b/chain/actors/builtin/market/state.go.template @@ -27,7 +27,7 @@ import ( adt{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/util/adt" {{else}} market{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}market" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" adt{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}util/adt" {{end}} {{if (ge .v 3)}} diff --git a/chain/actors/builtin/market/v10.go b/chain/actors/builtin/market/v10.go index 1c98dfa91f7..da71814468e 100644 --- a/chain/actors/builtin/market/v10.go +++ b/chain/actors/builtin/market/v10.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/builtin" market10 "github.com/filecoin-project/go-state-types/builtin/v10/market" adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" diff --git a/chain/actors/builtin/market/v11.go b/chain/actors/builtin/market/v11.go index 9f4630f51d7..dbbcdd01602 100644 --- a/chain/actors/builtin/market/v11.go +++ b/chain/actors/builtin/market/v11.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/builtin" market11 "github.com/filecoin-project/go-state-types/builtin/v11/market" adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" diff --git a/chain/actors/builtin/market/v12.go b/chain/actors/builtin/market/v12.go index 94471f617c0..ce318f86a62 100644 --- a/chain/actors/builtin/market/v12.go +++ b/chain/actors/builtin/market/v12.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/builtin" market12 "github.com/filecoin-project/go-state-types/builtin/v12/market" adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" diff --git a/chain/actors/builtin/market/v13.go b/chain/actors/builtin/market/v13.go index 2e650e0fefc..20b4f3f1261 100644 --- a/chain/actors/builtin/market/v13.go +++ b/chain/actors/builtin/market/v13.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/builtin" market13 "github.com/filecoin-project/go-state-types/builtin/v13/market" adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" diff --git a/chain/actors/builtin/market/v14.go b/chain/actors/builtin/market/v14.go index 02022164588..f29929d7d59 100644 --- a/chain/actors/builtin/market/v14.go +++ b/chain/actors/builtin/market/v14.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/builtin" market14 "github.com/filecoin-project/go-state-types/builtin/v14/market" adt14 "github.com/filecoin-project/go-state-types/builtin/v14/util/adt" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" diff --git a/chain/actors/builtin/market/v15.go b/chain/actors/builtin/market/v15.go index 0fee17b9d45..2daae353949 100644 --- a/chain/actors/builtin/market/v15.go +++ b/chain/actors/builtin/market/v15.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/builtin" market15 "github.com/filecoin-project/go-state-types/builtin/v15/market" adt15 "github.com/filecoin-project/go-state-types/builtin/v15/util/adt" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" diff --git a/chain/actors/builtin/market/v16.go b/chain/actors/builtin/market/v16.go index fb7f6021173..b6492af9210 100644 --- a/chain/actors/builtin/market/v16.go +++ b/chain/actors/builtin/market/v16.go @@ -15,8 +15,8 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/builtin" market16 "github.com/filecoin-project/go-state-types/builtin/v16/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" adt16 "github.com/filecoin-project/go-state-types/builtin/v16/util/adt" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" diff --git a/chain/actors/builtin/market/v8.go b/chain/actors/builtin/market/v8.go index 95759d79064..487188ad96d 100644 --- a/chain/actors/builtin/market/v8.go +++ b/chain/actors/builtin/market/v8.go @@ -14,9 +14,9 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/builtin" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" market8 "github.com/filecoin-project/go-state-types/builtin/v8/market" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" diff --git a/chain/actors/builtin/market/v9.go b/chain/actors/builtin/market/v9.go index 89eadc6ae0e..f3287995967 100644 --- a/chain/actors/builtin/market/v9.go +++ b/chain/actors/builtin/market/v9.go @@ -14,8 +14,8 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/builtin" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" market9 "github.com/filecoin-project/go-state-types/builtin/v9/market" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" "github.com/filecoin-project/go-state-types/manifest" diff --git a/chain/actors/builtin/miner/actor.go.template b/chain/actors/builtin/miner/actor.go.template index de590c93f32..daa21a61dff 100644 --- a/chain/actors/builtin/miner/actor.go.template +++ b/chain/actors/builtin/miner/actor.go.template @@ -17,8 +17,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" - minertypes13 "github.com/filecoin-project/go-state-types/builtin/v13/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes16 "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/go-state-types/manifest" {{range .versions}} @@ -126,6 +125,7 @@ type Deadline interface { PartitionsChanged(Deadline) (bool, error) DisputableProofCount() (uint64, error) + DailyFee() (abi.TokenAmount, error) } type Partition interface { @@ -153,7 +153,7 @@ type Partition interface { UnprovenSectors() (bitfield.BitField, error) } -type SectorOnChainInfo = minertypes13.SectorOnChainInfo +type SectorOnChainInfo = minertypes16.SectorOnChainInfo func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof, configWantSynthetic bool) (abi.RegisteredSealProof, error) { // We added support for the new proofs in network version 7, and removed support for the old @@ -225,52 +225,52 @@ func WinningPoStProofTypeFromWindowPoStProofType(nver network.Version, proof abi } } -type MinerInfo = minertypes.MinerInfo -type BeneficiaryTerm = minertypes.BeneficiaryTerm -type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange -type WorkerKeyChange = minertypes.WorkerKeyChange -type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo -type SectorPreCommitInfo = minertypes.SectorPreCommitInfo -type SubmitWindowedPoStParams = minertypes.SubmitWindowedPoStParams -type PoStPartition = minertypes.PoStPartition -type RecoveryDeclaration = minertypes.RecoveryDeclaration -type FaultDeclaration = minertypes.FaultDeclaration -type DeclareFaultsRecoveredParams = minertypes.DeclareFaultsRecoveredParams -type DeclareFaultsParams = minertypes.DeclareFaultsParams -type ProveCommitAggregateParams = minertypes.ProveCommitAggregateParams -type ProveCommitSectorParams = minertypes.ProveCommitSectorParams -type ProveReplicaUpdatesParams = minertypes.ProveReplicaUpdatesParams -type ProveReplicaUpdatesParams2 = minertypes.ProveReplicaUpdatesParams2 -type ReplicaUpdate = minertypes.ReplicaUpdate -type ReplicaUpdate2 = minertypes.ReplicaUpdate2 -type PreCommitSectorBatchParams = minertypes.PreCommitSectorBatchParams -type PreCommitSectorBatchParams2 = minertypes.PreCommitSectorBatchParams2 -type ExtendSectorExpiration2Params = minertypes.ExtendSectorExpiration2Params -type SectorClaim = minertypes.SectorClaim -type ExpirationExtension2 = minertypes.ExpirationExtension2 -type CompactPartitionsParams = minertypes.CompactPartitionsParams -type WithdrawBalanceParams = minertypes.WithdrawBalanceParams - -type PieceActivationManifest = minertypes13.PieceActivationManifest -type ProveCommitSectors3Params = minertypes13.ProveCommitSectors3Params -type SectorActivationManifest = minertypes13.SectorActivationManifest -type ProveReplicaUpdates3Params = minertypes13.ProveReplicaUpdates3Params -type SectorUpdateManifest = minertypes13.SectorUpdateManifest -type SectorOnChainInfoFlags = minertypes13.SectorOnChainInfoFlags -type VerifiedAllocationKey = minertypes13.VerifiedAllocationKey - -var QAPowerMax = minertypes.QAPowerMax +type MinerInfo = minertypes16.MinerInfo +type BeneficiaryTerm = minertypes16.BeneficiaryTerm +type PendingBeneficiaryChange = minertypes16.PendingBeneficiaryChange +type WorkerKeyChange = minertypes16.WorkerKeyChange +type SectorPreCommitOnChainInfo = minertypes16.SectorPreCommitOnChainInfo +type SectorPreCommitInfo = minertypes16.SectorPreCommitInfo +type SubmitWindowedPoStParams = minertypes16.SubmitWindowedPoStParams +type PoStPartition = minertypes16.PoStPartition +type RecoveryDeclaration = minertypes16.RecoveryDeclaration +type FaultDeclaration = minertypes16.FaultDeclaration +type DeclareFaultsRecoveredParams = minertypes16.DeclareFaultsRecoveredParams +type DeclareFaultsParams = minertypes16.DeclareFaultsParams +type ProveCommitAggregateParams = minertypes16.ProveCommitAggregateParams +type ProveCommitSectorParams = minertypes16.ProveCommitSectorParams +type ProveReplicaUpdatesParams = minertypes16.ProveReplicaUpdatesParams +type ProveReplicaUpdatesParams2 = minertypes16.ProveReplicaUpdatesParams2 +type ReplicaUpdate = minertypes16.ReplicaUpdate +type ReplicaUpdate2 = minertypes16.ReplicaUpdate2 +type PreCommitSectorBatchParams = minertypes16.PreCommitSectorBatchParams +type PreCommitSectorBatchParams2 = minertypes16.PreCommitSectorBatchParams2 +type ExtendSectorExpiration2Params = minertypes16.ExtendSectorExpiration2Params +type SectorClaim = minertypes16.SectorClaim +type ExpirationExtension2 = minertypes16.ExpirationExtension2 +type CompactPartitionsParams = minertypes16.CompactPartitionsParams +type WithdrawBalanceParams = minertypes16.WithdrawBalanceParams + +type PieceActivationManifest = minertypes16.PieceActivationManifest +type ProveCommitSectors3Params = minertypes16.ProveCommitSectors3Params +type SectorActivationManifest = minertypes16.SectorActivationManifest +type ProveReplicaUpdates3Params = minertypes16.ProveReplicaUpdates3Params +type SectorUpdateManifest = minertypes16.SectorUpdateManifest +type SectorOnChainInfoFlags = minertypes16.SectorOnChainInfoFlags +type VerifiedAllocationKey = minertypes16.VerifiedAllocationKey + +var QAPowerMax = minertypes16.QAPowerMax type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo -var WPoStProvingPeriod = func() abi.ChainEpoch { return minertypes.WPoStProvingPeriod } -var WPoStChallengeWindow = func() abi.ChainEpoch { return minertypes.WPoStChallengeWindow } +var WPoStProvingPeriod = func() abi.ChainEpoch { return minertypes16.WPoStProvingPeriod } +var WPoStChallengeWindow = func() abi.ChainEpoch { return minertypes16.WPoStChallengeWindow } -const WPoStPeriodDeadlines = minertypes.WPoStPeriodDeadlines -const WPoStChallengeLookback = minertypes.WPoStChallengeLookback -const FaultDeclarationCutoff = minertypes.FaultDeclarationCutoff -const MinAggregatedSectors = minertypes.MinAggregatedSectors -const MinSectorExpiration = minertypes.MinSectorExpiration +const WPoStPeriodDeadlines = minertypes16.WPoStPeriodDeadlines +const WPoStChallengeLookback = minertypes16.WPoStChallengeLookback +const FaultDeclarationCutoff = minertypes16.FaultDeclarationCutoff +const MinAggregatedSectors = minertypes16.MinAggregatedSectors +const MinSectorExpiration = minertypes16.MinSectorExpiration type SectorExpiration struct { OnTime abi.ChainEpoch diff --git a/chain/actors/builtin/miner/miner.go b/chain/actors/builtin/miner/miner.go index 62ced8d0554..f45e1105f69 100644 --- a/chain/actors/builtin/miner/miner.go +++ b/chain/actors/builtin/miner/miner.go @@ -9,8 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" - minertypes13 "github.com/filecoin-project/go-state-types/builtin/v13/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes16 "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/go-state-types/cbor" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/manifest" @@ -210,6 +209,7 @@ type Deadline interface { PartitionsChanged(Deadline) (bool, error) DisputableProofCount() (uint64, error) + DailyFee() (abi.TokenAmount, error) } type Partition interface { @@ -237,7 +237,7 @@ type Partition interface { UnprovenSectors() (bitfield.BitField, error) } -type SectorOnChainInfo = minertypes13.SectorOnChainInfo +type SectorOnChainInfo = minertypes16.SectorOnChainInfo func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof, configWantSynthetic bool) (abi.RegisteredSealProof, error) { // We added support for the new proofs in network version 7, and removed support for the old @@ -309,52 +309,52 @@ func WinningPoStProofTypeFromWindowPoStProofType(nver network.Version, proof abi } } -type MinerInfo = minertypes.MinerInfo -type BeneficiaryTerm = minertypes.BeneficiaryTerm -type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange -type WorkerKeyChange = minertypes.WorkerKeyChange -type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo -type SectorPreCommitInfo = minertypes.SectorPreCommitInfo -type SubmitWindowedPoStParams = minertypes.SubmitWindowedPoStParams -type PoStPartition = minertypes.PoStPartition -type RecoveryDeclaration = minertypes.RecoveryDeclaration -type FaultDeclaration = minertypes.FaultDeclaration -type DeclareFaultsRecoveredParams = minertypes.DeclareFaultsRecoveredParams -type DeclareFaultsParams = minertypes.DeclareFaultsParams -type ProveCommitAggregateParams = minertypes.ProveCommitAggregateParams -type ProveCommitSectorParams = minertypes.ProveCommitSectorParams -type ProveReplicaUpdatesParams = minertypes.ProveReplicaUpdatesParams -type ProveReplicaUpdatesParams2 = minertypes.ProveReplicaUpdatesParams2 -type ReplicaUpdate = minertypes.ReplicaUpdate -type ReplicaUpdate2 = minertypes.ReplicaUpdate2 -type PreCommitSectorBatchParams = minertypes.PreCommitSectorBatchParams -type PreCommitSectorBatchParams2 = minertypes.PreCommitSectorBatchParams2 -type ExtendSectorExpiration2Params = minertypes.ExtendSectorExpiration2Params -type SectorClaim = minertypes.SectorClaim -type ExpirationExtension2 = minertypes.ExpirationExtension2 -type CompactPartitionsParams = minertypes.CompactPartitionsParams -type WithdrawBalanceParams = minertypes.WithdrawBalanceParams - -type PieceActivationManifest = minertypes13.PieceActivationManifest -type ProveCommitSectors3Params = minertypes13.ProveCommitSectors3Params -type SectorActivationManifest = minertypes13.SectorActivationManifest -type ProveReplicaUpdates3Params = minertypes13.ProveReplicaUpdates3Params -type SectorUpdateManifest = minertypes13.SectorUpdateManifest -type SectorOnChainInfoFlags = minertypes13.SectorOnChainInfoFlags -type VerifiedAllocationKey = minertypes13.VerifiedAllocationKey - -var QAPowerMax = minertypes.QAPowerMax +type MinerInfo = minertypes16.MinerInfo +type BeneficiaryTerm = minertypes16.BeneficiaryTerm +type PendingBeneficiaryChange = minertypes16.PendingBeneficiaryChange +type WorkerKeyChange = minertypes16.WorkerKeyChange +type SectorPreCommitOnChainInfo = minertypes16.SectorPreCommitOnChainInfo +type SectorPreCommitInfo = minertypes16.SectorPreCommitInfo +type SubmitWindowedPoStParams = minertypes16.SubmitWindowedPoStParams +type PoStPartition = minertypes16.PoStPartition +type RecoveryDeclaration = minertypes16.RecoveryDeclaration +type FaultDeclaration = minertypes16.FaultDeclaration +type DeclareFaultsRecoveredParams = minertypes16.DeclareFaultsRecoveredParams +type DeclareFaultsParams = minertypes16.DeclareFaultsParams +type ProveCommitAggregateParams = minertypes16.ProveCommitAggregateParams +type ProveCommitSectorParams = minertypes16.ProveCommitSectorParams +type ProveReplicaUpdatesParams = minertypes16.ProveReplicaUpdatesParams +type ProveReplicaUpdatesParams2 = minertypes16.ProveReplicaUpdatesParams2 +type ReplicaUpdate = minertypes16.ReplicaUpdate +type ReplicaUpdate2 = minertypes16.ReplicaUpdate2 +type PreCommitSectorBatchParams = minertypes16.PreCommitSectorBatchParams +type PreCommitSectorBatchParams2 = minertypes16.PreCommitSectorBatchParams2 +type ExtendSectorExpiration2Params = minertypes16.ExtendSectorExpiration2Params +type SectorClaim = minertypes16.SectorClaim +type ExpirationExtension2 = minertypes16.ExpirationExtension2 +type CompactPartitionsParams = minertypes16.CompactPartitionsParams +type WithdrawBalanceParams = minertypes16.WithdrawBalanceParams + +type PieceActivationManifest = minertypes16.PieceActivationManifest +type ProveCommitSectors3Params = minertypes16.ProveCommitSectors3Params +type SectorActivationManifest = minertypes16.SectorActivationManifest +type ProveReplicaUpdates3Params = minertypes16.ProveReplicaUpdates3Params +type SectorUpdateManifest = minertypes16.SectorUpdateManifest +type SectorOnChainInfoFlags = minertypes16.SectorOnChainInfoFlags +type VerifiedAllocationKey = minertypes16.VerifiedAllocationKey + +var QAPowerMax = minertypes16.QAPowerMax type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo -var WPoStProvingPeriod = func() abi.ChainEpoch { return minertypes.WPoStProvingPeriod } -var WPoStChallengeWindow = func() abi.ChainEpoch { return minertypes.WPoStChallengeWindow } +var WPoStProvingPeriod = func() abi.ChainEpoch { return minertypes16.WPoStProvingPeriod } +var WPoStChallengeWindow = func() abi.ChainEpoch { return minertypes16.WPoStChallengeWindow } -const WPoStPeriodDeadlines = minertypes.WPoStPeriodDeadlines -const WPoStChallengeLookback = minertypes.WPoStChallengeLookback -const FaultDeclarationCutoff = minertypes.FaultDeclarationCutoff -const MinAggregatedSectors = minertypes.MinAggregatedSectors -const MinSectorExpiration = minertypes.MinSectorExpiration +const WPoStPeriodDeadlines = minertypes16.WPoStPeriodDeadlines +const WPoStChallengeLookback = minertypes16.WPoStChallengeLookback +const FaultDeclarationCutoff = minertypes16.FaultDeclarationCutoff +const MinAggregatedSectors = minertypes16.MinAggregatedSectors +const MinSectorExpiration = minertypes16.MinSectorExpiration type SectorExpiration struct { OnTime abi.ChainEpoch diff --git a/chain/actors/builtin/miner/state.go.template b/chain/actors/builtin/miner/state.go.template index a940dd9ea53..b80f79d047d 100644 --- a/chain/actors/builtin/miner/state.go.template +++ b/chain/actors/builtin/miner/state.go.template @@ -4,12 +4,10 @@ import ( "fmt" "bytes" "errors" -{{if (le .v 1)}} - "github.com/filecoin-project/go-state-types/big" -{{end}} "github.com/filecoin-project/go-bitfield" rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/dline" "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" @@ -552,6 +550,15 @@ func (d *deadline{{.v}}) DisputableProofCount() (uint64, error) { {{end}} } +func (d *deadline{{.v}}) DailyFee() (abi.TokenAmount, error) { +{{- if (ge .v 16)}} + if d.Deadline.DailyFee.Int != nil { + return d.Deadline.DailyFee, nil + } +{{- end}} + return big.Zero(), nil +} + func (p *partition{{.v}}) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -569,26 +576,37 @@ func (p *partition{{.v}}) UnprovenSectors() (bitfield.BitField, error) { } func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorOnChainInfo { +{{- if (ge .v 16)}} + dailyFee := v{{.v}}.DailyFee + if dailyFee.Int == nil { + dailyFee = big.Zero() + } +{{- end}} info := SectorOnChainInfo{ SectorNumber: v{{.v}}.SectorNumber, SealProof: v{{.v}}.SealProof, SealedCID: v{{.v}}.SealedCID, - DealIDs: v{{.v}}.DealIDs, + DeprecatedDealIDs: v{{.v}}.{{if (ge .v 16)}}Deprecated{{end}}DealIDs, Activation: v{{.v}}.Activation, Expiration: v{{.v}}.Expiration, DealWeight: v{{.v}}.DealWeight, VerifiedDealWeight: v{{.v}}.VerifiedDealWeight, InitialPledge: v{{.v}}.InitialPledge, - ExpectedDayReward: v{{.v}}.ExpectedDayReward, - ExpectedStoragePledge: v{{.v}}.ExpectedStoragePledge, - {{if (ge .v 7)}} + ExpectedDayReward: {{ if (lt .v 16)}}&{{end}}v{{.v}}.ExpectedDayReward, + ExpectedStoragePledge: {{ if (lt .v 16)}}&{{end}}v{{.v}}.ExpectedStoragePledge, + {{- if (ge .v 7)}} SectorKeyCID: v{{.v}}.SectorKeyCID, - {{end}} - {{if (ge .v 12)}} + {{- end}} + {{- if (ge .v 12)}} PowerBaseEpoch: v{{.v}}.PowerBaseEpoch, - ReplacedDayReward: v{{.v}}.ReplacedDayReward, + ReplacedDayReward: {{ if (lt .v 16)}}&{{end}}v{{.v}}.ReplacedDayReward, Flags: SectorOnChainInfoFlags(v{{.v}}.Flags), - {{end}} + {{- end}} + {{- if (ge .v 16)}} + DailyFee: dailyFee, + {{- else}} + DailyFee: big.Zero(), + {{- end}} } return info } diff --git a/chain/actors/builtin/miner/v0.go b/chain/actors/builtin/miner/v0.go index 5301ed1cbca..e06326b5455 100644 --- a/chain/actors/builtin/miner/v0.go +++ b/chain/actors/builtin/miner/v0.go @@ -480,6 +480,10 @@ func (d *deadline0) DisputableProofCount() (uint64, error) { } +func (d *deadline0) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition0) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -501,14 +505,15 @@ func fromV0SectorOnChainInfo(v0 miner0.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v0.SectorNumber, SealProof: v0.SealProof, SealedCID: v0.SealedCID, - DealIDs: v0.DealIDs, + DeprecatedDealIDs: v0.DealIDs, Activation: v0.Activation, Expiration: v0.Expiration, DealWeight: v0.DealWeight, VerifiedDealWeight: v0.VerifiedDealWeight, InitialPledge: v0.InitialPledge, - ExpectedDayReward: v0.ExpectedDayReward, - ExpectedStoragePledge: v0.ExpectedStoragePledge, + ExpectedDayReward: &v0.ExpectedDayReward, + ExpectedStoragePledge: &v0.ExpectedStoragePledge, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v10.go b/chain/actors/builtin/miner/v10.go index 53dc90b4560..01517073805 100644 --- a/chain/actors/builtin/miner/v10.go +++ b/chain/actors/builtin/miner/v10.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" builtin10 "github.com/filecoin-project/go-state-types/builtin" miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" @@ -514,6 +515,10 @@ func (d *deadline10) DisputableProofCount() (uint64, error) { } +func (d *deadline10) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition10) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -535,16 +540,16 @@ func fromV10SectorOnChainInfo(v10 miner10.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v10.SectorNumber, SealProof: v10.SealProof, SealedCID: v10.SealedCID, - DealIDs: v10.DealIDs, + DeprecatedDealIDs: v10.DealIDs, Activation: v10.Activation, Expiration: v10.Expiration, DealWeight: v10.DealWeight, VerifiedDealWeight: v10.VerifiedDealWeight, InitialPledge: v10.InitialPledge, - ExpectedDayReward: v10.ExpectedDayReward, - ExpectedStoragePledge: v10.ExpectedStoragePledge, - - SectorKeyCID: v10.SectorKeyCID, + ExpectedDayReward: &v10.ExpectedDayReward, + ExpectedStoragePledge: &v10.ExpectedStoragePledge, + SectorKeyCID: v10.SectorKeyCID, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v11.go b/chain/actors/builtin/miner/v11.go index 11a91c26b23..8fd030e535a 100644 --- a/chain/actors/builtin/miner/v11.go +++ b/chain/actors/builtin/miner/v11.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" builtin11 "github.com/filecoin-project/go-state-types/builtin" miner11 "github.com/filecoin-project/go-state-types/builtin/v11/miner" adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" @@ -514,6 +515,10 @@ func (d *deadline11) DisputableProofCount() (uint64, error) { } +func (d *deadline11) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition11) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -535,16 +540,16 @@ func fromV11SectorOnChainInfo(v11 miner11.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v11.SectorNumber, SealProof: v11.SealProof, SealedCID: v11.SealedCID, - DealIDs: v11.DealIDs, + DeprecatedDealIDs: v11.DealIDs, Activation: v11.Activation, Expiration: v11.Expiration, DealWeight: v11.DealWeight, VerifiedDealWeight: v11.VerifiedDealWeight, InitialPledge: v11.InitialPledge, - ExpectedDayReward: v11.ExpectedDayReward, - ExpectedStoragePledge: v11.ExpectedStoragePledge, - - SectorKeyCID: v11.SectorKeyCID, + ExpectedDayReward: &v11.ExpectedDayReward, + ExpectedStoragePledge: &v11.ExpectedStoragePledge, + SectorKeyCID: v11.SectorKeyCID, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v12.go b/chain/actors/builtin/miner/v12.go index a26d78d3204..74675d25b69 100644 --- a/chain/actors/builtin/miner/v12.go +++ b/chain/actors/builtin/miner/v12.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" builtin12 "github.com/filecoin-project/go-state-types/builtin" miner12 "github.com/filecoin-project/go-state-types/builtin/v12/miner" adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" @@ -514,6 +515,10 @@ func (d *deadline12) DisputableProofCount() (uint64, error) { } +func (d *deadline12) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition12) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -535,20 +540,19 @@ func fromV12SectorOnChainInfo(v12 miner12.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v12.SectorNumber, SealProof: v12.SealProof, SealedCID: v12.SealedCID, - DealIDs: v12.DealIDs, + DeprecatedDealIDs: v12.DealIDs, Activation: v12.Activation, Expiration: v12.Expiration, DealWeight: v12.DealWeight, VerifiedDealWeight: v12.VerifiedDealWeight, InitialPledge: v12.InitialPledge, - ExpectedDayReward: v12.ExpectedDayReward, - ExpectedStoragePledge: v12.ExpectedStoragePledge, - - SectorKeyCID: v12.SectorKeyCID, - - PowerBaseEpoch: v12.PowerBaseEpoch, - ReplacedDayReward: v12.ReplacedDayReward, - Flags: SectorOnChainInfoFlags(v12.Flags), + ExpectedDayReward: &v12.ExpectedDayReward, + ExpectedStoragePledge: &v12.ExpectedStoragePledge, + SectorKeyCID: v12.SectorKeyCID, + PowerBaseEpoch: v12.PowerBaseEpoch, + ReplacedDayReward: &v12.ReplacedDayReward, + Flags: SectorOnChainInfoFlags(v12.Flags), + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v13.go b/chain/actors/builtin/miner/v13.go index c033a9907c8..baaa3cd6c24 100644 --- a/chain/actors/builtin/miner/v13.go +++ b/chain/actors/builtin/miner/v13.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" builtin13 "github.com/filecoin-project/go-state-types/builtin" miner13 "github.com/filecoin-project/go-state-types/builtin/v13/miner" adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" @@ -514,6 +515,10 @@ func (d *deadline13) DisputableProofCount() (uint64, error) { } +func (d *deadline13) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition13) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -535,20 +540,19 @@ func fromV13SectorOnChainInfo(v13 miner13.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v13.SectorNumber, SealProof: v13.SealProof, SealedCID: v13.SealedCID, - DealIDs: v13.DealIDs, + DeprecatedDealIDs: v13.DealIDs, Activation: v13.Activation, Expiration: v13.Expiration, DealWeight: v13.DealWeight, VerifiedDealWeight: v13.VerifiedDealWeight, InitialPledge: v13.InitialPledge, - ExpectedDayReward: v13.ExpectedDayReward, - ExpectedStoragePledge: v13.ExpectedStoragePledge, - - SectorKeyCID: v13.SectorKeyCID, - - PowerBaseEpoch: v13.PowerBaseEpoch, - ReplacedDayReward: v13.ReplacedDayReward, - Flags: SectorOnChainInfoFlags(v13.Flags), + ExpectedDayReward: &v13.ExpectedDayReward, + ExpectedStoragePledge: &v13.ExpectedStoragePledge, + SectorKeyCID: v13.SectorKeyCID, + PowerBaseEpoch: v13.PowerBaseEpoch, + ReplacedDayReward: &v13.ReplacedDayReward, + Flags: SectorOnChainInfoFlags(v13.Flags), + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v14.go b/chain/actors/builtin/miner/v14.go index 3153bead3fd..fc7402b2705 100644 --- a/chain/actors/builtin/miner/v14.go +++ b/chain/actors/builtin/miner/v14.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" builtin14 "github.com/filecoin-project/go-state-types/builtin" miner14 "github.com/filecoin-project/go-state-types/builtin/v14/miner" adt14 "github.com/filecoin-project/go-state-types/builtin/v14/util/adt" @@ -514,6 +515,10 @@ func (d *deadline14) DisputableProofCount() (uint64, error) { } +func (d *deadline14) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition14) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -535,20 +540,19 @@ func fromV14SectorOnChainInfo(v14 miner14.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v14.SectorNumber, SealProof: v14.SealProof, SealedCID: v14.SealedCID, - DealIDs: v14.DealIDs, + DeprecatedDealIDs: v14.DealIDs, Activation: v14.Activation, Expiration: v14.Expiration, DealWeight: v14.DealWeight, VerifiedDealWeight: v14.VerifiedDealWeight, InitialPledge: v14.InitialPledge, - ExpectedDayReward: v14.ExpectedDayReward, - ExpectedStoragePledge: v14.ExpectedStoragePledge, - - SectorKeyCID: v14.SectorKeyCID, - - PowerBaseEpoch: v14.PowerBaseEpoch, - ReplacedDayReward: v14.ReplacedDayReward, - Flags: SectorOnChainInfoFlags(v14.Flags), + ExpectedDayReward: &v14.ExpectedDayReward, + ExpectedStoragePledge: &v14.ExpectedStoragePledge, + SectorKeyCID: v14.SectorKeyCID, + PowerBaseEpoch: v14.PowerBaseEpoch, + ReplacedDayReward: &v14.ReplacedDayReward, + Flags: SectorOnChainInfoFlags(v14.Flags), + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v15.go b/chain/actors/builtin/miner/v15.go index 3895daac509..a997fe522f7 100644 --- a/chain/actors/builtin/miner/v15.go +++ b/chain/actors/builtin/miner/v15.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" builtin15 "github.com/filecoin-project/go-state-types/builtin" miner15 "github.com/filecoin-project/go-state-types/builtin/v15/miner" adt15 "github.com/filecoin-project/go-state-types/builtin/v15/util/adt" @@ -514,6 +515,10 @@ func (d *deadline15) DisputableProofCount() (uint64, error) { } +func (d *deadline15) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition15) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -535,20 +540,19 @@ func fromV15SectorOnChainInfo(v15 miner15.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v15.SectorNumber, SealProof: v15.SealProof, SealedCID: v15.SealedCID, - DealIDs: v15.DealIDs, + DeprecatedDealIDs: v15.DealIDs, Activation: v15.Activation, Expiration: v15.Expiration, DealWeight: v15.DealWeight, VerifiedDealWeight: v15.VerifiedDealWeight, InitialPledge: v15.InitialPledge, - ExpectedDayReward: v15.ExpectedDayReward, - ExpectedStoragePledge: v15.ExpectedStoragePledge, - - SectorKeyCID: v15.SectorKeyCID, - - PowerBaseEpoch: v15.PowerBaseEpoch, - ReplacedDayReward: v15.ReplacedDayReward, - Flags: SectorOnChainInfoFlags(v15.Flags), + ExpectedDayReward: &v15.ExpectedDayReward, + ExpectedStoragePledge: &v15.ExpectedStoragePledge, + SectorKeyCID: v15.SectorKeyCID, + PowerBaseEpoch: v15.PowerBaseEpoch, + ReplacedDayReward: &v15.ReplacedDayReward, + Flags: SectorOnChainInfoFlags(v15.Flags), + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v16.go b/chain/actors/builtin/miner/v16.go index f1809c00343..4453332e16e 100644 --- a/chain/actors/builtin/miner/v16.go +++ b/chain/actors/builtin/miner/v16.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" builtin16 "github.com/filecoin-project/go-state-types/builtin" miner16 "github.com/filecoin-project/go-state-types/builtin/v16/miner" adt16 "github.com/filecoin-project/go-state-types/builtin/v16/util/adt" @@ -514,6 +515,13 @@ func (d *deadline16) DisputableProofCount() (uint64, error) { } +func (d *deadline16) DailyFee() (abi.TokenAmount, error) { + if d.Deadline.DailyFee.Int != nil { + return d.Deadline.DailyFee, nil + } + return big.Zero(), nil +} + func (p *partition16) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -531,11 +539,15 @@ func (p *partition16) UnprovenSectors() (bitfield.BitField, error) { } func fromV16SectorOnChainInfo(v16 miner16.SectorOnChainInfo) SectorOnChainInfo { + dailyFee := v16.DailyFee + if dailyFee.Int == nil { + dailyFee = big.Zero() + } info := SectorOnChainInfo{ SectorNumber: v16.SectorNumber, SealProof: v16.SealProof, SealedCID: v16.SealedCID, - DealIDs: v16.DealIDs, + DeprecatedDealIDs: v16.DeprecatedDealIDs, Activation: v16.Activation, Expiration: v16.Expiration, DealWeight: v16.DealWeight, @@ -543,12 +555,11 @@ func fromV16SectorOnChainInfo(v16 miner16.SectorOnChainInfo) SectorOnChainInfo { InitialPledge: v16.InitialPledge, ExpectedDayReward: v16.ExpectedDayReward, ExpectedStoragePledge: v16.ExpectedStoragePledge, - - SectorKeyCID: v16.SectorKeyCID, - - PowerBaseEpoch: v16.PowerBaseEpoch, - ReplacedDayReward: v16.ReplacedDayReward, - Flags: SectorOnChainInfoFlags(v16.Flags), + SectorKeyCID: v16.SectorKeyCID, + PowerBaseEpoch: v16.PowerBaseEpoch, + ReplacedDayReward: v16.ReplacedDayReward, + Flags: SectorOnChainInfoFlags(v16.Flags), + DailyFee: dailyFee, } return info } diff --git a/chain/actors/builtin/miner/v2.go b/chain/actors/builtin/miner/v2.go index 5a81ad31f95..bc035c75e75 100644 --- a/chain/actors/builtin/miner/v2.go +++ b/chain/actors/builtin/miner/v2.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/manifest" miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner" @@ -511,6 +512,10 @@ func (d *deadline2) DisputableProofCount() (uint64, error) { } +func (d *deadline2) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition2) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -532,14 +537,15 @@ func fromV2SectorOnChainInfo(v2 miner2.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v2.SectorNumber, SealProof: v2.SealProof, SealedCID: v2.SealedCID, - DealIDs: v2.DealIDs, + DeprecatedDealIDs: v2.DealIDs, Activation: v2.Activation, Expiration: v2.Expiration, DealWeight: v2.DealWeight, VerifiedDealWeight: v2.VerifiedDealWeight, InitialPledge: v2.InitialPledge, - ExpectedDayReward: v2.ExpectedDayReward, - ExpectedStoragePledge: v2.ExpectedStoragePledge, + ExpectedDayReward: &v2.ExpectedDayReward, + ExpectedStoragePledge: &v2.ExpectedStoragePledge, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v3.go b/chain/actors/builtin/miner/v3.go index aa1574cf47d..2fefe01474f 100644 --- a/chain/actors/builtin/miner/v3.go +++ b/chain/actors/builtin/miner/v3.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/manifest" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -511,6 +512,10 @@ func (d *deadline3) DisputableProofCount() (uint64, error) { } +func (d *deadline3) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition3) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -532,14 +537,15 @@ func fromV3SectorOnChainInfo(v3 miner3.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v3.SectorNumber, SealProof: v3.SealProof, SealedCID: v3.SealedCID, - DealIDs: v3.DealIDs, + DeprecatedDealIDs: v3.DealIDs, Activation: v3.Activation, Expiration: v3.Expiration, DealWeight: v3.DealWeight, VerifiedDealWeight: v3.VerifiedDealWeight, InitialPledge: v3.InitialPledge, - ExpectedDayReward: v3.ExpectedDayReward, - ExpectedStoragePledge: v3.ExpectedStoragePledge, + ExpectedDayReward: &v3.ExpectedDayReward, + ExpectedStoragePledge: &v3.ExpectedStoragePledge, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v4.go b/chain/actors/builtin/miner/v4.go index 1faf30c0982..93a0ce480ad 100644 --- a/chain/actors/builtin/miner/v4.go +++ b/chain/actors/builtin/miner/v4.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/manifest" builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin" @@ -511,6 +512,10 @@ func (d *deadline4) DisputableProofCount() (uint64, error) { } +func (d *deadline4) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition4) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -532,14 +537,15 @@ func fromV4SectorOnChainInfo(v4 miner4.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v4.SectorNumber, SealProof: v4.SealProof, SealedCID: v4.SealedCID, - DealIDs: v4.DealIDs, + DeprecatedDealIDs: v4.DealIDs, Activation: v4.Activation, Expiration: v4.Expiration, DealWeight: v4.DealWeight, VerifiedDealWeight: v4.VerifiedDealWeight, InitialPledge: v4.InitialPledge, - ExpectedDayReward: v4.ExpectedDayReward, - ExpectedStoragePledge: v4.ExpectedStoragePledge, + ExpectedDayReward: &v4.ExpectedDayReward, + ExpectedStoragePledge: &v4.ExpectedStoragePledge, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v5.go b/chain/actors/builtin/miner/v5.go index be4b5e0b2e9..812233a177c 100644 --- a/chain/actors/builtin/miner/v5.go +++ b/chain/actors/builtin/miner/v5.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/manifest" builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin" @@ -511,6 +512,10 @@ func (d *deadline5) DisputableProofCount() (uint64, error) { } +func (d *deadline5) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition5) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -532,14 +537,15 @@ func fromV5SectorOnChainInfo(v5 miner5.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v5.SectorNumber, SealProof: v5.SealProof, SealedCID: v5.SealedCID, - DealIDs: v5.DealIDs, + DeprecatedDealIDs: v5.DealIDs, Activation: v5.Activation, Expiration: v5.Expiration, DealWeight: v5.DealWeight, VerifiedDealWeight: v5.VerifiedDealWeight, InitialPledge: v5.InitialPledge, - ExpectedDayReward: v5.ExpectedDayReward, - ExpectedStoragePledge: v5.ExpectedStoragePledge, + ExpectedDayReward: &v5.ExpectedDayReward, + ExpectedStoragePledge: &v5.ExpectedStoragePledge, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v6.go b/chain/actors/builtin/miner/v6.go index fa8c30e4070..25bcbdbf08d 100644 --- a/chain/actors/builtin/miner/v6.go +++ b/chain/actors/builtin/miner/v6.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/manifest" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" @@ -511,6 +512,10 @@ func (d *deadline6) DisputableProofCount() (uint64, error) { } +func (d *deadline6) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition6) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -532,14 +537,15 @@ func fromV6SectorOnChainInfo(v6 miner6.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v6.SectorNumber, SealProof: v6.SealProof, SealedCID: v6.SealedCID, - DealIDs: v6.DealIDs, + DeprecatedDealIDs: v6.DealIDs, Activation: v6.Activation, Expiration: v6.Expiration, DealWeight: v6.DealWeight, VerifiedDealWeight: v6.VerifiedDealWeight, InitialPledge: v6.InitialPledge, - ExpectedDayReward: v6.ExpectedDayReward, - ExpectedStoragePledge: v6.ExpectedStoragePledge, + ExpectedDayReward: &v6.ExpectedDayReward, + ExpectedStoragePledge: &v6.ExpectedStoragePledge, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v7.go b/chain/actors/builtin/miner/v7.go index d6bb0e16eae..f42a0edd1ce 100644 --- a/chain/actors/builtin/miner/v7.go +++ b/chain/actors/builtin/miner/v7.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/manifest" builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" @@ -510,6 +511,10 @@ func (d *deadline7) DisputableProofCount() (uint64, error) { } +func (d *deadline7) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition7) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -531,16 +536,16 @@ func fromV7SectorOnChainInfo(v7 miner7.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v7.SectorNumber, SealProof: v7.SealProof, SealedCID: v7.SealedCID, - DealIDs: v7.DealIDs, + DeprecatedDealIDs: v7.DealIDs, Activation: v7.Activation, Expiration: v7.Expiration, DealWeight: v7.DealWeight, VerifiedDealWeight: v7.VerifiedDealWeight, InitialPledge: v7.InitialPledge, - ExpectedDayReward: v7.ExpectedDayReward, - ExpectedStoragePledge: v7.ExpectedStoragePledge, - - SectorKeyCID: v7.SectorKeyCID, + ExpectedDayReward: &v7.ExpectedDayReward, + ExpectedStoragePledge: &v7.ExpectedStoragePledge, + SectorKeyCID: v7.SectorKeyCID, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v8.go b/chain/actors/builtin/miner/v8.go index 06a205e7626..7a44e0f8f15 100644 --- a/chain/actors/builtin/miner/v8.go +++ b/chain/actors/builtin/miner/v8.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" builtin8 "github.com/filecoin-project/go-state-types/builtin" miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" @@ -510,6 +511,10 @@ func (d *deadline8) DisputableProofCount() (uint64, error) { } +func (d *deadline8) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition8) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -531,16 +536,16 @@ func fromV8SectorOnChainInfo(v8 miner8.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v8.SectorNumber, SealProof: v8.SealProof, SealedCID: v8.SealedCID, - DealIDs: v8.DealIDs, + DeprecatedDealIDs: v8.DealIDs, Activation: v8.Activation, Expiration: v8.Expiration, DealWeight: v8.DealWeight, VerifiedDealWeight: v8.VerifiedDealWeight, InitialPledge: v8.InitialPledge, - ExpectedDayReward: v8.ExpectedDayReward, - ExpectedStoragePledge: v8.ExpectedStoragePledge, - - SectorKeyCID: v8.SectorKeyCID, + ExpectedDayReward: &v8.ExpectedDayReward, + ExpectedStoragePledge: &v8.ExpectedStoragePledge, + SectorKeyCID: v8.SectorKeyCID, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/miner/v9.go b/chain/actors/builtin/miner/v9.go index 6cbbd509ec3..f199e94d674 100644 --- a/chain/actors/builtin/miner/v9.go +++ b/chain/actors/builtin/miner/v9.go @@ -13,6 +13,7 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" builtin9 "github.com/filecoin-project/go-state-types/builtin" miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" @@ -514,6 +515,10 @@ func (d *deadline9) DisputableProofCount() (uint64, error) { } +func (d *deadline9) DailyFee() (abi.TokenAmount, error) { + return big.Zero(), nil +} + func (p *partition9) AllSectors() (bitfield.BitField, error) { return p.Partition.Sectors, nil } @@ -535,16 +540,16 @@ func fromV9SectorOnChainInfo(v9 miner9.SectorOnChainInfo) SectorOnChainInfo { SectorNumber: v9.SectorNumber, SealProof: v9.SealProof, SealedCID: v9.SealedCID, - DealIDs: v9.DealIDs, + DeprecatedDealIDs: v9.DealIDs, Activation: v9.Activation, Expiration: v9.Expiration, DealWeight: v9.DealWeight, VerifiedDealWeight: v9.VerifiedDealWeight, InitialPledge: v9.InitialPledge, - ExpectedDayReward: v9.ExpectedDayReward, - ExpectedStoragePledge: v9.ExpectedStoragePledge, - - SectorKeyCID: v9.SectorKeyCID, + ExpectedDayReward: &v9.ExpectedDayReward, + ExpectedStoragePledge: &v9.ExpectedStoragePledge, + SectorKeyCID: v9.SectorKeyCID, + DailyFee: big.Zero(), } return info } diff --git a/chain/actors/builtin/verifreg/actor.go.template b/chain/actors/builtin/verifreg/actor.go.template index 75c99f2aaef..182964b6440 100644 --- a/chain/actors/builtin/verifreg/actor.go.template +++ b/chain/actors/builtin/verifreg/actor.go.template @@ -20,8 +20,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/types" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" - verifregtypes12 "github.com/filecoin-project/go-state-types/builtin/v12/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" ) var ( @@ -102,17 +101,17 @@ type ( AllocationId = verifregtypes.AllocationId Claim = verifregtypes.Claim ClaimId = verifregtypes.ClaimId - AllocationRequest = verifregtypes12.AllocationRequest - AllocationRequests = verifregtypes12.AllocationRequests - RemoveExpiredAllocationsParams = verifregtypes12.RemoveExpiredAllocationsParams - AddVerifierParams = verifregtypes12.AddVerifierParams - AddVerifiedClientParams = verifregtypes12.AddVerifiedClientParams + AllocationRequest = verifregtypes.AllocationRequest + AllocationRequests = verifregtypes.AllocationRequests + RemoveExpiredAllocationsParams = verifregtypes.RemoveExpiredAllocationsParams + AddVerifierParams = verifregtypes.AddVerifierParams + AddVerifiedClientParams = verifregtypes.AddVerifiedClientParams ) const ( NoAllocationID = verifregtypes.NoAllocationID - MinimumVerifiedAllocationTerm = verifregtypes12.MinimumVerifiedAllocationTerm - MaximumVerifiedAllocationTerm = verifregtypes12.MaximumVerifiedAllocationTerm - MaximumVerifiedAllocationExpiration = verifregtypes12.MaximumVerifiedAllocationExpiration + MinimumVerifiedAllocationTerm = verifregtypes.MinimumVerifiedAllocationTerm + MaximumVerifiedAllocationTerm = verifregtypes.MaximumVerifiedAllocationTerm + MaximumVerifiedAllocationExpiration = verifregtypes.MaximumVerifiedAllocationExpiration ) diff --git a/chain/actors/builtin/verifreg/state.go.template b/chain/actors/builtin/verifreg/state.go.template index 7835b16b640..772ff5a2883 100644 --- a/chain/actors/builtin/verifreg/state.go.template +++ b/chain/actors/builtin/verifreg/state.go.template @@ -26,10 +26,10 @@ import ( {{if (ge .v 9)}} "github.com/filecoin-project/go-state-types/big" {{if (gt .v 9)}} - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" {{end}} {{else}} - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" {{end}} ) @@ -122,7 +122,7 @@ func (s *state{{.v}}) GetState() interface{} { return &s.State } -func (s *state{{.v}}) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state{{.v}}) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { {{if (le .v 8)}} return nil, false, xerrors.Errorf("unsupported in actors v{{.v}}") {{else}} @@ -160,7 +160,7 @@ func (s *state{{.v}}) GetAllAllocations() (map[AllocationId]Allocation, error) { {{end}} } -func (s *state{{.v}}) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state{{.v}}) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { {{if (le .v 8)}} return nil, false, xerrors.Errorf("unsupported in actors v{{.v}}") {{else}} diff --git a/chain/actors/builtin/verifreg/v0.go b/chain/actors/builtin/verifreg/v0.go index 4129e7a2dae..24776fc9745 100644 --- a/chain/actors/builtin/verifreg/v0.go +++ b/chain/actors/builtin/verifreg/v0.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" verifreg0 "github.com/filecoin-project/specs-actors/actors/builtin/verifreg" adt0 "github.com/filecoin-project/specs-actors/actors/util/adt" @@ -94,7 +94,7 @@ func (s *state0) GetState() interface{} { return &s.State } -func (s *state0) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state0) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v0") @@ -112,7 +112,7 @@ func (s *state0) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state0) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state0) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v0") diff --git a/chain/actors/builtin/verifreg/v10.go b/chain/actors/builtin/verifreg/v10.go index 85f85c7f2c9..0825a49d505 100644 --- a/chain/actors/builtin/verifreg/v10.go +++ b/chain/actors/builtin/verifreg/v10.go @@ -13,7 +13,7 @@ import ( builtin10 "github.com/filecoin-project/go-state-types/builtin" adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" verifreg10 "github.com/filecoin-project/go-state-types/builtin/v10/verifreg" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" @@ -95,7 +95,7 @@ func (s *state10) GetState() interface{} { return &s.State } -func (s *state10) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state10) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg10.AllocationId(allocationId)) return (*Allocation)(alloc), ok, err @@ -127,7 +127,7 @@ func (s *state10) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state10) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state10) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg10.ClaimId(claimId)) return (*Claim)(claim), ok, err diff --git a/chain/actors/builtin/verifreg/v11.go b/chain/actors/builtin/verifreg/v11.go index 5a8e1cb0cc8..ea756671767 100644 --- a/chain/actors/builtin/verifreg/v11.go +++ b/chain/actors/builtin/verifreg/v11.go @@ -13,7 +13,7 @@ import ( builtin11 "github.com/filecoin-project/go-state-types/builtin" adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" verifreg11 "github.com/filecoin-project/go-state-types/builtin/v11/verifreg" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" @@ -95,7 +95,7 @@ func (s *state11) GetState() interface{} { return &s.State } -func (s *state11) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state11) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg11.AllocationId(allocationId)) return (*Allocation)(alloc), ok, err @@ -127,7 +127,7 @@ func (s *state11) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state11) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state11) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg11.ClaimId(claimId)) return (*Claim)(claim), ok, err diff --git a/chain/actors/builtin/verifreg/v12.go b/chain/actors/builtin/verifreg/v12.go index 7c9a493f169..3669a879d53 100644 --- a/chain/actors/builtin/verifreg/v12.go +++ b/chain/actors/builtin/verifreg/v12.go @@ -13,7 +13,7 @@ import ( builtin12 "github.com/filecoin-project/go-state-types/builtin" adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" verifreg12 "github.com/filecoin-project/go-state-types/builtin/v12/verifreg" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" @@ -95,7 +95,7 @@ func (s *state12) GetState() interface{} { return &s.State } -func (s *state12) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state12) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg12.AllocationId(allocationId)) return (*Allocation)(alloc), ok, err @@ -127,7 +127,7 @@ func (s *state12) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state12) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state12) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg12.ClaimId(claimId)) return (*Claim)(claim), ok, err diff --git a/chain/actors/builtin/verifreg/v13.go b/chain/actors/builtin/verifreg/v13.go index 0c487a2f7e0..51b64f645d7 100644 --- a/chain/actors/builtin/verifreg/v13.go +++ b/chain/actors/builtin/verifreg/v13.go @@ -13,7 +13,7 @@ import ( builtin13 "github.com/filecoin-project/go-state-types/builtin" adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" verifreg13 "github.com/filecoin-project/go-state-types/builtin/v13/verifreg" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" @@ -95,7 +95,7 @@ func (s *state13) GetState() interface{} { return &s.State } -func (s *state13) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state13) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg13.AllocationId(allocationId)) return (*Allocation)(alloc), ok, err @@ -127,7 +127,7 @@ func (s *state13) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state13) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state13) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg13.ClaimId(claimId)) return (*Claim)(claim), ok, err diff --git a/chain/actors/builtin/verifreg/v14.go b/chain/actors/builtin/verifreg/v14.go index 6bfa82be571..87e646102fc 100644 --- a/chain/actors/builtin/verifreg/v14.go +++ b/chain/actors/builtin/verifreg/v14.go @@ -13,7 +13,7 @@ import ( builtin14 "github.com/filecoin-project/go-state-types/builtin" adt14 "github.com/filecoin-project/go-state-types/builtin/v14/util/adt" verifreg14 "github.com/filecoin-project/go-state-types/builtin/v14/verifreg" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" @@ -95,7 +95,7 @@ func (s *state14) GetState() interface{} { return &s.State } -func (s *state14) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state14) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg14.AllocationId(allocationId)) return (*Allocation)(alloc), ok, err @@ -127,7 +127,7 @@ func (s *state14) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state14) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state14) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg14.ClaimId(claimId)) return (*Claim)(claim), ok, err diff --git a/chain/actors/builtin/verifreg/v15.go b/chain/actors/builtin/verifreg/v15.go index 017e0cc743e..37f02d05c64 100644 --- a/chain/actors/builtin/verifreg/v15.go +++ b/chain/actors/builtin/verifreg/v15.go @@ -13,7 +13,7 @@ import ( builtin15 "github.com/filecoin-project/go-state-types/builtin" adt15 "github.com/filecoin-project/go-state-types/builtin/v15/util/adt" verifreg15 "github.com/filecoin-project/go-state-types/builtin/v15/verifreg" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" @@ -95,7 +95,7 @@ func (s *state15) GetState() interface{} { return &s.State } -func (s *state15) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state15) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg15.AllocationId(allocationId)) return (*Allocation)(alloc), ok, err @@ -127,7 +127,7 @@ func (s *state15) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state15) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state15) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg15.ClaimId(claimId)) return (*Claim)(claim), ok, err diff --git a/chain/actors/builtin/verifreg/v16.go b/chain/actors/builtin/verifreg/v16.go index d05bd2e573e..1ee9e02f948 100644 --- a/chain/actors/builtin/verifreg/v16.go +++ b/chain/actors/builtin/verifreg/v16.go @@ -13,7 +13,6 @@ import ( builtin16 "github.com/filecoin-project/go-state-types/builtin" adt16 "github.com/filecoin-project/go-state-types/builtin/v16/util/adt" verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" @@ -95,7 +94,7 @@ func (s *state16) GetState() interface{} { return &s.State } -func (s *state16) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state16) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg16.AllocationId(allocationId)) return (*Allocation)(alloc), ok, err @@ -127,7 +126,7 @@ func (s *state16) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state16) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state16) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg16.ClaimId(claimId)) return (*Claim)(claim), ok, err diff --git a/chain/actors/builtin/verifreg/v2.go b/chain/actors/builtin/verifreg/v2.go index 7f71639e668..9d051de08a8 100644 --- a/chain/actors/builtin/verifreg/v2.go +++ b/chain/actors/builtin/verifreg/v2.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" verifreg2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/verifreg" adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt" @@ -94,7 +94,7 @@ func (s *state2) GetState() interface{} { return &s.State } -func (s *state2) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state2) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v2") @@ -112,7 +112,7 @@ func (s *state2) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state2) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state2) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v2") diff --git a/chain/actors/builtin/verifreg/v3.go b/chain/actors/builtin/verifreg/v3.go index 3e8ea9a1f7a..bcb0c0e6db1 100644 --- a/chain/actors/builtin/verifreg/v3.go +++ b/chain/actors/builtin/verifreg/v3.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" verifreg3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/verifreg" @@ -95,7 +95,7 @@ func (s *state3) GetState() interface{} { return &s.State } -func (s *state3) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state3) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v3") @@ -113,7 +113,7 @@ func (s *state3) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state3) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state3) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v3") diff --git a/chain/actors/builtin/verifreg/v4.go b/chain/actors/builtin/verifreg/v4.go index 1dc43886422..4a331e6b085 100644 --- a/chain/actors/builtin/verifreg/v4.go +++ b/chain/actors/builtin/verifreg/v4.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin" verifreg4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/verifreg" @@ -95,7 +95,7 @@ func (s *state4) GetState() interface{} { return &s.State } -func (s *state4) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state4) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v4") @@ -113,7 +113,7 @@ func (s *state4) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state4) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state4) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v4") diff --git a/chain/actors/builtin/verifreg/v5.go b/chain/actors/builtin/verifreg/v5.go index a7505330c26..5e7b74882d1 100644 --- a/chain/actors/builtin/verifreg/v5.go +++ b/chain/actors/builtin/verifreg/v5.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin" verifreg5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/verifreg" @@ -95,7 +95,7 @@ func (s *state5) GetState() interface{} { return &s.State } -func (s *state5) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state5) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v5") @@ -113,7 +113,7 @@ func (s *state5) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state5) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state5) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v5") diff --git a/chain/actors/builtin/verifreg/v6.go b/chain/actors/builtin/verifreg/v6.go index 93424152e4b..041432dad4a 100644 --- a/chain/actors/builtin/verifreg/v6.go +++ b/chain/actors/builtin/verifreg/v6.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" verifreg6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/verifreg" @@ -95,7 +95,7 @@ func (s *state6) GetState() interface{} { return &s.State } -func (s *state6) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state6) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v6") @@ -113,7 +113,7 @@ func (s *state6) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state6) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state6) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v6") diff --git a/chain/actors/builtin/verifreg/v7.go b/chain/actors/builtin/verifreg/v7.go index bd67aee5ff6..826fe54242e 100644 --- a/chain/actors/builtin/verifreg/v7.go +++ b/chain/actors/builtin/verifreg/v7.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/manifest" builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" verifreg7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/verifreg" @@ -94,7 +94,7 @@ func (s *state7) GetState() interface{} { return &s.State } -func (s *state7) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state7) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v7") @@ -112,7 +112,7 @@ func (s *state7) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state7) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state7) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v7") diff --git a/chain/actors/builtin/verifreg/v8.go b/chain/actors/builtin/verifreg/v8.go index 1515c1c5bd3..3b9a579a75c 100644 --- a/chain/actors/builtin/verifreg/v8.go +++ b/chain/actors/builtin/verifreg/v8.go @@ -10,9 +10,9 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" builtin8 "github.com/filecoin-project/go-state-types/builtin" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" verifreg8 "github.com/filecoin-project/go-state-types/builtin/v8/verifreg" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" @@ -94,7 +94,7 @@ func (s *state8) GetState() interface{} { return &s.State } -func (s *state8) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state8) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v8") @@ -112,7 +112,7 @@ func (s *state8) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state8) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state8) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v8") diff --git a/chain/actors/builtin/verifreg/v9.go b/chain/actors/builtin/verifreg/v9.go index 41422615bcc..0540932120f 100644 --- a/chain/actors/builtin/verifreg/v9.go +++ b/chain/actors/builtin/verifreg/v9.go @@ -11,6 +11,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" builtin9 "github.com/filecoin-project/go-state-types/builtin" + verifreg16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/manifest" @@ -94,7 +95,7 @@ func (s *state9) GetState() interface{} { return &s.State } -func (s *state9) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { +func (s *state9) GetAllocation(clientIdAddr address.Address, allocationId verifreg16.AllocationId) (*Allocation, bool, error) { alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg9.AllocationId(allocationId)) return (*Allocation)(alloc), ok, err @@ -126,7 +127,7 @@ func (s *state9) GetAllAllocations() (map[AllocationId]Allocation, error) { } -func (s *state9) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { +func (s *state9) GetClaim(providerIdAddr address.Address, claimId verifreg16.ClaimId) (*Claim, bool, error) { claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg9.ClaimId(claimId)) return (*Claim)(claim), ok, err diff --git a/chain/actors/builtin/verifreg/verifreg.go b/chain/actors/builtin/verifreg/verifreg.go index 779c1bd292f..97aa1462275 100644 --- a/chain/actors/builtin/verifreg/verifreg.go +++ b/chain/actors/builtin/verifreg/verifreg.go @@ -8,8 +8,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" builtin16 "github.com/filecoin-project/go-state-types/builtin" - verifregtypes12 "github.com/filecoin-project/go-state-types/builtin/v12/verifreg" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/cbor" "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" @@ -200,16 +199,16 @@ type ( AllocationId = verifregtypes.AllocationId Claim = verifregtypes.Claim ClaimId = verifregtypes.ClaimId - AllocationRequest = verifregtypes12.AllocationRequest - AllocationRequests = verifregtypes12.AllocationRequests - RemoveExpiredAllocationsParams = verifregtypes12.RemoveExpiredAllocationsParams - AddVerifierParams = verifregtypes12.AddVerifierParams - AddVerifiedClientParams = verifregtypes12.AddVerifiedClientParams + AllocationRequest = verifregtypes.AllocationRequest + AllocationRequests = verifregtypes.AllocationRequests + RemoveExpiredAllocationsParams = verifregtypes.RemoveExpiredAllocationsParams + AddVerifierParams = verifregtypes.AddVerifierParams + AddVerifiedClientParams = verifregtypes.AddVerifiedClientParams ) const ( NoAllocationID = verifregtypes.NoAllocationID - MinimumVerifiedAllocationTerm = verifregtypes12.MinimumVerifiedAllocationTerm - MaximumVerifiedAllocationTerm = verifregtypes12.MaximumVerifiedAllocationTerm - MaximumVerifiedAllocationExpiration = verifregtypes12.MaximumVerifiedAllocationExpiration + MinimumVerifiedAllocationTerm = verifregtypes.MinimumVerifiedAllocationTerm + MaximumVerifiedAllocationTerm = verifregtypes.MaximumVerifiedAllocationTerm + MaximumVerifiedAllocationExpiration = verifregtypes.MaximumVerifiedAllocationExpiration ) diff --git a/chain/consensus/filcns/upgrades.go b/chain/consensus/filcns/upgrades.go index a93af1f4420..ac0fe1974b8 100644 --- a/chain/consensus/filcns/upgrades.go +++ b/chain/consensus/filcns/upgrades.go @@ -341,6 +341,10 @@ func DefaultUpgradeSchedule() stmgr.UpgradeSchedule { StopWithin: 10, }}, Expensive: true, + }, { + Height: buildconstants.UpgradeTockHeight, + Network: network.Version26, + Migration: nil, }, } diff --git a/chain/events/state/predicates_test.go b/chain/events/state/predicates_test.go index 4975f9983ce..1121530cdc2 100644 --- a/chain/events/state/predicates_test.go +++ b/chain/events/state/predicates_test.go @@ -512,18 +512,26 @@ func createEmptyMinerState(ctx context.Context, t *testing.T, store adt2.Store, func createSectorsAMT(ctx context.Context, t *testing.T, store adt2.Store, sectors []miner.SectorOnChainInfo) cid.Cid { root := adt2.MakeEmptyArray(store) for _, sector := range sectors { + edr := big.Zero() + esp := big.Zero() + if sector.ExpectedDayReward != nil { + edr = *sector.ExpectedDayReward + } + if sector.ExpectedStoragePledge != nil { + esp = *sector.ExpectedStoragePledge + } sector := miner2.SectorOnChainInfo{ SectorNumber: sector.SectorNumber, SealProof: sector.SealProof, SealedCID: sector.SealedCID, - DealIDs: sector.DealIDs, + DealIDs: sector.DeprecatedDealIDs, Activation: sector.Activation, Expiration: sector.Expiration, DealWeight: sector.DealWeight, VerifiedDealWeight: sector.VerifiedDealWeight, InitialPledge: sector.InitialPledge, - ExpectedDayReward: sector.ExpectedDayReward, - ExpectedStoragePledge: sector.ExpectedStoragePledge, + ExpectedDayReward: edr, + ExpectedStoragePledge: esp, ReplacedSectorAge: 0, ReplacedDayReward: big.NewInt(0), } @@ -538,19 +546,21 @@ func createSectorsAMT(ctx context.Context, t *testing.T, store adt2.Store, secto // returns a unique SectorOnChainInfo with each invocation with SectorNumber set to `sectorNo`. func newSectorOnChainInfo(sectorNo abi.SectorNumber, sealed cid.Cid, weight big.Int, activation, expiration abi.ChainEpoch) miner.SectorOnChainInfo { info := newSectorPreCommitInfo(sectorNo, sealed, expiration) + bz := big.Zero() return miner.SectorOnChainInfo{ - SectorNumber: info.SectorNumber, - SealProof: info.SealProof, - SealedCID: info.SealedCID, - DealIDs: info.DealIDs, - Expiration: info.Expiration, + SectorNumber: info.SectorNumber, + SealProof: info.SealProof, + SealedCID: info.SealedCID, + DeprecatedDealIDs: info.DealIDs, + Expiration: info.Expiration, Activation: activation, DealWeight: weight, VerifiedDealWeight: weight, InitialPledge: big.Zero(), - ExpectedDayReward: big.Zero(), - ExpectedStoragePledge: big.Zero(), + ExpectedDayReward: &bz, + ExpectedStoragePledge: &bz, + DailyFee: big.Zero(), } } diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index 895e4efd2d8..93451991180 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -22,8 +22,8 @@ import ( miner15 "github.com/filecoin-project/go-state-types/builtin/v15/miner" power15 "github.com/filecoin-project/go-state-types/builtin/v15/power" smoothing15 "github.com/filecoin-project/go-state-types/builtin/v15/util/smoothing" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" minertypes "github.com/filecoin-project/go-state-types/builtin/v8/miner" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/network" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" @@ -293,7 +293,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal } rawPow = big.Add(rawPow, big.NewInt(int64(m.SectorSize))) - sectorWeight := builtin.QAPowerForWeight(m.SectorSize, minerInfos[i].presealExp, markettypes.DealWeight(&preseal.Deal)) + sectorWeight := builtin.QAPowerForWeight(m.SectorSize, minerInfos[i].presealExp, markettypes.DealWeight(&preseal.Deal, preseal.Deal.EndEpoch, preseal.Deal.StartEpoch)) minerInfos[i].sectorWeight = append(minerInfos[i].sectorWeight, sectorWeight) qaPow = big.Add(qaPow, sectorWeight) } diff --git a/chain/stmgr/supply.go b/chain/stmgr/supply.go index 2ef50f7082b..220acc77a2c 100644 --- a/chain/stmgr/supply.go +++ b/chain/stmgr/supply.go @@ -252,14 +252,19 @@ func (sm *StateManager) GetFilVested(ctx context.Context, height abi.ChainEpoch) return vf, nil } -func GetFilReserveDisbursed(ctx context.Context, st *state.StateTree) (abi.TokenAmount, error) { +func GetFilReserveDisbursed(ctx context.Context, st *state.StateTree, nv network.Version) (abi.TokenAmount, error) { ract, err := st.GetActor(builtin.ReserveAddress) if err != nil { return big.Zero(), xerrors.Errorf("failed to get reserve actor: %w", err) } + initial := buildconstants.InitialFilReserved + if nv >= network.Version25 { + // See FIP-0100 and https://github.com/filecoin-project/lotus/pull/12938 for why this exists + initial = buildconstants.UpgradeTeepInitialFilReserved + } // If money enters the reserve actor, this could lead to a negative term - return big.Sub(big.NewFromGo(buildconstants.InitialFilReserved), ract.Balance), nil + return big.Sub(big.NewFromGo(initial), ract.Balance), nil } func GetFilMined(ctx context.Context, st *state.StateTree) (abi.TokenAmount, error) { @@ -349,7 +354,7 @@ func (sm *StateManager) GetVMCirculatingSupplyDetailed(ctx context.Context, heig filReserveDisbursed := big.Zero() if height > buildconstants.UpgradeAssemblyHeight { - filReserveDisbursed, err = GetFilReserveDisbursed(ctx, st) + filReserveDisbursed, err = GetFilReserveDisbursed(ctx, st, nv) if err != nil { return api.CirculatingSupply{}, xerrors.Errorf("failed to calculate filReserveDisbursed: %w", err) } diff --git a/cli/filplus.go b/cli/filplus.go index ae380afa102..383954265b5 100644 --- a/cli/filplus.go +++ b/cli/filplus.go @@ -21,10 +21,9 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - verifregtypes13 "github.com/filecoin-project/go-state-types/builtin/v13/verifreg" + verifregtypes16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" verifregtypes8 "github.com/filecoin-project/go-state-types/builtin/v8/verifreg" datacap2 "github.com/filecoin-project/go-state-types/builtin/v9/datacap" - verifregtypes9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/lotus/api" @@ -115,7 +114,7 @@ var filplusVerifyClientCmd = &cli.Command{ } // TODO: This should be abstracted over actor versions - params, err := actors.SerializeParams(&verifregtypes9.AddVerifiedClientParams{Address: target, Allowance: allowance}) + params, err := actors.SerializeParams(&verifregtypes16.AddVerifiedClientParams{Address: target, Allowance: allowance}) if err != nil { return err } @@ -583,16 +582,16 @@ var filplusRemoveExpiredAllocationsCmd = &cli.Command{ fromAddr = addr } - allocationIDs := make([]verifregtypes9.AllocationId, len(args)-1) + allocationIDs := make([]verifregtypes16.AllocationId, len(args)-1) for i, allocationString := range args[1:] { id, err := strconv.ParseUint(allocationString, 10, 64) if err != nil { return err } - allocationIDs[i] = verifregtypes9.AllocationId(id) + allocationIDs[i] = verifregtypes16.AllocationId(id) } - params, err := actors.SerializeParams(&verifregtypes9.RemoveExpiredAllocationsParams{ + params, err := actors.SerializeParams(&verifregtypes16.RemoveExpiredAllocationsParams{ Client: abi.ActorID(clientId), AllocationIds: allocationIDs, }) @@ -676,16 +675,16 @@ var filplusRemoveExpiredClaimsCmd = &cli.Command{ fromAddr = addr } - claimIDs := make([]verifregtypes9.ClaimId, len(args)-1) + claimIDs := make([]verifregtypes16.ClaimId, len(args)-1) for i, claimStr := range args[1:] { id, err := strconv.ParseUint(claimStr, 10, 64) if err != nil { return err } - claimIDs[i] = verifregtypes9.ClaimId(id) + claimIDs[i] = verifregtypes16.ClaimId(id) } - params, err := actors.SerializeParams(&verifregtypes9.RemoveExpiredClaimsParams{ + params, err := actors.SerializeParams(&verifregtypes16.RemoveExpiredClaimsParams{ Provider: abi.ActorID(providerId), ClaimIds: claimIDs, }) @@ -902,7 +901,7 @@ var filplusSignRemoveDataCapProposal = &cli.Command{ } paramBuf := new(bytes.Buffer) - paramBuf.WriteString(verifregtypes9.SignatureDomainSeparation_RemoveDataCap) + paramBuf.WriteString(verifregtypes16.SignatureDomainSeparation_RemoveDataCap) if nv <= network.Version16 { params := verifregtypes8.RemoveDataCapProposal{ RemovalProposalID: id, @@ -912,8 +911,8 @@ var filplusSignRemoveDataCapProposal = &cli.Command{ err = params.MarshalCBOR(paramBuf) } else { - params := verifregtypes9.RemoveDataCapProposal{ - RemovalProposalID: verifregtypes9.RmDcProposalID{ProposalID: id}, + params := verifregtypes16.RemoveDataCapProposal{ + RemovalProposalID: verifregtypes16.RmDcProposalID{ProposalID: id}, DataCapAmount: allowanceToRemove, VerifiedClient: clientIdAddr, } @@ -949,7 +948,7 @@ If the client id different then claim can be extended up to maximum 5 years from Name: "term-max", Usage: "The maximum period for which a provider can earn quality-adjusted power for the piece (epochs). Default is 5 years.", Aliases: []string{"tmax"}, - Value: verifregtypes13.MaximumVerifiedAllocationTerm, + Value: verifregtypes16.MaximumVerifiedAllocationTerm, }, &cli.StringFlag{ Name: "client", @@ -1010,8 +1009,8 @@ If the client id different then claim can be extended up to maximum 5 years from } // Tmax can't be more than policy max - if tmax > verifregtypes13.MaximumVerifiedAllocationTerm { - return xerrors.Errorf("specified term-max %d is larger than %d maximum allowed by verified regirty actor policy", tmax, verifregtypes13.MaximumVerifiedAllocationTerm) + if tmax > verifregtypes16.MaximumVerifiedAllocationTerm { + return xerrors.Errorf("specified term-max %d is larger than %d maximum allowed by verified regirty actor policy", tmax, verifregtypes16.MaximumVerifiedAllocationTerm) } api, closer, err := GetFullNodeAPIV1(cctx) @@ -1026,7 +1025,7 @@ If the client id different then claim can be extended up to maximum 5 years from return err } - claimMap := make(map[verifregtypes13.ClaimId]ProvInfo) + claimMap := make(map[verifregtypes16.ClaimId]ProvInfo) // If no miners and arguments are present if len(miners) == 0 && cctx.Args().Len() > 0 { @@ -1062,7 +1061,7 @@ If the client id different then claim can be extended up to maximum 5 years from ID: abi.ActorID(mid), } - claimMap[verifregtypes13.ClaimId(n)] = pi + claimMap[verifregtypes16.ClaimId(n)] = pi } } @@ -1079,7 +1078,7 @@ If the client id different then claim can be extended up to maximum 5 years from return xerrors.Errorf("failed to parse the claim ID for %s for argument %s: %s", detail[0], detail, err) } - claimMap[verifregtypes13.ClaimId(n)] = ProvInfo{} + claimMap[verifregtypes16.ClaimId(n)] = ProvInfo{} } } @@ -1136,7 +1135,7 @@ type ProvInfo struct { // 6. Extend all claims for multiple miner IDs with different client address (2 messages) // 7. Extend specified claims for a miner ID with different client address (2 messages) // 8. Extend specific claims for specific miner ID with different client address (2 messages) -func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifregtypes13.ClaimId]ProvInfo, miners []string, wallet address.Address, tmax abi.ChainEpoch, all, assumeYes bool, batchSize int) ([]*types.Message, error) { +func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifregtypes16.ClaimId]ProvInfo, miners []string, wallet address.Address, tmax abi.ChainEpoch, all, assumeYes bool, batchSize int) ([]*types.Message, error) { ac, err := api.StateLookupID(ctx, wallet, types.EmptyTSK) if err != nil { @@ -1154,8 +1153,8 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre return nil, err } - var terms []verifregtypes13.ClaimTerm - newClaims := make(map[verifregtypes13.ClaimExtensionRequest]big.Int) + var terms []verifregtypes16.ClaimTerm + newClaims := make(map[verifregtypes16.ClaimExtensionRequest]big.Int) rDataCap := big.NewInt(0) // If --all is set @@ -1180,8 +1179,8 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre if claim.Client != wid { // The new duration should be greater than the original deal duration and claim should not already be expired if head.Height()+tmax-claim.TermStart > claim.TermMax-claim.TermStart && claim.TermStart+claim.TermMax > head.Height() { - req := verifregtypes13.ClaimExtensionRequest{ - Claim: verifregtypes13.ClaimId(claimID), + req := verifregtypes16.ClaimExtensionRequest{ + Claim: verifregtypes16.ClaimId(claimID), Provider: abi.ActorID(mid), TermMax: head.Height() + tmax - claim.TermStart, } @@ -1193,8 +1192,8 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre } // For original client, compare duration(TermMax) and claim should not already be expired if claim.TermMax < tmax && claim.TermStart+claim.TermMax > head.Height() { - terms = append(terms, verifregtypes13.ClaimTerm{ - ClaimId: verifregtypes13.ClaimId(claimID), + terms = append(terms, verifregtypes16.ClaimTerm{ + ClaimId: verifregtypes16.ClaimId(claimID), TermMax: tmax, Provider: abi.ActorID(mid), }) @@ -1220,7 +1219,7 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre for claimID := range pcm { claimID := claimID - claim, ok := claims[verifregtypes9.ClaimId(claimID)] + claim, ok := claims[verifregtypes16.ClaimId(claimID)] if !ok { return nil, xerrors.Errorf("claim %d not found for provider %s", claimID, miners[0]) } @@ -1228,7 +1227,7 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre if claim.Client != wid { // The new duration should be greater than the original deal duration and claim should not already be expired if head.Height()+tmax-claim.TermStart > claim.TermMax-claim.TermStart && claim.TermStart+claim.TermMax > head.Height() { - req := verifregtypes13.ClaimExtensionRequest{ + req := verifregtypes16.ClaimExtensionRequest{ Claim: claimID, Provider: abi.ActorID(mid), TermMax: head.Height() + tmax - claim.TermStart, @@ -1241,7 +1240,7 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre } // For original client, compare duration(TermMax) and claim should not already be expired if claim.TermMax < tmax && claim.TermStart+claim.TermMax > head.Height() { - terms = append(terms, verifregtypes13.ClaimTerm{ + terms = append(terms, verifregtypes16.ClaimTerm{ ClaimId: claimID, TermMax: tmax, Provider: abi.ActorID(mid), @@ -1254,7 +1253,7 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre for claimID, prov := range pcm { prov := prov claimID := claimID - claim, err := api.StateGetClaim(ctx, prov.Addr, verifregtypes9.ClaimId(claimID), types.EmptyTSK) + claim, err := api.StateGetClaim(ctx, prov.Addr, verifregtypes16.ClaimId(claimID), types.EmptyTSK) if err != nil { return nil, xerrors.Errorf("could not load the claim %d: %s", claimID, err) } @@ -1265,7 +1264,7 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre if claim.Client != wid { // The new duration should be greater than the original deal duration and claim should not already be expired if head.Height()+tmax-claim.TermStart > claim.TermMax-claim.TermStart && claim.TermStart+claim.TermMax > head.Height() { - req := verifregtypes13.ClaimExtensionRequest{ + req := verifregtypes16.ClaimExtensionRequest{ Claim: claimID, Provider: prov.ID, TermMax: head.Height() + tmax - claim.TermStart, @@ -1278,7 +1277,7 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre } // For original client, compare duration(TermMax) and claim should not already be expired if claim.TermMax < tmax && claim.TermStart+claim.TermMax > head.Height() { - terms = append(terms, verifregtypes13.ClaimTerm{ + terms = append(terms, verifregtypes16.ClaimTerm{ ClaimId: claimID, TermMax: tmax, Provider: prov.ID, @@ -1299,7 +1298,7 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre batch := terms[i:batchEnd] - params, err := actors.SerializeParams(&verifregtypes13.ExtendClaimTermsParams{ + params, err := actors.SerializeParams(&verifregtypes16.ExtendClaimTermsParams{ Terms: batch, }) if err != nil { @@ -1367,7 +1366,7 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre } // Create a map of just keys, so we can easily batch based on the numeric keys - keys := make([]verifregtypes13.ClaimExtensionRequest, 0, len(newClaims)) + keys := make([]verifregtypes16.ClaimExtensionRequest, 0, len(newClaims)) for k := range newClaims { keys = append(keys, k) } @@ -1388,7 +1387,7 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre dcap.Add(dcap.Int, dc.Int) } - ncparams, err := actors.SerializeParams(&verifregtypes13.AllocationRequests{ + ncparams, err := actors.SerializeParams(&verifregtypes16.AllocationRequests{ Extensions: batch, }) if err != nil { diff --git a/cli/miner/init.go b/cli/miner/init.go index 4f84b9c1c84..caf11ba8951 100644 --- a/cli/miner/init.go +++ b/cli/miner/init.go @@ -28,7 +28,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-statestore" miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner" power2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/power" diff --git a/cli/spcli/sectors.go b/cli/spcli/sectors.go index 07d076ad441..5b1d0d52d24 100644 --- a/cli/spcli/sectors.go +++ b/cli/spcli/sectors.go @@ -768,7 +768,7 @@ func SectorsExtendCmd(getActorAddress ActorAddressGetter) *cli.Command { if !found { return xerrors.Errorf("sector %d is not active", id) } - if len(si.DealIDs) > 0 && cctx.Bool("only-cc") { + if len(si.DeprecatedDealIDs) > 0 && cctx.Bool("only-cc") { continue } diff --git a/cli/state.go b/cli/state.go index 967614be893..7b35fdfd8f5 100644 --- a/cli/state.go +++ b/cli/state.go @@ -1505,7 +1505,7 @@ var StateSectorCmd = &cli.Command{ if si.SectorKeyCID != nil { fmt.Println("SectorKeyCID: ", si.SectorKeyCID) } - fmt.Println("DealIDs: ", si.DealIDs) + fmt.Println("DealIDs (deprecated): ", si.DeprecatedDealIDs) fmt.Println() fmt.Println("Activation: ", cliutil.EpochTimeTs(ts.Height(), si.Activation, ts)) fmt.Println("Expiration: ", cliutil.EpochTimeTs(ts.Height(), si.Expiration, ts)) @@ -1513,8 +1513,16 @@ var StateSectorCmd = &cli.Command{ fmt.Println("DealWeight: ", si.DealWeight) fmt.Println("VerifiedDealWeight: ", si.VerifiedDealWeight) fmt.Println("InitialPledge: ", types.FIL(si.InitialPledge)) - fmt.Println("ExpectedDayReward: ", types.FIL(si.ExpectedDayReward)) - fmt.Println("ExpectedStoragePledge: ", types.FIL(si.ExpectedStoragePledge)) + edr := big.Zero() + if si.ExpectedDayReward != nil { + edr = *si.ExpectedDayReward + } + fmt.Println("ExpectedDayReward: ", types.FIL(edr)) + esp := big.Zero() + if si.ExpectedStoragePledge != nil { + esp = *si.ExpectedStoragePledge + } + fmt.Println("ExpectedStoragePledge: ", types.FIL(esp)) fmt.Println() sp, err := api.StateSectorPartition(ctx, maddr, abi.SectorNumber(sid), ts.Key()) diff --git a/cmd/lotus-pcr/main.go b/cmd/lotus-pcr/main.go index 71cf888e827..836b1e7b713 100644 --- a/cmd/lotus-pcr/main.go +++ b/cmd/lotus-pcr/main.go @@ -26,7 +26,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/network" miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner" diff --git a/cmd/lotus-seed/seed/seed.go b/cmd/lotus-seed/seed/seed.go index c62dab79e89..e14031119ba 100644 --- a/cmd/lotus-seed/seed/seed.go +++ b/cmd/lotus-seed/seed/seed.go @@ -21,7 +21,7 @@ import ( "github.com/filecoin-project/go-commp-utils/v2/zerocomm" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet/key" diff --git a/cmd/lotus-shed/migrations.go b/cmd/lotus-shed/migrations.go index be0ef834c4d..669620ef914 100644 --- a/cmd/lotus-shed/migrations.go +++ b/cmd/lotus-shed/migrations.go @@ -39,13 +39,13 @@ import ( v14 "github.com/filecoin-project/go-state-types/builtin/v14" v15 "github.com/filecoin-project/go-state-types/builtin/v15" v16 "github.com/filecoin-project/go-state-types/builtin/v16" + market9 "github.com/filecoin-project/go-state-types/builtin/v16/market" + miner9 "github.com/filecoin-project/go-state-types/builtin/v16/miner" + verifreg9 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" market8 "github.com/filecoin-project/go-state-types/builtin/v8/market" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" v9 "github.com/filecoin-project/go-state-types/builtin/v9" - market9 "github.com/filecoin-project/go-state-types/builtin/v9/market" - miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" - verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/manifest" mutil "github.com/filecoin-project/go-state-types/migration" "github.com/filecoin-project/go-state-types/network" diff --git a/cmd/lotus-shed/miner.go b/cmd/lotus-shed/miner.go index 1b12bf77ca8..02ecb7289c3 100644 --- a/cmd/lotus-shed/miner.go +++ b/cmd/lotus-shed/miner.go @@ -763,7 +763,7 @@ var minerLockedVestedCmd = &cli.Command{ return err } var locked bool - for _, f := range vf.Funds { + for _, f := range vf { if f.Epoch < staleEpoch { if _, ok := miners[addr]; !ok { miners[addr] = f.Amount @@ -860,7 +860,7 @@ var minerListVestingCmd = &cli.Command{ } _, _ = fmt.Fprintln(cctx.App.Writer, string(jb)) } else { - for _, f := range vf.Funds { + for _, f := range vf { _, _ = fmt.Fprintf(cctx.App.Writer, "Epoch %d: %s\n", f.Epoch, types.FIL(f.Amount)) } } diff --git a/cmd/lotus-shed/sectors.go b/cmd/lotus-shed/sectors.go index faa21f9d94e..fd22f395c29 100644 --- a/cmd/lotus-shed/sectors.go +++ b/cmd/lotus-shed/sectors.go @@ -710,7 +710,7 @@ var dumpSectorOnChainInfoCmd = &cli.Command{ maddr, sector.SectorNumber, sector.SealProof, - len(sector.DealIDs), + len(sector.DeprecatedDealIDs), sector.Activation, sector.Expiration, sector.DealWeight, diff --git a/cmd/lotus-shed/terminations.go b/cmd/lotus-shed/terminations.go index 563c1ba3a77..db13c2a9a3e 100644 --- a/cmd/lotus-shed/terminations.go +++ b/cmd/lotus-shed/terminations.go @@ -164,7 +164,7 @@ var terminationsCmd = &cli.Command{ } for _, sector := range sectors { - for _, deal := range sector.DealIDs { + for _, deal := range sector.DeprecatedDealIDs { prop, find, err := proposals.Get(deal) if err != nil { return err diff --git a/cmd/lotus-sim/simulation/stages/commit_queue.go b/cmd/lotus-sim/simulation/stages/commit_queue.go index f68dc67edfa..c05b618b809 100644 --- a/cmd/lotus-sim/simulation/stages/commit_queue.go +++ b/cmd/lotus-sim/simulation/stages/commit_queue.go @@ -5,7 +5,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/lotus/chain/actors/policy" ) diff --git a/cmd/lotus-sim/simulation/stages/commit_queue_test.go b/cmd/lotus-sim/simulation/stages/commit_queue_test.go index e2cac0fa442..86216a735cf 100644 --- a/cmd/lotus-sim/simulation/stages/commit_queue_test.go +++ b/cmd/lotus-sim/simulation/stages/commit_queue_test.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/lotus/chain/actors/policy" ) diff --git a/cmd/lotus-sim/simulation/stages/interface.go b/cmd/lotus-sim/simulation/stages/interface.go index fffdbec6b54..27a9d604782 100644 --- a/cmd/lotus-sim/simulation/stages/interface.go +++ b/cmd/lotus-sim/simulation/stages/interface.go @@ -5,7 +5,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/cmd/lotus-sim/simulation/blockbuilder" diff --git a/cmd/lotus-sim/simulation/stages/precommit_stage.go b/cmd/lotus-sim/simulation/stages/precommit_stage.go index 5cbe77a4f42..46363d1f197 100644 --- a/cmd/lotus-sim/simulation/stages/precommit_stage.go +++ b/cmd/lotus-sim/simulation/stages/precommit_stage.go @@ -11,7 +11,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/go-state-types/network" miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner" diff --git a/cmd/lotus-sim/simulation/stages/provecommit_stage.go b/cmd/lotus-sim/simulation/stages/provecommit_stage.go index 515938ecc2d..b4a54a6686e 100644 --- a/cmd/lotus-sim/simulation/stages/provecommit_stage.go +++ b/cmd/lotus-sim/simulation/stages/provecommit_stage.go @@ -8,7 +8,7 @@ import ( "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/builtin" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/network" miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner" diff --git a/documentation/en/api-v0-methods.md b/documentation/en/api-v0-methods.md index 1d50df65058..c59b746e75f 100644 --- a/documentation/en/api-v0-methods.md +++ b/documentation/en/api-v0-methods.md @@ -4483,7 +4483,8 @@ Response: "UpgradePhoenixHeight": 10101, "UpgradeWaffleHeight": 10101, "UpgradeTuktukHeight": 10101, - "UpgradeTeepHeight": 10101 + "UpgradeTeepHeight": 10101, + "UpgradeTockHeight": 10101 }, "Eip155ChainID": 123, "GenesisTimestamp": 42 @@ -4880,7 +4881,7 @@ Response: "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -4895,7 +4896,8 @@ Response: "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ] ``` @@ -4952,7 +4954,8 @@ Response: 5, 1 ], - "DisputableProofCount": 42 + "DisputableProofCount": 42, + "DailyFee": "0" } ] ``` @@ -5360,7 +5363,7 @@ Response: "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -5375,7 +5378,8 @@ Response: "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ] ``` @@ -5787,7 +5791,7 @@ Response: "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -5802,7 +5806,8 @@ Response: "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ``` diff --git a/documentation/en/api-v1-unstable-methods.md b/documentation/en/api-v1-unstable-methods.md index ede31f973a1..88876b7f849 100644 --- a/documentation/en/api-v1-unstable-methods.md +++ b/documentation/en/api-v1-unstable-methods.md @@ -6835,7 +6835,8 @@ Response: "UpgradePhoenixHeight": 10101, "UpgradeWaffleHeight": 10101, "UpgradeTuktukHeight": 10101, - "UpgradeTeepHeight": 10101 + "UpgradeTeepHeight": 10101, + "UpgradeTockHeight": 10101 }, "Eip155ChainID": 123, "GenesisTimestamp": 42 @@ -7283,7 +7284,7 @@ Response: "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -7298,7 +7299,8 @@ Response: "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ] ``` @@ -7383,7 +7385,8 @@ Response: 5, 1 ], - "DisputableProofCount": 42 + "DisputableProofCount": 42, + "DailyFee": "0" } ] ``` @@ -7832,7 +7835,7 @@ Response: "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -7847,7 +7850,8 @@ Response: "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ] ``` @@ -8213,7 +8217,7 @@ Response: "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DealIDs": [ + "DeprecatedDealIDs": [ 5432 ], "Activation": 10101, @@ -8228,7 +8232,8 @@ Response: "SectorKeyCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Flags": 0 + "Flags": 0, + "DailyFee": "0" } ``` diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index 595bf25a404..037aa5ce119 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit 595bf25a404441f6af7bac80a346fa96a858a0b1 +Subproject commit 037aa5ce11958eb2b47799b4cf16922874f6e2e1 diff --git a/gateway/node.go b/gateway/node.go index 349bfbfd3a1..ebc51ff10c9 100644 --- a/gateway/node.go +++ b/gateway/node.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-f3/certs" "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-state-types/abi" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/network" diff --git a/gateway/proxy_fil.go b/gateway/proxy_fil.go index a36c7fdc576..52f3fa34f2b 100644 --- a/gateway/proxy_fil.go +++ b/gateway/proxy_fil.go @@ -11,7 +11,7 @@ import ( "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-f3/certs" "github.com/filecoin-project/go-state-types/abi" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/network" diff --git a/genesis/types.go b/genesis/types.go index 815a2f0083a..e8d1cef5473 100644 --- a/genesis/types.go +++ b/genesis/types.go @@ -8,7 +8,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/lotus/chain/types" diff --git a/go.mod b/go.mod index 099da43bb82..e0368c92f60 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( github.com/filecoin-project/go-jsonrpc v0.7.0 github.com/filecoin-project/go-padreader v0.0.1 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.16.0-rc3.0.20250306021323-9c8991feee47 // dependency-check-ignore: unknown + github.com/filecoin-project/go-state-types v0.16.0-rc6 // dependency-check-ignore: unknown github.com/filecoin-project/go-statemachine v1.0.3 github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/go-storedcounter v0.1.0 @@ -137,7 +137,7 @@ require ( github.com/triplewz/poseidon v0.0.2 github.com/urfave/cli/v2 v2.27.5 github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba - github.com/whyrusleeping/cbor-gen v0.3.0 + github.com/whyrusleeping/cbor-gen v0.3.1 github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 github.com/xeipuuv/gojsonschema v1.2.0 github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // dependency-check-ignore: unknown @@ -155,12 +155,12 @@ require ( go.uber.org/fx v1.23.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.35.0 + golang.org/x/crypto v0.36.0 golang.org/x/mod v0.23.0 golang.org/x/net v0.35.0 - golang.org/x/sync v0.11.0 - golang.org/x/sys v0.30.0 - golang.org/x/term v0.29.0 + golang.org/x/sync v0.12.0 + golang.org/x/sys v0.31.0 + golang.org/x/term v0.30.0 golang.org/x/time v0.5.0 golang.org/x/tools v0.30.0 golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da @@ -343,7 +343,7 @@ require ( go.uber.org/mock v0.5.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac // indirect - golang.org/x/text v0.22.0 // indirect + golang.org/x/text v0.23.0 // indirect gonum.org/v1/gonum v0.15.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250212204824-5a70512c5d8b // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250212204824-5a70512c5d8b // indirect diff --git a/go.sum b/go.sum index 6d78a746d6c..8182aaee165 100644 --- a/go.sum +++ b/go.sum @@ -305,8 +305,8 @@ github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.16.0-rc3.0.20250306021323-9c8991feee47 h1:T4FROWJdLMagJDKLzZqOlJMCw/tMolhFbi8niQB2sfk= -github.com/filecoin-project/go-state-types v0.16.0-rc3.0.20250306021323-9c8991feee47/go.mod h1:1UK6Rsz0oWbzb4IPuyEVuNVRk13JSlnUmmxrzLZjBpg= +github.com/filecoin-project/go-state-types v0.16.0-rc6 h1:lO+LD/BZEUzA+4KyId1SqpdQkkzKbcHVHMaTDFlU3rA= +github.com/filecoin-project/go-state-types v0.16.0-rc6/go.mod h1:YCESyrqnyu17y0MazbV6Uwma5+BrMvEKEQp5QWeIf9g= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= @@ -1317,8 +1317,8 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.3.0 h1:BR7/2RPYdqzGyHsJvC/lm+g8qTlm4SD9GHA8++CJT8o= -github.com/whyrusleeping/cbor-gen v0.3.0/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= +github.com/whyrusleeping/cbor-gen v0.3.1 h1:82ioxmhEYut7LBVGhGq8xoRkXPLElVuh5mV67AFfdv0= +github.com/whyrusleeping/cbor-gen v0.3.1/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= @@ -1471,8 +1471,8 @@ golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1594,8 +1594,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1683,8 +1683,8 @@ golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1696,8 +1696,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1711,8 +1711,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/itests/daily_fees_test.go b/itests/daily_fees_test.go new file mode 100644 index 00000000000..a0f8ff787e8 --- /dev/null +++ b/itests/daily_fees_test.go @@ -0,0 +1,637 @@ +package itests + +import ( + "context" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/builtin" + miner14 "github.com/filecoin-project/go-state-types/builtin/v14/miner" + verifreg14 "github.com/filecoin-project/go-state-types/builtin/v14/verifreg" + miner15 "github.com/filecoin-project/go-state-types/builtin/v15/miner" + miner16 "github.com/filecoin-project/go-state-types/builtin/v16/miner" + "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" + "github.com/filecoin-project/go-state-types/network" + gstStore "github.com/filecoin-project/go-state-types/store" + + "github.com/filecoin-project/lotus/blockstore" + "github.com/filecoin-project/lotus/chain/actors/builtin/miner" + "github.com/filecoin-project/lotus/chain/consensus/filcns" + "github.com/filecoin-project/lotus/chain/state" + "github.com/filecoin-project/lotus/chain/stmgr" + "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/chain/wallet/key" + "github.com/filecoin-project/lotus/itests/kit" + "github.com/filecoin-project/lotus/lib/must" +) + +func TestDailyFees(t *testing.T) { + req := require.New(t) + + kit.QuietMiningLogs() + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + const defaultSectorSize = abi.SectorSize(2 << 10) // 2KiB + var ( + blocktime = 2 * time.Millisecond + client kit.TestFullNode + genminer kit.TestMiner + // don't upgrade until our original sectors are fully proven and power updated, to keep the test simple + nv25epoch abi.ChainEpoch = builtin.EpochsInDay + 200 // Teep + nv26epoch abi.ChainEpoch = nv25epoch + builtin.EpochsInDay/2 // Tock + feePostWg sync.WaitGroup + ) + + initialBigBalance := types.MustParseFIL("100fil").Int64() + sealProofType := must.One(miner.SealProofTypeFromSectorSize(defaultSectorSize, network.Version23, miner.SealProofVariant_Standard)) + rootKey := must.One(key.GenerateKey(types.KTSecp256k1)) + verifierKey := must.One(key.GenerateKey(types.KTSecp256k1)) + verifiedClientKey := must.One(key.GenerateKey(types.KTBLS)) + unverifiedClient := must.One(key.GenerateKey(types.KTBLS)) + + t.Log("*** Setting up network with genesis miner and clients") + + // Setup and begin mining with a single miner (A) + // Miner A will only be a genesis Miner with power allocated in the genesis block and will not onboard any sectors from here on + ens := kit.NewEnsemble(t, + kit.MockProofs(true), + kit.RootVerifier(rootKey, abi.NewTokenAmount(initialBigBalance)), + kit.Account(verifierKey, abi.NewTokenAmount(initialBigBalance)), + kit.Account(verifiedClientKey, abi.NewTokenAmount(initialBigBalance)), + kit.Account(unverifiedClient, abi.NewTokenAmount(initialBigBalance)), + kit.UpgradeSchedule(stmgr.Upgrade{ + Network: network.Version24, + Height: -1, + }, stmgr.Upgrade{ + Network: network.Version25, + Height: nv25epoch, + Migration: filcns.UpgradeActorsV16, + }, stmgr.Upgrade{ + Network: network.Version26, + Height: nv26epoch, + }, + )). + FullNode(&client, kit.SectorSize(defaultSectorSize)). + Miner(&genminer, &client, kit.PresealSectors(5), kit.SectorSize(defaultSectorSize), kit.WithAllSubsystems()). + Start(). + InterconnectAll() + + store := gstStore.WrapBlockStore(ctx, blockstore.NewAPIBlockstore(client)) + + blockMiners := ens.BeginMiningMustPost(blocktime) + req.Len(blockMiners, 1) + blockMiner := blockMiners[0] + + nodeOpts := []kit.NodeOpt{kit.SectorSize(defaultSectorSize), kit.OwnerAddr(client.DefaultKey)} + mminer, ens := ens.UnmanagedMiner(ctx, &client, nodeOpts...) + defer mminer.Stop() + + // circulatingSupplyBefore gets the circulating supply just before the given tipset key; + // for calculating the fee we need to know the circulating supply that was given to builtin + // actors at the time it was originally calculated, so we need the CS from the tipset before + // the one where the message was executed. + circulatingSupplyBefore := func(tsk types.TipSetKey) abi.TokenAmount { + ts, err := client.ChainGetTipSet(ctx, tsk) + req.NoError(err) + cs, err := client.StateVMCirculatingSupplyInternal(ctx, ts.Parents()) + req.NoError(err) + return cs.FilCirculating + } + + checkMiner16Invariants := func() { + act, err := client.StateGetActor(ctx, mminer.ActorAddr, types.EmptyTSK) + req.NoError(err) + var st miner16.State + req.NoError(store.Get(ctx, act.Head, &st)) + _, msgs := miner16.CheckStateInvariants(&st, store, act.Balance) + req.Len(msgs.Messages(), 0) + } + + // checkDailyFee checks the daily fee for a sector, returning true if the sector is in the v16 + // format and false if it is in the v15 format. It also returns the daily fee. + checkDailyFee := func(sn abi.SectorNumber) (bool, abi.TokenAmount) { + head, err := client.ChainHead(ctx) + req.NoError(err) + + st, err := state.LoadStateTree(store, head.ParentState()) + req.NoError(err) + + act, err := st.GetActor(mminer.ActorAddr) + req.NoError(err) + + var sectorsArr *adt.Array + { + nv, err := client.StateNetworkVersion(ctx, head.Key()) + req.NoError(err) + switch nv { + case network.Version24: + var miner miner15.State + err = store.Get(ctx, act.Head, &miner) + req.NoError(err) + sectorsArr, err = adt.AsArray(store, miner.Sectors, miner15.SectorsAmtBitwidth) + req.NoError(err) + case network.Version25, network.Version26: + var miner miner16.State + err = store.Get(ctx, act.Head, &miner) + req.NoError(err) + sectorsArr, err = adt.AsArray(store, miner.Sectors, miner16.SectorsAmtBitwidth) + req.NoError(err) + default: + t.Fatalf("unexpected network version: %d", nv) + } + } + + // SectorOnChainInfo has a lazy migration for v16, it could take either a 15 field format or a + // 16 field format with a DailyFee field on the end. We want to determine whether its a 15 or a + // 16 field version by first trying to decode it as a 15 field version. + + dailyFee := abi.NewTokenAmount(0) + var v16 bool + + var soci15 miner15.SectorOnChainInfo + ok, err := sectorsArr.Get(uint64(sn), &soci15) + if err == nil { + req.True(ok) + } else { + // try for v16 sector format, the unmarshaller can also handle the 15 field variety so we do + // this second + var soci16 miner16.SectorOnChainInfo + ok, err = sectorsArr.Get(uint64(sn), &soci16) + req.NoError(err) + req.True(ok) + req.NotNil(soci16.DailyFee) + req.NotNil(soci16.DailyFee.Int) + dailyFee = soci16.DailyFee + v16 = true + } + + // call the public API and check that it shows what we know + s, err := client.StateSectorGetInfo(ctx, mminer.ActorAddr, sn, head.Key()) + req.NoError(err) + req.NotNil(s.DailyFee) + req.NotNil(s.DailyFee.Int) + req.Equal(0, big.Cmp(dailyFee, s.DailyFee), + "daily fees not equal: expected %s, got %s", dailyFee, s.DailyFee) + + return v16, dailyFee + } + + // expectMinerBurn asserts that the miner actor has spent the given amount of funds. + // UnmanagedMiner generously gives a large Value in its message submissions to the miner actor, so + // we need to check the miner's balance to see what it currently is, then find all messages sent + // to the miner actor and sum their values to see how much should be in there. Then the remainder + // is the amount that has been burned. + // + // This is not quite how we expect the daily fee mechanism to work in practice: UnmanagedMiner + // doesn't (currently) win any block rewards, so it has no vesting funds to pull from. So instead, + // our daily fee is extracted from the balance. If we had vesting funds, we would need to check + // that as well. + expectMinerBurn := func(expectBurn abi.TokenAmount) { + ts, err := client.ChainHead(ctx) + req.NoError(err) + + // current balance of the actor + act, err := client.StateGetActor(ctx, mminer.ActorAddr, types.EmptyTSK) + req.NoError(err) + minerBalance := act.Balance + + // hunt through the chain and look for messages sent to our miner and extract their value + totalSend := abi.NewTokenAmount(0) + parentTs := ts.Parents() + req.NoError(err) + for ts.Height() > 1 { + msgs, err := client.ChainGetMessagesInTipset(ctx, parentTs) + req.NoError(err) + for _, msg := range msgs { + if msg.Message.To == mminer.ActorAddr { + totalSend = big.Add(totalSend, msg.Message.Value) + } + } + ts, err = client.ChainGetTipSet(ctx, parentTs) + req.NoError(err) + parentTs = ts.Parents() + } + + require.Equal( + t, + expectBurn.Int64(), + big.Sub(totalSend, minerBalance).Int64(), + "expected miner to have burned %s, but it's burned %s", expectBurn, big.Sub(totalSend, minerBalance), + ) + } + + // checkFeeRecords checks that the DailyFee values in the miner's Deadlines and the FeeDeduction + // totals in the ExpirationQueues for each partition are consistent with what the public API + // reports for sector locations and their daily fees. + checkFeeRecords := func(expectTotalFees abi.TokenAmount) { + t.Log("*** Check consistency of deadline fee records and expiration queue fee deduction records") + + // deadline DailyFee values should sum up the live sectors in that deadline + sectors, err := client.StateMinerSectors(ctx, mminer.ActorAddr, nil, types.EmptyTSK) + req.NoError(err) + deadlines, err := client.StateMinerDeadlines(ctx, mminer.ActorAddr, types.EmptyTSK) + req.NoError(err) + expectedDeadlineFees := make([]abi.TokenAmount, len(deadlines)) + expectedExpirationQueueFees := make(map[miner.SectorLocation]abi.TokenAmount, len(deadlines)) + var actualTotalFees abi.TokenAmount + for _, sector := range sectors { + loc, err := client.StateSectorPartition(ctx, mminer.ActorAddr, sector.SectorNumber, types.EmptyTSK) + req.NoError(err) + expectedDeadlineFees[loc.Deadline] = big.Add(expectedDeadlineFees[loc.Deadline], sector.DailyFee) + expectedExpirationQueueFees[*loc] = big.Add(expectedExpirationQueueFees[*loc], sector.DailyFee) + actualTotalFees = big.Add(actualTotalFees, sector.DailyFee) + } + + req.Equal(0, big.Cmp(expectTotalFees, actualTotalFees), "expected total fees %s, got %s", expectTotalFees, actualTotalFees) + + // public API has DailyFee on each Deadline + for i, deadline := range deadlines { + fee := expectedDeadlineFees[i] + req.Equal(0, big.Cmp(fee, deadline.DailyFee), "expected %s, got %s for deadline %d", fee, deadline.DailyFee, i) + } + + nv, err := client.StateNetworkVersion(ctx, types.EmptyTSK) + req.NoError(err) + if nv < network.Version25 { + // nothing to see here, we're done + return + } + + // we need to go deeper for the queues + act, err := client.StateGetActor(ctx, mminer.ActorAddr, types.EmptyTSK) + req.NoError(err) + var minerState miner16.State + err = store.Get(ctx, act.Head, &minerState) + req.NoError(err) + dls, err := minerState.LoadDeadlines(store) + req.NoError(err) + var checkedExpirationQueueFees int + + err = dls.ForEach(store, func(dlIdx uint64, dl *miner16.Deadline) error { + // check the daily fee again (sanity check) + fee := expectedDeadlineFees[dlIdx] + req.Equal(0, big.Cmp(fee, dl.DailyFee), "expected %s, got %s for deadline %d", fee, dl.DailyFee, dlIdx) + + // dive into the partitions + partitions, err := dl.PartitionsArray(store) + req.NoError(err) + quant := minerState.QuantSpecForDeadline(dlIdx) + var partition miner16.Partition + err = partitions.ForEach(&partition, func(i int64) error { + expectedFee, ok := expectedExpirationQueueFees[miner.SectorLocation{Deadline: dlIdx, Partition: uint64(i)}] + if ok { + checkedExpirationQueueFees++ + } else { + // we don't have record of a sector in here, there shouldn't be a reason to go deeper but just in case ... + expectedFee = abi.NewTokenAmount(0) + } + var actualFee abi.TokenAmount + + // hunt through the expiration queue and find all the fees that are set to be deducted for this deadline+partition + queue, err := miner16.LoadExpirationQueue(store, partition.ExpirationsEpochs, quant, miner16.PartitionExpirationAmtBitwidth) + req.NoError(err) + var expSet miner16.ExpirationSet + err = queue.ForEach(&expSet, func(i int64) error { + actualFee = big.Add(actualFee, expSet.FeeDeduction) + return nil + }) + req.NoError(err) + + req.Equal(0, big.Cmp(expectedFee, actualFee), "expected %s, got %s for deadline %d partition %d expiration fee deduction", expectedFee, actualFee, dlIdx, i) + return nil + }) + req.NoError(err) + + return nil + }) + req.NoError(err) + + req.Equal(len(expectedExpirationQueueFees), checkedExpirationQueueFees, "checked %d expiration queue fees, expected %d", checkedExpirationQueueFees, len(expectedExpirationQueueFees)) + } + + ens.Start() + + t.Log("*** Onboarding sectors before the network upgrade") + expectMinerBurn(abi.NewTokenAmount(0)) + checkFeeRecords(abi.NewTokenAmount(0)) + + _, verifiedClientAddresses := kit.SetupVerifiedClients(ctx, t, &client, rootKey, verifierKey, []*key.Key{verifiedClientKey}) + verifiedClientAddr := verifiedClientAddresses[0] + minerId := must.One(address.IDFromAddress(mminer.ActorAddr)) + + piece := abi.PieceInfo{ + Size: abi.PaddedPieceSize(defaultSectorSize), + PieceCID: kit.BogusPieceCid2, + } + clientId, allocationId := kit.SetupAllocation(ctx, t, &client, minerId, piece, verifiedClientAddr, 0, 0) + + var allSectors []abi.SectorNumber + + // 4 CC sectors, 2 with shorter expirations so we can mess with extensions + var shortDuration abi.ChainEpoch = miner16.MinSectorExpiration + 100 + ccSectors24Manifest := kit.NewSectorBatch(). + AddEmptySectors(2). + AddSector(kit.SectorManifest{Duration: shortDuration}). + AddSector(kit.SectorManifest{Duration: shortDuration}) + ccSectors24, _ := mminer.OnboardSectors(sealProofType, ccSectors24Manifest) + allSectors = append(allSectors, ccSectors24...) + + dealSector24, _ := mminer.OnboardSectors(sealProofType, kit.NewSectorBatch().AddSectorsWithRandomPieces(1)) + allSectors = append(allSectors, dealSector24...) + + verifiedSector24, _ := mminer.OnboardSectors( + sealProofType, + kit.NewSectorBatch().AddSector( + kit.SectorWithVerifiedPiece(piece.PieceCID, &miner14.VerifiedAllocationKey{Client: clientId, ID: verifreg14.AllocationId(allocationId)}))) + allSectors = append(allSectors, verifiedSector24...) + + blockMiner.WatchMinerForPost(mminer.ActorAddr) + + t.Log("*** Checking daily fees on sectors onboarded before the network upgrade, before their first PoST") + + // No fees, no fee information at all in these sectors (sanity check) + for _, sn := range allSectors { + has, fee := checkDailyFee(sn) + req.False(has) // v15 + req.Equal(abi.NewTokenAmount(0), fee) + } + expectMinerBurn(abi.NewTokenAmount(0)) + checkFeeRecords(abi.NewTokenAmount(0)) + + t.Log("*** Waiting for PoST for sectors onboarded before the network upgrade") + + expectedRaw := uint64(defaultSectorSize * 6) // 6 sectors onboarded + expectedQap := uint64(defaultSectorSize * 15) // 5 sectors + 1 verified sector + mminer.WaitTillActivatedAndAssertPower(allSectors, expectedRaw, expectedQap) + + t.Log("*** Checking daily fees on sectors onboarded before the network upgrade, after their first PoST") + + // PoST shouldn't have changed anything + for _, sn := range allSectors { + has, fee := checkDailyFee(sn) + req.False(has) // v15 + req.Equal(abi.NewTokenAmount(0), fee) + } + expectMinerBurn(abi.NewTokenAmount(0)) + checkFeeRecords(abi.NewTokenAmount(0)) + + t.Log("*** Upgrading the network to v25 (Teep)") + + // Move past the upgrade + client.WaitTillChain(ctx, kit.HeightAtLeast(nv25epoch+5)) + + checkMiner16Invariants() + + t.Log("*** Re-checking daily fees on sectors onboarded before the network upgrade") + + // Still no fees, sectors shouldn't have been touched + for _, sn := range allSectors { + has, fee := checkDailyFee(sn) + req.False(has) // v15 + req.Equal(abi.NewTokenAmount(0), fee) + } + expectMinerBurn(abi.NewTokenAmount(0)) + checkFeeRecords(abi.NewTokenAmount(0)) + + t.Log("*** Snapping deals into sectors after the network upgrade") + + // Snap the first two CC sectors, one with an unverified piece, one with a verified piece, capture the + // CS value at each snap so we can accurately predict the expected daily fee + _, snap0Tsk := mminer.SnapDeal(ccSectors24[0], kit.SectorManifest{Piece: piece.PieceCID}) + ccSectors240ExpectedFee := miner16.DailyProofFee(circulatingSupplyBefore(snap0Tsk), abi.NewStoragePower(int64(defaultSectorSize))) + clientId, allocationId = kit.SetupAllocation(ctx, t, &client, minerId, piece, verifiedClientAddr, 0, 0) + _, snap1Tsk := mminer.SnapDeal(ccSectors24[1], kit.SectorManifest{Piece: piece.PieceCID, Verified: &miner14.VerifiedAllocationKey{Client: clientId, ID: verifreg14.AllocationId(allocationId)}}) + ccSectors241ExpectedFee := miner16.DailyProofFee(circulatingSupplyBefore(snap1Tsk), abi.NewStoragePower(int64(defaultSectorSize*10))) + + cc24PostCount := mminer.GetPostCount(ccSectors24[0]) // should be 1, but just in case + feePostWg.Add(1) + go func() { + mminer.WaitTillPostCount(ccSectors24[0], cc24PostCount+1) + feePostWg.Done() + }() + + checkMiner16Invariants() + + t.Log("*** Checking daily fees on old and snapped sectors") + + // No fees on untouched sectors, but because we expect all our sectors to be stored in the root + // of the HAMT together and we've modified at least one of them, they would have all been + // rewritten in the new v16 format, so we shouldn't see v15's here anymore. + noFeeSectors := append(append([]abi.SectorNumber{ccSectors24[2], ccSectors24[3]}, dealSector24...), verifiedSector24...) + for _, sn := range noFeeSectors { + has, fee := checkDailyFee(sn) + req.True(has) // v16 + req.Equal(abi.NewTokenAmount(0), fee) + } + + // fees on snapped sectors, first our non-verified sector, then our verified sector, with 10x qap + has, fee := checkDailyFee(ccSectors24[0]) + req.True(has) + req.Equal(ccSectors240ExpectedFee, fee) + has, fee = checkDailyFee(ccSectors24[1]) + req.True(has) + req.Equal(ccSectors241ExpectedFee, fee) + + expectMinerBurn(abi.NewTokenAmount(0)) // fees are registered, but not yet paid + checkFeeRecords(big.Add(ccSectors240ExpectedFee, ccSectors241ExpectedFee)) + + { + t.Log("*** Extending the expiration of a CC sector after the network upgrade") + + soci, err := client.StateSectorGetInfo(ctx, mminer.ActorAddr, ccSectors24[2], types.EmptyTSK) + req.NoError(err) + _ = mminer.ExtendSectorExpiration(ccSectors24[2], soci.Expiration+30*builtin.EpochsInDay) + + // check that there's still no fees where there shouldn't be - we haven't crossed the grace period + // for extensions yet + for _, sn := range noFeeSectors { + has, fee := checkDailyFee(sn) + req.True(has) + req.Equal(abi.NewTokenAmount(0), fee) + } + } + + t.Log("*** Onboarding sectors after the network upgrade") + + clientId, allocationId = kit.SetupAllocation(ctx, t, &client, minerId, piece, verifiedClientAddr, 0, 0) + + ccSectors25, ccTsk := mminer.OnboardSectors(sealProofType, kit.NewSectorBatch().AddEmptySectors(2)) // 2 CC sectors + allSectors = append(allSectors, ccSectors25...) + ccSectors25ExpectedFee := miner16.DailyProofFee(circulatingSupplyBefore(ccTsk), abi.NewStoragePower(int64(defaultSectorSize))) + feePostWg.Add(1) + go func() { + mminer.WaitTillPostCount(ccSectors25[0], 1) // both onboarded together, so they should post together + feePostWg.Done() + }() + + dealSector25, dealTsk := mminer.OnboardSectors(sealProofType, kit.NewSectorBatch().AddSectorsWithRandomPieces(1)) + allSectors = append(allSectors, dealSector25...) + dealSector25ExpectedFee := miner16.DailyProofFee(circulatingSupplyBefore(dealTsk), abi.NewStoragePower(int64(defaultSectorSize))) + feePostWg.Add(1) + go func() { + mminer.WaitTillPostCount(dealSector25[0], 1) + feePostWg.Done() + }() + + verifiedSector25, verifiedTsk := mminer.OnboardSectors( + sealProofType, + kit.NewSectorBatch().AddSector( + kit.SectorWithVerifiedPiece(piece.PieceCID, &miner14.VerifiedAllocationKey{Client: clientId, ID: verifreg14.AllocationId(allocationId)}))) + allSectors = append(allSectors, verifiedSector25...) + verifiedSector25ExpectedFee := miner16.DailyProofFee(circulatingSupplyBefore(verifiedTsk), abi.NewStoragePower(int64(defaultSectorSize*10))) + feePostWg.Add(1) + go func() { + mminer.WaitTillPostCount(verifiedSector25[0], 1) + feePostWg.Done() + }() + + checkAllFees := func() { + t.Log("*** Checking daily fees on old sectors") + + for _, sn := range noFeeSectors { + has, fee := checkDailyFee(sn) + req.True(has) // v16 + req.Equal(abi.NewTokenAmount(0), fee) + } + + t.Log("*** Re-checking daily fees on snapped sectors") + + has, fee = checkDailyFee(ccSectors24[0]) + req.True(has) + req.Equal(ccSectors240ExpectedFee, fee) + has, fee = checkDailyFee(ccSectors24[1]) + req.True(has) + req.Equal(ccSectors241ExpectedFee, fee) + + t.Log("*** Checking daily fees on new sectors") + + has, fee = checkDailyFee(ccSectors25[0]) + req.True(has) + req.Equal(ccSectors25ExpectedFee, fee) + has, fee = checkDailyFee(ccSectors25[1]) + req.True(has) + req.Equal(ccSectors25ExpectedFee, fee) + has, fee = checkDailyFee(dealSector25[0]) + req.True(has) + req.Equal(dealSector25ExpectedFee, fee) + has, fee = checkDailyFee(verifiedSector25[0]) + req.True(has) + req.Equal(verifiedSector25ExpectedFee, fee) + } + + checkAllFees() // before PoST + checkMiner16Invariants() + + t.Log("*** Waiting for PoST for sectors onboarded after the network upgrade") + + expectedRaw = uint64(defaultSectorSize * 10) // 10 sectors onboarded + expectedQap = uint64(defaultSectorSize * 37) // 7 sectors + 3 (incl 1 snap) verified sectors + mminer.WaitTillActivatedAndAssertPower(allSectors, expectedRaw, expectedQap) + + checkAllFees() // after PoST + checkMiner16Invariants() + + t.Log("*** Upgrading the network to v26 (Tock)") + + // Move past the upgrade + client.WaitTillChain(ctx, kit.HeightAtLeast(nv26epoch+5)) + + var ccSectors242ExpectedFee, ccSectors243ExpectedFee abi.TokenAmount + var ccSectors242ExtensionEpoch, ccSectors243ExtensionEpoch abi.ChainEpoch + { + t.Log("*** Extending the expiration of CC sectors after the Tock (v26) upgrade so they attract fees") + + // Extend the one that's already been extended + soci, err := client.StateSectorGetInfo(ctx, mminer.ActorAddr, ccSectors24[2], types.EmptyTSK) + req.NoError(err) + extensionTsk := mminer.ExtendSectorExpiration(ccSectors24[2], soci.Expiration+30*builtin.EpochsInDay) + ccSectors242ExpectedFee = miner16.DailyProofFee(circulatingSupplyBefore(extensionTsk), abi.NewStoragePower(int64(defaultSectorSize))) + ts, err := client.ChainGetTipSet(ctx, extensionTsk) + req.NoError(err) + ccSectors242ExtensionEpoch = ts.Height() + + // Extend the one that hasn't been extended + soci, err = client.StateSectorGetInfo(ctx, mminer.ActorAddr, ccSectors24[3], types.EmptyTSK) + req.NoError(err) + extensionTsk = mminer.ExtendSectorExpiration(ccSectors24[3], soci.Expiration+30*builtin.EpochsInDay) + ccSectors243ExpectedFee = miner16.DailyProofFee(circulatingSupplyBefore(extensionTsk), abi.NewStoragePower(int64(defaultSectorSize))) + ts, err = client.ChainGetTipSet(ctx, extensionTsk) + req.NoError(err) + ccSectors243ExtensionEpoch = ts.Height() + + // Remove the two extended sectors from the list of sectors we expect to not have fees + noFeeSectors = append(append([]abi.SectorNumber{}, dealSector24...), verifiedSector24...) + + // check them again + for _, sn := range noFeeSectors { + has, fee := checkDailyFee(sn) + req.True(has) + req.Equal(abi.NewTokenAmount(0), fee) + } + + // check the extended sectors + has, fee := checkDailyFee(ccSectors24[2]) + req.True(has) + req.Equal(ccSectors242ExpectedFee, fee) + has, fee = checkDailyFee(ccSectors24[3]) + req.True(has) + req.Equal(ccSectors243ExpectedFee, fee) + + // we haven't paid any fees yet, so wait for after the next proving deadline for these sectors + posts := mminer.GetPostCount(ccSectors24[2]) + feePostWg.Add(1) + go func() { + mminer.WaitTillPostCount(ccSectors24[2], posts+1) + feePostWg.Done() + }() + } + + // wait for all fees to be paid—we need each one to have reached its first deadline and they are + // likely spread out over multiple deadlines + feePostWg.Wait() + head, err := client.ChainHead(ctx) + req.NoError(err) + // wait one deadline to make sure we get to the end of the current deadline where we've done a + // PoST. + // NOTE: we are crossing our fingers a little here, it is possible that our snapped sectors end + // up hitting two proving deadlines if we didn't compress our nv25 onboarding enough and get + // allocated to nicely aligned deadlines. + client.WaitTillChain(ctx, kit.HeightAtLeast(head.Height()+miner.WPoStChallengeWindow()+10)) + + var expectTotalBurn abi.TokenAmount + for _, fee := range []struct { + sn abi.SectorNumber + fee abi.TokenAmount + }{ + {ccSectors24[0], ccSectors240ExpectedFee}, + {ccSectors24[1], ccSectors241ExpectedFee}, + {ccSectors25[0], ccSectors25ExpectedFee}, + {ccSectors25[1], ccSectors25ExpectedFee}, + {dealSector25[0], dealSector25ExpectedFee}, + {verifiedSector25[0], verifiedSector25ExpectedFee}, + } { + // we assume our WaitGroup has put us past the end-of-deadline cron execution so we'll conflate the two here + paymentsPast := mminer.GetPostCountSince(nv25epoch, fee.sn) + expectTotalBurn = big.Add(expectTotalBurn, big.Mul(big.NewInt(int64(paymentsPast)), fee.fee)) + } + + // Add the payments for the two pre-nv25 sectors that were extended in nv26 + paymentsPast := mminer.GetPostCountSince(ccSectors242ExtensionEpoch, ccSectors24[2]) + expectTotalBurn = big.Add(expectTotalBurn, big.Mul(big.NewInt(int64(paymentsPast)), ccSectors242ExpectedFee)) + paymentsPast = mminer.GetPostCountSince(ccSectors243ExtensionEpoch, ccSectors24[3]) + expectTotalBurn = big.Add(expectTotalBurn, big.Mul(big.NewInt(int64(paymentsPast)), ccSectors243ExpectedFee)) + + // we've passed our first deadline where fees were payable, both for the snapped nv24 sectors + // and the nv25 sectors + expectMinerBurn(expectTotalBurn) + // with only one fee payment so far for all sectors, the total in the records should be the same as the burn + checkFeeRecords(expectTotalBurn) + checkMiner16Invariants() +} diff --git a/itests/direct_data_onboard_test.go b/itests/direct_data_onboard_test.go index 071b441cc0e..82fed1d4945 100644 --- a/itests/direct_data_onboard_test.go +++ b/itests/direct_data_onboard_test.go @@ -21,7 +21,8 @@ import ( "github.com/filecoin-project/go-commp-utils/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" - market2 "github.com/filecoin-project/go-state-types/builtin/v9/market" + market2 "github.com/filecoin-project/go-state-types/builtin/v16/market" + miner16 "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/network" @@ -252,9 +253,16 @@ func TestOnboardMixedMarketDDO(t *testing.T) { ds, err := client.StateMarketStorageDeal(ctx, dealID, types.EmptyTSK) require.NoError(t, err) - require.NotEqual(t, -1, ds.State.SectorStartEpoch) + // verify that the daily fee was set up correctly + soci, err := client.StateSectorGetInfo(ctx, miner.ActorAddr, si.SectorID, types.EmptyTSK) + require.NoError(t, err) + cs, err := client.StateVMCirculatingSupplyInternal(ctx, types.EmptyTSK) + require.NoError(t, err) + expectedDailyFee := miner16.DailyProofFee(cs.FilCirculating, abi.NewStoragePower(2048)) + require.Equal(t, expectedDailyFee, soci.DailyFee) + { deals, err := client.StateMarketDeals(ctx, types.EmptyTSK) require.NoError(t, err) diff --git a/itests/direct_data_onboard_verified_test.go b/itests/direct_data_onboard_verified_test.go index 53e3b3bade0..3bb88b32310 100644 --- a/itests/direct_data_onboard_verified_test.go +++ b/itests/direct_data_onboard_verified_test.go @@ -24,13 +24,12 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - verifregtypes13 "github.com/filecoin-project/go-state-types/builtin/v13/verifreg" - datacap2 "github.com/filecoin-project/go-state-types/builtin/v9/datacap" + miner16 "github.com/filecoin-project/go-state-types/builtin/v16/miner" + verifregtypes16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" lapi "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/v1api" "github.com/filecoin-project/lotus/chain/actors" - "github.com/filecoin-project/lotus/chain/actors/builtin/datacap" minertypes "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg" "github.com/filecoin-project/lotus/chain/types" @@ -51,22 +50,15 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { ctx = context.Background() ) - rootKey, err := key.GenerateKey(types.KTSecp256k1) - require.NoError(t, err) - - verifierKey, err := key.GenerateKey(types.KTSecp256k1) - require.NoError(t, err) - - verifiedClientKey, err := key.GenerateKey(types.KTBLS) - require.NoError(t, err) - - bal, err := types.ParseFIL("100fil") - require.NoError(t, err) + initialBigBalance := types.MustParseFIL("100fil").Int64() + rootKey := must.One(key.GenerateKey(types.KTSecp256k1)) + verifierKey := must.One(key.GenerateKey(types.KTSecp256k1)) + verifiedClientKey := must.One(key.GenerateKey(types.KTBLS)) client, miner, ens := kit.EnsembleMinimal(t, kit.ThroughRPC(), - kit.RootVerifier(rootKey, abi.NewTokenAmount(bal.Int64())), - kit.Account(verifierKey, abi.NewTokenAmount(bal.Int64())), - kit.Account(verifiedClientKey, abi.NewTokenAmount(bal.Int64())), + kit.RootVerifier(rootKey, abi.NewTokenAmount(initialBigBalance)), + kit.Account(verifierKey, abi.NewTokenAmount(initialBigBalance)), + kit.Account(verifiedClientKey, abi.NewTokenAmount(initialBigBalance)), ) /* --- Setup subscription channels for ActorEvents --- */ @@ -109,8 +101,8 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { /* --- Setup verified registry and client and allocate datacap to client */ - verifierAddr, verifiedClientAddrses := ddoVerifiedSetupVerifiedClient(ctx, t, client, rootKey, verifierKey, []*key.Key{verifiedClientKey}) - verifiedClientAddr := verifiedClientAddrses[0] + verifierAddr, verifiedClientAddresses := kit.SetupVerifiedClients(ctx, t, client, rootKey, verifierKey, []*key.Key{verifiedClientKey}) + verifiedClientAddr := verifiedClientAddresses[0] /* --- Prepare piece for onboarding --- */ @@ -124,8 +116,15 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { /* --- Allocate datacap for the piece by the verified client --- */ head, err := client.ChainHead(ctx) require.NoError(t, err) + // but first, a detour to an expiring claim so we can observe the events bogusAllocationExpiry := head.Height() + 100 - clientId, allocationId := ddoVerifiedSetupAllocations(ctx, t, client, minerId, dc, verifiedClientAddr, bogusAllocationExpiry, 0) + bogusPiece := abi.PieceInfo{ + Size: dc.Size, + PieceCID: bogusPieceCid, + } + _, _ = kit.SetupAllocation(ctx, t, client, minerId, bogusPiece, verifiedClientAddr, bogusAllocationExpiry, 0) + // actual claim + clientId, allocationId := kit.SetupAllocation(ctx, t, client, minerId, dc, verifiedClientAddr, 0, 0) head, err = client.ChainHead(ctx) require.NoError(t, err) @@ -141,6 +140,19 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { so, si := ddoVerifiedOnboardPiece(ctx, t, miner, clientId, allocationId, dc, pieceData) + /* --- Verify that the daily fee was set up correctly --- */ + + soci, err := client.StateSectorGetInfo(ctx, miner.ActorAddr, si.SectorID, types.EmptyTSK) + require.NoError(t, err) + // get CS @ the activation epoch + activationTs, err := client.ChainGetTipSetByHeight(ctx, soci.Activation, types.EmptyTSK) + require.NoError(t, err) + cs, err := client.StateVMCirculatingSupplyInternal(ctx, activationTs.Key()) + require.NoError(t, err) + qap := abi.NewStoragePower(int64(pieceSize.Padded()) * 10) // 10x power + expectedDailyFee := miner16.DailyProofFee(cs.FilCirculating, qap) + require.Equal(t, expectedDailyFee, soci.DailyFee) + // check that we have one allocation because the real allocation has been claimed by the miner for the piece allocations, err := client.StateGetAllocations(ctx, verifiedClientAddr, types.EmptyTSK) require.NoError(t, err) @@ -416,101 +428,7 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { // speed than the ActorEventHandler is aware of. } -func ddoVerifiedSetupAllocations( - ctx context.Context, - t *testing.T, - node v1api.FullNode, - minerId uint64, - dc abi.PieceInfo, - verifiedClientAddr address.Address, - bogusAllocExpiration abi.ChainEpoch, // zero if we don't want to make one - tmax abi.ChainEpoch, -) (clientID abi.ActorID, allocationID verifregtypes13.AllocationId) { - if tmax == 0 { - tmax = verifreg.MaximumVerifiedAllocationTerm - } - - var requests []verifreg.AllocationRequest - - if bogusAllocExpiration != 0 { - // design this one to expire so we can observe allocation-removed - allocationRequestBogus := verifreg.AllocationRequest{ - Provider: abi.ActorID(minerId), - Data: bogusPieceCid, - Size: dc.Size, - TermMin: verifreg.MinimumVerifiedAllocationTerm, - TermMax: tmax, - Expiration: bogusAllocExpiration, - } - requests = append(requests, allocationRequestBogus) - } - - allocationRequest := verifreg.AllocationRequest{ - Provider: abi.ActorID(minerId), - Data: dc.PieceCID, - Size: dc.Size, - TermMin: verifreg.MinimumVerifiedAllocationTerm, - TermMax: tmax, - Expiration: verifreg.MaximumVerifiedAllocationExpiration, - } - requests = append(requests, allocationRequest) - - allocationRequests := verifreg.AllocationRequests{ - Allocations: requests, - } - - receiverParams, aerr := actors.SerializeParams(&allocationRequests) - require.NoError(t, aerr) - - var amt abi.TokenAmount - amt = big.Mul(big.NewInt(int64(dc.Size)), builtin.TokenPrecision) - if bogusAllocExpiration != 0 { - amt = big.Mul(big.NewInt(int64(dc.Size*2)), builtin.TokenPrecision) - } - - transferParams, aerr := actors.SerializeParams(&datacap2.TransferParams{ - To: builtin.VerifiedRegistryActorAddr, - Amount: amt, - OperatorData: receiverParams, - }) - require.NoError(t, aerr) - - msg := &types.Message{ - To: builtin.DatacapActorAddr, - From: verifiedClientAddr, - Method: datacap.Methods.TransferExported, - Params: transferParams, - Value: big.Zero(), - } - - sm, err := node.MpoolPushMessage(ctx, msg, nil) - require.NoError(t, err) - - res, err := node.StateWaitMsg(ctx, sm.Cid(), 1, lapi.LookbackNoLimit, true) - require.NoError(t, err) - require.EqualValues(t, 0, res.Receipt.ExitCode) - - // check that we have an allocation - allocations, err := node.StateGetAllocations(ctx, verifiedClientAddr, types.EmptyTSK) - require.NoError(t, err) - if bogusAllocExpiration != 0 { - require.Len(t, allocations, 2) // allocation waiting to be claimed - } else { - require.Len(t, allocations, 1) // allocation waiting to be claimed - } - - for key, value := range allocations { - if value.Data == dc.PieceCID { - allocationID = verifregtypes13.AllocationId(key) - clientID = value.Client - break - } - } - require.NotEqual(t, verifreg.AllocationId(0), allocationID) // found it in there - return clientID, allocationID -} - -func ddoVerifiedOnboardPiece(ctx context.Context, t *testing.T, miner *kit.TestMiner, clientId abi.ActorID, allocationId verifregtypes13.AllocationId, dc abi.PieceInfo, pieceData []byte) (lapi.SectorOffset, lapi.SectorInfo) { +func ddoVerifiedOnboardPiece(ctx context.Context, t *testing.T, miner *kit.TestMiner, clientId abi.ActorID, allocationId verifregtypes16.AllocationId, dc abi.PieceInfo, pieceData []byte) (lapi.SectorOffset, lapi.SectorInfo) { head, err := miner.FullNode.ChainHead(ctx) require.NoError(t, err) @@ -648,71 +566,6 @@ func ddoVerifiedBuildActorEventsFromMessages(ctx context.Context, t *testing.T, return actorEvents } -func ddoVerifiedSetupVerifiedClient(ctx context.Context, t *testing.T, client *kit.TestFullNode, rootKey *key.Key, verifierKey *key.Key, verifiedClientKeys []*key.Key) (verifierAddr address.Address, ret []address.Address) { - // import the root key. - rootAddr, err := client.WalletImport(ctx, &rootKey.KeyInfo) - require.NoError(t, err) - - // import the verifiers' keys. - verifierAddr, err = client.WalletImport(ctx, &verifierKey.KeyInfo) - require.NoError(t, err) - - // import the verified client's key. - for _, k := range verifiedClientKeys { - verifiedClientAddr, err := client.WalletImport(ctx, &k.KeyInfo) - require.NoError(t, err) - ret = append(ret, verifiedClientAddr) - } - - allowance := big.NewInt(100000000000) - params, aerr := actors.SerializeParams(&verifreg.AddVerifierParams{Address: verifierAddr, Allowance: allowance}) - require.NoError(t, aerr) - - msg := &types.Message{ - From: rootAddr, - To: verifreg.Address, - Method: verifreg.Methods.AddVerifier, - Params: params, - Value: big.Zero(), - } - - sm, err := client.MpoolPushMessage(ctx, msg, nil) - require.NoError(t, err, "AddVerifier failed") - - res, err := client.StateWaitMsg(ctx, sm.Cid(), 1, lapi.LookbackNoLimit, true) - require.NoError(t, err) - require.EqualValues(t, 0, res.Receipt.ExitCode) - - verifierAllowance, err := client.StateVerifierStatus(ctx, verifierAddr, types.EmptyTSK) - require.NoError(t, err) - require.Equal(t, allowance, *verifierAllowance) - - // assign datacap to clients - for _, ad := range ret { - initialDatacap := big.NewInt(10000) - - params, aerr = actors.SerializeParams(&verifreg.AddVerifiedClientParams{Address: ad, Allowance: initialDatacap}) - require.NoError(t, aerr) - - msg = &types.Message{ - From: verifierAddr, - To: verifreg.Address, - Method: verifreg.Methods.AddVerifiedClient, - Params: params, - Value: big.Zero(), - } - - sm, err = client.MpoolPushMessage(ctx, msg, nil) - require.NoError(t, err) - - res, err = client.StateWaitMsg(ctx, sm.Cid(), 1, lapi.LookbackNoLimit, true) - require.NoError(t, err) - require.EqualValues(t, 0, res.Receipt.ExitCode) - } - - return -} - func filterEvents(events []*types.ActorEvent, key string) []*types.ActorEvent { keyBytes := must.One(ipld.Encode(basicnode.NewString(key), dagcbor.Encode)) filtered := make([]*types.ActorEvent, 0) @@ -770,30 +623,19 @@ func TestVerifiedDDOExtendClaim(t *testing.T) { ctx = context.Background() ) - rootKey, err := key.GenerateKey(types.KTSecp256k1) - require.NoError(t, err) - - verifierKey, err := key.GenerateKey(types.KTSecp256k1) - require.NoError(t, err) - - verifiedClientKey1, err := key.GenerateKey(types.KTBLS) - require.NoError(t, err) - - verifiedClientKey2, err := key.GenerateKey(types.KTBLS) - require.NoError(t, err) - - unverifiedClient, err := key.GenerateKey(types.KTBLS) - require.NoError(t, err) - - bal, err := types.ParseFIL("100fil") - require.NoError(t, err) + initialBigBalance := types.MustParseFIL("100fil").Int64() + rootKey := must.One(key.GenerateKey(types.KTSecp256k1)) + verifierKey := must.One(key.GenerateKey(types.KTSecp256k1)) + verifiedClientKey1 := must.One(key.GenerateKey(types.KTBLS)) + verifiedClientKey2 := must.One(key.GenerateKey(types.KTBLS)) + unverifiedClient := must.One(key.GenerateKey(types.KTBLS)) client, miner, ens := kit.EnsembleMinimal(t, kit.ThroughRPC(), - kit.RootVerifier(rootKey, abi.NewTokenAmount(bal.Int64())), - kit.Account(verifierKey, abi.NewTokenAmount(bal.Int64())), - kit.Account(verifiedClientKey1, abi.NewTokenAmount(bal.Int64())), - kit.Account(verifiedClientKey2, abi.NewTokenAmount(bal.Int64())), - kit.Account(unverifiedClient, abi.NewTokenAmount(bal.Int64())), + kit.RootVerifier(rootKey, abi.NewTokenAmount(initialBigBalance)), + kit.Account(verifierKey, abi.NewTokenAmount(initialBigBalance)), + kit.Account(verifiedClientKey1, abi.NewTokenAmount(initialBigBalance)), + kit.Account(verifiedClientKey2, abi.NewTokenAmount(initialBigBalance)), + kit.Account(unverifiedClient, abi.NewTokenAmount(initialBigBalance)), ) /* --- Start mining --- */ @@ -805,9 +647,9 @@ func TestVerifiedDDOExtendClaim(t *testing.T) { /* --- Setup verified registry and clients and allocate datacap to client */ - _, verifiedClientAddrses := ddoVerifiedSetupVerifiedClient(ctx, t, client, rootKey, verifierKey, []*key.Key{verifiedClientKey1, verifiedClientKey2}) - verifiedClientAddr1 := verifiedClientAddrses[0] - verifiedClientAddr2 := verifiedClientAddrses[1] + _, verifiedClientAddresses := kit.SetupVerifiedClients(ctx, t, client, rootKey, verifierKey, []*key.Key{verifiedClientKey1, verifiedClientKey2}) + verifiedClientAddr1 := verifiedClientAddresses[0] + verifiedClientAddr2 := verifiedClientAddresses[1] /* --- Prepare piece for onboarding --- */ @@ -819,7 +661,7 @@ func TestVerifiedDDOExtendClaim(t *testing.T) { require.NoError(t, err) /* --- Allocate datacap for the piece by the verified client --- */ - clientId, allocationId := ddoVerifiedSetupAllocations(ctx, t, client, minerId, dc, verifiedClientAddr1, 0, builtin.EpochsInYear*3) + clientId, allocationId := kit.SetupAllocation(ctx, t, client, minerId, dc, verifiedClientAddr1, 0, builtin.EpochsInYear*3) /* --- Onboard the piece --- */ @@ -834,8 +676,8 @@ func TestVerifiedDDOExtendClaim(t *testing.T) { ID: abi.ActorID(minerId), } - pcm := make(map[verifregtypes13.ClaimId]cli.ProvInfo) - pcm[verifregtypes13.ClaimId(allocationId)] = prov + pcm := make(map[verifregtypes16.ClaimId]cli.ProvInfo) + pcm[verifregtypes16.ClaimId(allocationId)] = prov // Extend claim with same client msgs, err := cli.CreateExtendClaimMsg(ctx, client.FullNode, pcm, []string{}, verifiedClientAddr1, (builtin.EpochsInYear*3)+3000, false, true, 100) diff --git a/itests/kit/ensemble.go b/itests/kit/ensemble.go index b42f9b38f5e..b7acc078343 100644 --- a/itests/kit/ensemble.go +++ b/itests/kit/ensemble.go @@ -177,6 +177,15 @@ func NewEnsemble(t *testing.T, opts ...EnsembleOpt) *Ensemble { buildconstants.EquivocationDelaySecs = 0 + // See FIP-0100; we manually set these to the 2k network settings for itests not run with -tags 2k + buildconstants.UpgradeAssemblyHeight = -1 // so GetVMCirculatingSupplyDetailed() properly calculates FilReserved + // 700M FIL is the correct value for test networks, with UpgradeAssemblyHeight in the past, this + // value is used in supply.go to calculate the mining reserve in circulation which is added to + // circulating supply. + buildconstants.InitialFilReserved = types.MustParseFIL("700000000 FIL").Int + // Bump it at Teep upgrade to simulate FIP-0100 and get CS close to ~700M FIL like in mainnet. + buildconstants.UpgradeTeepInitialFilReserved = types.MustParseFIL("1400000000 FIL").Int + return n } diff --git a/itests/kit/funds.go b/itests/kit/funds.go index 1918d9125ff..82b4befb56b 100644 --- a/itests/kit/funds.go +++ b/itests/kit/funds.go @@ -9,9 +9,17 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/builtin" + verifregtypes16 "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" + datacap2 "github.com/filecoin-project/go-state-types/builtin/v9/datacap" "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/builtin/datacap" + "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/chain/wallet/key" ) // SendFunds sends funds from the default wallet of the specified sender node @@ -38,3 +46,146 @@ func (f *TestFullNode) WaitMsg(ctx context.Context, msg cid.Cid) { require.EqualValues(f.t, 0, res.Receipt.ExitCode, "message did not successfully execute") } + +// SetupVerifiedClients assumes that rootKey has been set in the ensemble's genesis and that +// verifierKey and verifiedClientKeys exist as accounts. It first sets up the verifier with datacap +// to allocate, and then allocates datacap to each of the verified clients. +// It returns the address of the verifier and the addresses of the verified clients. +func SetupVerifiedClients(ctx context.Context, t *testing.T, client *TestFullNode, rootKey *key.Key, verifierKey *key.Key, verifiedClientKeys []*key.Key) (verifierAddr address.Address, ret []address.Address) { + // import the root key. + rootAddr, err := client.WalletImport(ctx, &rootKey.KeyInfo) + require.NoError(t, err) + + // import the verifiers' keys. + verifierAddr, err = client.WalletImport(ctx, &verifierKey.KeyInfo) + require.NoError(t, err) + + // import the verified client's key. + for _, k := range verifiedClientKeys { + verifiedClientAddr, err := client.WalletImport(ctx, &k.KeyInfo) + require.NoError(t, err) + ret = append(ret, verifiedClientAddr) + } + + allowance := big.NewInt(100000000000) + params, aerr := actors.SerializeParams(&verifreg.AddVerifierParams{Address: verifierAddr, Allowance: allowance}) + require.NoError(t, aerr) + + msg := &types.Message{ + From: rootAddr, + To: verifreg.Address, + Method: verifreg.Methods.AddVerifier, + Params: params, + Value: big.Zero(), + } + + sm, err := client.MpoolPushMessage(ctx, msg, nil) + require.NoError(t, err, "AddVerifier failed") + + res, err := client.StateWaitMsg(ctx, sm.Cid(), 1, api.LookbackNoLimit, true) + require.NoError(t, err) + require.EqualValues(t, 0, res.Receipt.ExitCode) + + verifierAllowance, err := client.StateVerifierStatus(ctx, verifierAddr, types.EmptyTSK) + require.NoError(t, err) + require.Equal(t, allowance, *verifierAllowance) + + // assign datacap to clients + for _, ad := range ret { + initialDatacap := big.NewInt(10000) + + params, aerr = actors.SerializeParams(&verifreg.AddVerifiedClientParams{Address: ad, Allowance: initialDatacap}) + require.NoError(t, aerr) + + msg = &types.Message{ + From: verifierAddr, + To: verifreg.Address, + Method: verifreg.Methods.AddVerifiedClient, + Params: params, + Value: big.Zero(), + } + + sm, err = client.MpoolPushMessage(ctx, msg, nil) + require.NoError(t, err) + + res, err = client.StateWaitMsg(ctx, sm.Cid(), 1, api.LookbackNoLimit, true) + require.NoError(t, err) + require.EqualValues(t, 0, res.Receipt.ExitCode) + } + + return +} + +func SetupAllocation( + ctx context.Context, + t *testing.T, + node api.FullNode, + minerId uint64, + dc abi.PieceInfo, + verifiedClientAddr address.Address, + expiration abi.ChainEpoch, // set to zero if we want to use maximum + termMax abi.ChainEpoch, // set to zero if we want to use maximum +) (clientID abi.ActorID, allocationID verifregtypes16.AllocationId) { + if termMax == 0 { + termMax = verifreg.MaximumVerifiedAllocationTerm + } + if expiration == 0 { + expiration = verifreg.MaximumVerifiedAllocationExpiration + } + + var requests []verifreg.AllocationRequest + + allocationRequest := verifreg.AllocationRequest{ + Provider: abi.ActorID(minerId), + Data: dc.PieceCID, + Size: dc.Size, + TermMin: verifreg.MinimumVerifiedAllocationTerm, + TermMax: termMax, + Expiration: expiration, + } + requests = append(requests, allocationRequest) + + allocationRequests := verifreg.AllocationRequests{ + Allocations: requests, + } + + receiverParams, aerr := actors.SerializeParams(&allocationRequests) + require.NoError(t, aerr) + + transferParams, aerr := actors.SerializeParams(&datacap2.TransferParams{ + To: builtin.VerifiedRegistryActorAddr, + Amount: big.Mul(big.NewInt(int64(dc.Size)), builtin.TokenPrecision), + OperatorData: receiverParams, + }) + require.NoError(t, aerr) + + msg := &types.Message{ + To: builtin.DatacapActorAddr, + From: verifiedClientAddr, + Method: datacap.Methods.TransferExported, + Params: transferParams, + Value: big.Zero(), + } + + sm, err := node.MpoolPushMessage(ctx, msg, nil) + require.NoError(t, err) + + res, err := node.StateWaitMsg(ctx, sm.Cid(), 1, api.LookbackNoLimit, true) + require.NoError(t, err) + require.EqualValues(t, 0, res.Receipt.ExitCode) + + // check that we have an allocation + allocations, err := node.StateGetAllocations(ctx, verifiedClientAddr, types.EmptyTSK) + require.NoError(t, err) + + for key, value := range allocations { + vkey := verifregtypes16.AllocationId(key) + if dc.PieceCID.Equals(value.Data) && vkey >= allocationID { + allocationID = verifregtypes16.AllocationId(key) + clientID = value.Client + } + } + + require.NotEqual(t, verifreg.AllocationId(0), allocationID) // found it in there + return clientID, allocationID +} diff --git a/itests/kit/node_unmanaged.go b/itests/kit/node_unmanaged.go index 1771bea3ff2..61e35a5f01f 100644 --- a/itests/kit/node_unmanaged.go +++ b/itests/kit/node_unmanaged.go @@ -21,6 +21,7 @@ import ( ffi "github.com/filecoin-project/filecoin-ffi" "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-commp-utils/v2" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/batch" @@ -38,8 +39,11 @@ import ( "github.com/filecoin-project/lotus/chain/wallet/key" ) -// TODO: this shouldn't be fixed, we should make a new one for each sector/piece -var fixedPieceCid = cid.MustParse("baga6ea4seaqjtovkwk4myyzj56eztkh5pzsk5upksan6f5outesy62bsvl4dsha") +// TODO: make a randomiser for this +var ( + BogusPieceCid1 = cid.MustParse("baga6ea4seaqjtovkwk4myyzj56eztkh5pzsk5upksan6f5outesy62bsvl4dsha") + BogusPieceCid2 = cid.MustParse("baga6ea4seaqlhznlutptgfwhffupyer6txswamerq5fc2jlwf2lys2mm5jtiaeq") +) // 32 bytes of 1's: this value essentially ignored in NI-PoRep proofs, but all zeros is not recommended. // Regardless of what we submit to the chain, actors will replace it with 32 1's anyway but we are @@ -88,9 +92,21 @@ type sectorInfo struct { sealedCid cid.Cid unsealedCid cid.Cid sectorProof []byte - pieces []abi.PieceInfo + pieces []miner14.PieceActivationManifest sealTickets abi.SealRandomness sealRandomnessEpoch abi.ChainEpoch + duration abi.ChainEpoch +} + +func (si sectorInfo) piecesToPieceInfos() []abi.PieceInfo { + pcPieces := make([]abi.PieceInfo, len(si.pieces)) + for i, piece := range si.pieces { + pcPieces[i] = abi.PieceInfo{ + Size: piece.Size, + PieceCID: piece.CID, + } + } + return pcPieces } type windowPost struct { @@ -188,6 +204,67 @@ func WithExpectedExitCodes(exitCodes []exitcode.ExitCode) OnboardOpt { } } +// SectorManifest is (currently) a simplified SectorAllocationManifest, allowing zero or one pieces +// to be built into a sector, where that one piece may be verified. Undefined Piece and nil Verified +// onboards a CC sector. Duration changes the default sector expiration of 300 days past the minimum. +type SectorManifest struct { + Piece cid.Cid + Verified *miner14.VerifiedAllocationKey + Duration abi.ChainEpoch +} + +// SectorBatch is a builder for creating sector manifests +type SectorBatch struct { + manifests []SectorManifest +} + +// NewSectorBatch creates an empty sector batch +func NewSectorBatch() *SectorBatch { + return &SectorBatch{manifests: []SectorManifest{}} +} + +// AddEmptySectors adds the specified number of CC sectors to the batch +func (sb *SectorBatch) AddEmptySectors(count int) *SectorBatch { + for i := 0; i < count; i++ { + sb.manifests = append(sb.manifests, EmptySector()) + } + return sb +} + +// AddSectorsWithRandomPieces adds sectors with random pieces +func (sb *SectorBatch) AddSectorsWithRandomPieces(count int) *SectorBatch { + for i := 0; i < count; i++ { + sb.manifests = append(sb.manifests, SectorWithPiece(BogusPieceCid1)) + } + return sb +} + +// AddSector adds a custom sector manifest +func (sb *SectorBatch) AddSector(manifest SectorManifest) *SectorBatch { + sb.manifests = append(sb.manifests, manifest) + return sb +} + +// EmptySector creates an empty (CC) sector with no pieces +func EmptySector() SectorManifest { + return SectorManifest{} +} + +// SectorWithPiece creates a sector with the specified piece CID +func SectorWithPiece(piece cid.Cid) SectorManifest { + return SectorManifest{ + Piece: piece, + } +} + +// SectorWithVerifiedPiece creates a sector with a verified allocation +func SectorWithVerifiedPiece(piece cid.Cid, key *miner14.VerifiedAllocationKey) SectorManifest { + return SectorManifest{ + Piece: piece, + Verified: key, + } +} + // OnboardSectors onboards the specified number of sectors to the miner using the specified proof // type. If `withPieces` is true and the proof type supports it, the sectors will be onboarded with // pieces, otherwise they will be CC. @@ -196,10 +273,9 @@ func WithExpectedExitCodes(exitCodes []exitcode.ExitCode) OnboardOpt { // process with real proofs. func (tm *TestUnmanagedMiner) OnboardSectors( proofType abi.RegisteredSealProof, - withPieces bool, - count int, + sectorBatch *SectorBatch, opts ...OnboardOpt, -) []abi.SectorNumber { +) ([]abi.SectorNumber, types.TipSetKey) { req := require.New(tm.t) @@ -208,7 +284,7 @@ func (tm *TestUnmanagedMiner) OnboardSectors( req.NoError(o(&options)) } - sectors := make([]sectorInfo, count) + sectors := make([]sectorInfo, len(sectorBatch.manifests)) // Wait for the seal randomness to be available (we can only draw seal randomness from // tipsets that have already achieved finality) @@ -219,21 +295,25 @@ func (tm *TestUnmanagedMiner) OnboardSectors( // For each sector, run PC1, PC2, C1 an C2, preparing for ProveCommit. If the proof needs it we // will also submit a precommit for the sector. - for i := 0; i < count; i++ { - idx := i + for idx, sm := range sectorBatch.manifests { // We hold on to `sector`, adding new properties to it as we go along until we're finished with // this phase, then add it to `sectors` sector := tm.nextSector(proofType) sector.sealRandomnessEpoch = sealRandEpoch + sector.duration = sm.Duration + if sector.duration == 0 { + sector.duration = builtin.EpochsInDay * 300 + } eg.Go(func() error { - if withPieces { + if sm.Piece.Defined() { // Build a sector with non-zero pieces to onboard if tm.mockProofs { - sector.pieces = []abi.PieceInfo{{ - Size: abi.PaddedPieceSize(tm.options.sectorSize), - PieceCID: fixedPieceCid, + sector.pieces = []miner14.PieceActivationManifest{{ + Size: abi.PaddedPieceSize(tm.options.sectorSize), + CID: sm.Piece, + VerifiedAllocationKey: sm.Verified, }} } else { var err error @@ -282,7 +362,7 @@ func (tm *TestUnmanagedMiner) OnboardSectors( } // Submit ProveCommit for all sectors - exitCodes := tm.submitProveCommit(proofType, sectors, options.requireActivationSuccess, options.modifyNIActivationsBeforeSubmit) + exitCodes, tsk := tm.submitProveCommit(proofType, sectors, options.requireActivationSuccess, options.modifyNIActivationsBeforeSubmit) // ProveCommit may have succeeded overall, but some sectors may have failed if RequireActivationSuccess // was set to false. We need to return the exit codes for each sector so the caller can determine @@ -305,12 +385,13 @@ func (tm *TestUnmanagedMiner) OnboardSectors( tm.wdPostLoop() - return onboarded + return onboarded, tsk } // SnapDeal snaps a deal into a sector, generating a new sealed sector and updating the sector's state. // WindowPoSt should continue to operate after this operation if required. -func (tm *TestUnmanagedMiner) SnapDeal(sectorNumber abi.SectorNumber) []abi.PieceInfo { +// The SectorManifest argument (currently) only impacts mock proofs, and is ignored otherwise. +func (tm *TestUnmanagedMiner) SnapDeal(sectorNumber abi.SectorNumber, sm SectorManifest) ([]abi.PieceInfo, types.TipSetKey) { req := require.New(tm.t) tm.log("Snapping a deal into sector %d ...", sectorNumber) @@ -355,7 +436,7 @@ func (tm *TestUnmanagedMiner) SnapDeal(sectorNumber abi.SectorNumber) []abi.Piec } else { pieces = []abi.PieceInfo{{ Size: abi.PaddedPieceSize(tm.options.sectorSize), - PieceCID: cid.MustParse("baga6ea4seaqlhznlutptgfwhffupyer6txswamerq5fc2jlwf2lys2mm5jtiaeq"), + PieceCID: sm.Piece, }} snapProof = []byte{0xde, 0xad, 0xbe, 0xef} newSealedCid = cid.MustParse("bagboea4b5abcatlxechwbp7kjpjguna6r6q7ejrhe6mdp3lf34pmswn27pkkieka") @@ -365,10 +446,14 @@ func (tm *TestUnmanagedMiner) SnapDeal(sectorNumber abi.SectorNumber) []abi.Piec var manifest []miner14.PieceActivationManifest for _, piece := range pieces { - manifest = append(manifest, miner14.PieceActivationManifest{ + pm := miner14.PieceActivationManifest{ CID: piece.PieceCID, Size: piece.Size, - }) + } + if tm.mockProofs { + pm.VerifiedAllocationKey = sm.Verified + } + manifest = append(manifest, pm) } head, err := tm.FullNode.ChainHead(tm.ctx) @@ -398,12 +483,35 @@ func (tm *TestUnmanagedMiner) SnapDeal(sectorNumber abi.SectorNumber) []abi.Piec req.NoError(err) req.True(r.Receipt.ExitCode.IsSuccess()) - si.pieces = pieces + si.pieces = manifest si.sealedCid = newSealedCid si.unsealedCid = newUnsealedCid tm.setCommittedSector(si) - return pieces + return pieces, r.TipSet +} + +func (tm *TestUnmanagedMiner) ExtendSectorExpiration(sectorNumber abi.SectorNumber, expiration abi.ChainEpoch) types.TipSetKey { + req := require.New(tm.t) + + sl, err := tm.FullNode.StateSectorPartition(tm.ctx, tm.ActorAddr, sectorNumber, types.EmptyTSK) + req.NoError(err) + + params := &miner14.ExtendSectorExpiration2Params{ + Extensions: []miner14.ExpirationExtension2{ + { + Deadline: sl.Deadline, + Partition: sl.Partition, + Sectors: bitfield.NewFromSet([]uint64{uint64(sectorNumber)}), + NewExpiration: expiration, + }, + }, + } + r, err := tm.SubmitMessage(params, 1, builtin.MethodsMiner.ExtendSectorExpiration2) + req.NoError(err) + req.True(r.Receipt.ExitCode.IsSuccess()) + + return r.TipSet } func (tm *TestUnmanagedMiner) log(msg string, args ...interface{}) { @@ -487,9 +595,9 @@ func (tm *TestUnmanagedMiner) mkAndSavePiecesToOnboard(sector sectorInfo) (secto } // Create a struct for the piece info - sector.pieces = []abi.PieceInfo{{ - Size: paddedPieceSize, - PieceCID: pieceCIDA, + sector.pieces = []miner14.PieceActivationManifest{{ + Size: paddedPieceSize, + CID: pieceCIDA, }} // Create a temporary file for the sealed sector @@ -654,8 +762,10 @@ func (tm *TestUnmanagedMiner) preCommitSectors( unsealedCid := sector.unsealedCid uc = &unsealedCid } + head, err := tm.FullNode.ChainHead(tm.ctx) + require.NoError(tm.t, err) spci := []miner14.SectorPreCommitInfo{{ - Expiration: 2880 * 300, + Expiration: head.Height() + (30*builtin.EpochsInDay + 10 /* pre_commit_challenge_delay - short */) + sector.duration, SectorNumber: sector.sectorNumber, SealProof: proofType, SealedCID: sealedCid, @@ -679,7 +789,7 @@ func (tm *TestUnmanagedMiner) submitProveCommit( sectors []sectorInfo, requireActivationSuccess bool, modifyNIActivationsBeforeSubmit func([]miner14.SectorNIActivationInfo) []miner14.SectorNIActivationInfo, -) []exitcode.ExitCode { +) ([]exitcode.ExitCode, types.TipSetKey) { req := require.New(tm.t) @@ -702,6 +812,9 @@ func (tm *TestUnmanagedMiner) submitProveCommit( req.NoError(err) actorId := abi.ActorID(actorIdNum) + head, err := tm.FullNode.ChainHead(tm.ctx) + req.NoError(err) + infos := make([]proof.AggregateSealVerifyInfo, len(sectors)) activations := make([]miner14.SectorNIActivationInfo, len(sectors)) for i, sector := range sectors { @@ -721,7 +834,7 @@ func (tm *TestUnmanagedMiner) submitProveCommit( SealedCID: sector.sealedCid, SectorNumber: sector.sectorNumber, SealRandEpoch: sector.sealRandomnessEpoch, - Expiration: 2880 * 300, + Expiration: head.Height() + sector.duration, } } @@ -767,13 +880,7 @@ func (tm *TestUnmanagedMiner) submitProveCommit( for i, sector := range sectors { activations[i] = miner14.SectorActivationManifest{SectorNumber: sector.sectorNumber} if len(sector.pieces) > 0 { - activations[i].Pieces = make([]miner14.PieceActivationManifest, len(sector.pieces)) - for j, piece := range sector.pieces { - activations[i].Pieces[j] = miner14.PieceActivationManifest{ - CID: piece.PieceCID, - Size: piece.Size, - } - } + activations[i].Pieces = sector.pieces } } @@ -819,7 +926,7 @@ func (tm *TestUnmanagedMiner) submitProveCommit( } } - return exitCodes + return exitCodes, msgReturn.TipSet } func (tm *TestUnmanagedMiner) wdPostLoop() { @@ -1229,8 +1336,12 @@ func (tm *TestUnmanagedMiner) waitPreCommitSealRandomness(proofType abi.Register func (tm *TestUnmanagedMiner) generatePreCommit(sector sectorInfo, sealRandEpoch abi.ChainEpoch) (sectorInfo, error) { if tm.mockProofs { sector.sealedCid = cid.MustParse("bagboea4b5abcatlxechwbp7kjpjguna6r6q7ejrhe6mdp3lf34pmswn27pkkiekz") - if len(sector.pieces) > 0 { - sector.unsealedCid = fixedPieceCid + switch len(sector.pieces) { + case 0: + case 1: + sector.unsealedCid = sector.pieces[0].CID + default: + require.FailNow(tm.t, "generatePreCommit: multiple pieces not supported") // yet } return sector, nil } @@ -1269,7 +1380,7 @@ func (tm *TestUnmanagedMiner) generatePreCommit(sector sectorInfo, sealRandEpoch sector.sectorNumber, actorId, sealTickets, - sector.pieces, + sector.piecesToPieceInfos(), ) if err != nil { return sectorInfo{}, fmt.Errorf("failed to run SealPreCommitPhase1 for sector %d: %w", sector.sectorNumber, err) @@ -1362,7 +1473,7 @@ func (tm *TestUnmanagedMiner) generateSectorProof(sector sectorInfo) ([]byte, er actorId, sector.sealTickets, interactiveRandomness, - sector.pieces, + sector.piecesToPieceInfos(), ) if err != nil { return nil, fmt.Errorf("failed to run SealCommitPhase1 for sector %d: %w", sector.sectorNumber, err) @@ -1482,7 +1593,7 @@ func (tm *TestUnmanagedMiner) WaitTillActivatedAndAssertPower(sectors []abi.Sect // wait till sectors are activated for _, sectorNumber := range sectors { - tm.WaitTillPost(sectorNumber) + tm.WaitTillPostCount(sectorNumber, 1) if !tm.mockProofs { // else it would pass, which we don't want // if the sector is in the current or previous deadline, we can't dispute the PoSt @@ -1512,24 +1623,36 @@ func (tm *TestUnmanagedMiner) AssertNoWindowPostError() { } } -func (tm *TestUnmanagedMiner) WaitTillPost(sectorNumber abi.SectorNumber) { +func (tm *TestUnmanagedMiner) GetPostCount(sectorNumber abi.SectorNumber) int { + return tm.GetPostCountSince(0, sectorNumber) +} + +func (tm *TestUnmanagedMiner) GetPostCountSince(epoch abi.ChainEpoch, sectorNumber abi.SectorNumber) int { + tm.postsLk.Lock() + defer tm.postsLk.Unlock() + + var postCount int + for _, post := range tm.posts { + require.NoError(tm.t, post.Error, "expected no error in window post but found one at epoch %d", post.Epoch) + if post.Error == nil { + for _, sn := range post.Posted { + if post.Epoch >= epoch && sn == sectorNumber { + postCount++ + } + } + } + } + return postCount +} + +func (tm *TestUnmanagedMiner) WaitTillPostCount(sectorNumber abi.SectorNumber, count int) { for i := 0; tm.ctx.Err() == nil; i++ { if i%10 == 0 { tm.log("Waiting for sector %d to be posted", sectorNumber) } - tm.postsLk.Lock() - for _, post := range tm.posts { - require.NoError(tm.t, post.Error, "expected no error in window post but found one at epoch %d", post.Epoch) - if post.Error == nil { - for _, sn := range post.Posted { - if sn == sectorNumber { - tm.postsLk.Unlock() - return - } - } - } + if tm.GetPostCount(sectorNumber) >= count { + return } - tm.postsLk.Unlock() select { case <-tm.ctx.Done(): return diff --git a/itests/manual_onboarding_test.go b/itests/manual_onboarding_test.go index c03ddd9b1d7..bc4771ff407 100644 --- a/itests/manual_onboarding_test.go +++ b/itests/manual_onboarding_test.go @@ -87,7 +87,7 @@ func TestManualSectorOnboarding(t *testing.T) { minerC.AssertNoPower() // ---- Miner B onboards a CC sector - bSectors := minerB.OnboardSectors(sealProofType, false, 1) + bSectors, _ := minerB.OnboardSectors(sealProofType, kit.NewSectorBatch().AddEmptySectors(1)) req.Len(bSectors, 1) // Miner B should still not have power as power can only be gained after sector is activated i.e. the first WindowPost is submitted for it minerB.AssertNoPower() @@ -95,7 +95,7 @@ func TestManualSectorOnboarding(t *testing.T) { blockMiner.WatchMinerForPost(minerB.ActorAddr) // --- Miner C onboards sector with data/pieces - cSectors := minerC.OnboardSectors(sealProofType, true, 1) + cSectors, _ := minerC.OnboardSectors(sealProofType, kit.NewSectorBatch().AddSectorsWithRandomPieces(1)) // Miner C should still not have power as power can only be gained after sector is activated i.e. the first WindowPost is submitted for it minerC.AssertNoPower() // Ensure that the block miner checks for and waits for posts during the appropriate proving window from our new miner with a sector @@ -106,7 +106,7 @@ func TestManualSectorOnboarding(t *testing.T) { minerC.WaitTillActivatedAndAssertPower(cSectors, uint64(defaultSectorSize), uint64(defaultSectorSize)) // Miner B has activated the CC sector -> upgrade it with snapdeals - _ = minerB.SnapDeal(bSectors[0]) + _, _ = minerB.SnapDeal(bSectors[0], kit.SectorManifest{Piece: kit.BogusPieceCid2}) }) } } diff --git a/itests/niporep_manual_test.go b/itests/niporep_manual_test.go index a2fa949082a..ac65876da58 100644 --- a/itests/niporep_manual_test.go +++ b/itests/niporep_manual_test.go @@ -274,10 +274,9 @@ func TestManualNISectorOnboarding(t *testing.T) { req.NoError(err) // Onboard CC sectors to this test miner using NI-PoRep - sectors[i] = miner.OnboardSectors( + sectors[i], _ = miner.OnboardSectors( sealProofType, - false, - len(tcMiner.sectorsToOnboard), + kit.NewSectorBatch().AddEmptySectors(len(tcMiner.sectorsToOnboard)), kit.WithExpectedExitCodes(tcMiner.sectorsToOnboard), kit.WithRequireActivationSuccess(tcMiner.allOrNothing), kit.WithModifyNIActivationsBeforeSubmit(func(activations []miner14.SectorNIActivationInfo) []miner14.SectorNIActivationInfo { @@ -337,7 +336,7 @@ func TestManualNISectorOnboarding(t *testing.T) { req.NoError(err) // Snap a deal into the first of the successfully onboarded CC sectors for this miner - snapPieces := miner.SnapDeal(sectors[i][0]) + snapPieces, _ := miner.SnapDeal(sectors[i][0], kit.SectorWithPiece(kit.BogusPieceCid2)) // Check "sector-updated" event happned after snap { @@ -390,7 +389,7 @@ func TestNISectorFailureCases(t *testing.T) { build.Clock.Sleep(time.Second) // We have to onboard a sector first to get the miner enrolled in cron; although we don't need to wait for it to prove - _ = miner.OnboardSectors(sealProofType, false, 1) + _, _ = miner.OnboardSectors(sealProofType, kit.NewSectorBatch().AddEmptySectors(1)) // Utility functions and variables for our failure cases @@ -482,7 +481,7 @@ func TestNISectorFailureCases(t *testing.T) { t.Run("bad SealedCID", func(t *testing.T) { params := mkParams() - params.Sectors[1].SealedCID = cid.MustParse("baga6ea4seaqjtovkwk4myyzj56eztkh5pzsk5upksan6f5outesy62bsvl4dsha") + params.Sectors[1].SealedCID = kit.BogusPieceCid1 submitAndFail(¶ms, "invalid NI commit 1 while requiring activation success", 16) }) diff --git a/itests/splitstore_test.go b/itests/splitstore_test.go index 677ea9de078..caa013be36d 100644 --- a/itests/splitstore_test.go +++ b/itests/splitstore_test.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" + miner16 "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/go-state-types/exitcode" miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner" power6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/power" @@ -447,7 +447,7 @@ func (g *Garbager) mInfoCid(ctx context.Context) cid.Cid { require.NoError(g.t, err) raw, err := g.node.ChainReadObj(ctx, act.Head) require.NoError(g.t, err) - var mSt miner8.State + var mSt miner16.State require.NoError(g.t, mSt.UnmarshalCBOR(bytes.NewReader(raw))) // return infoCid diff --git a/node/impl/full/state.go b/node/impl/full/state.go index 23788c4bd02..f3f0df63d2a 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -240,10 +240,15 @@ func (a *StateAPI) StateMinerDeadlines(ctx context.Context, m address.Address, t if err != nil { return err } + dailyFee, err := dl.DailyFee() + if err != nil { + return err + } out[i] = api.Deadline{ PostSubmissions: ps, DisputableProofCount: l, + DailyFee: dailyFee, } return nil }); err != nil { @@ -2088,6 +2093,7 @@ func (a *StateAPI) StateGetNetworkParams(ctx context.Context) (*api.NetworkParam UpgradeWaffleHeight: buildconstants.UpgradeWaffleHeight, UpgradeTuktukHeight: buildconstants.UpgradeTuktukHeight, UpgradeTeepHeight: buildconstants.UpgradeTeepHeight, + UpgradeTockHeight: buildconstants.UpgradeTockHeight, }, }, nil } diff --git a/storage/pipeline/commit_batch.go b/storage/pipeline/commit_batch.go index cf3d2e8e57a..32ef796976c 100644 --- a/storage/pipeline/commit_batch.go +++ b/storage/pipeline/commit_batch.go @@ -14,7 +14,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/go-state-types/proof" diff --git a/storage/pipeline/currentdealinfo.go b/storage/pipeline/currentdealinfo.go index cd3aa47be27..e4e95164fc8 100644 --- a/storage/pipeline/currentdealinfo.go +++ b/storage/pipeline/currentdealinfo.go @@ -10,7 +10,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/network" diff --git a/storage/pipeline/currentdealinfo_test.go b/storage/pipeline/currentdealinfo_test.go index 1ea05dc35ef..ae176fef93f 100644 --- a/storage/pipeline/currentdealinfo_test.go +++ b/storage/pipeline/currentdealinfo_test.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-state-types/abi" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/network" diff --git a/storage/pipeline/mocks/mocks.go b/storage/pipeline/mocks/mocks.go index e1d7f8d6e87..ad46d9de8ac 100644 --- a/storage/pipeline/mocks/mocks.go +++ b/storage/pipeline/mocks/mocks.go @@ -16,15 +16,14 @@ import ( bitfield "github.com/filecoin-project/go-bitfield" abi "github.com/filecoin-project/go-state-types/abi" big "github.com/filecoin-project/go-state-types/big" - miner "github.com/filecoin-project/go-state-types/builtin/v13/miner" - miner0 "github.com/filecoin-project/go-state-types/builtin/v9/miner" - verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + miner "github.com/filecoin-project/go-state-types/builtin/v16/miner" + verifreg "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" crypto "github.com/filecoin-project/go-state-types/crypto" dline "github.com/filecoin-project/go-state-types/dline" network "github.com/filecoin-project/go-state-types/network" api "github.com/filecoin-project/lotus/api" - miner1 "github.com/filecoin-project/lotus/chain/actors/builtin/miner" + miner0 "github.com/filecoin-project/lotus/chain/actors/builtin/miner" types "github.com/filecoin-project/lotus/chain/types" ) @@ -202,10 +201,10 @@ func (mr *MockCommitBatcherApiMockRecorder) StateNetworkVersion(arg0, arg1 inter } // StateSectorPreCommitInfo mocks base method. -func (m *MockCommitBatcherApi) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorPreCommitOnChainInfo, error) { +func (m *MockCommitBatcherApi) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*miner0.SectorPreCommitOnChainInfo) + ret0, _ := ret[0].(*miner.SectorPreCommitOnChainInfo) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -802,7 +801,7 @@ func (mr *MockSealingAPIMockRecorder) StateMinerPartitions(arg0, arg1, arg2, arg } // StateMinerPreCommitDepositForPower mocks base method. -func (m *MockSealingAPI) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { +func (m *MockSealingAPI) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(big.Int) @@ -892,10 +891,10 @@ func (mr *MockSealingAPIMockRecorder) StateSectorGetInfo(arg0, arg1, arg2, arg3 } // StateSectorPartition mocks base method. -func (m *MockSealingAPI) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorLocation, error) { +func (m *MockSealingAPI) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorLocation, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*miner1.SectorLocation) + ret0, _ := ret[0].(*miner0.SectorLocation) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -907,10 +906,10 @@ func (mr *MockSealingAPIMockRecorder) StateSectorPartition(arg0, arg1, arg2, arg } // StateSectorPreCommitInfo mocks base method. -func (m *MockSealingAPI) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorPreCommitOnChainInfo, error) { +func (m *MockSealingAPI) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(*miner0.SectorPreCommitOnChainInfo) + ret0, _ := ret[0].(*miner.SectorPreCommitOnChainInfo) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/storage/pipeline/piece/cbor_gen.go b/storage/pipeline/piece/cbor_gen.go index db8e64fa0b9..2d082deef04 100644 --- a/storage/pipeline/piece/cbor_gen.go +++ b/storage/pipeline/piece/cbor_gen.go @@ -13,8 +13,8 @@ import ( xerrors "golang.org/x/xerrors" abi "github.com/filecoin-project/go-state-types/abi" - miner "github.com/filecoin-project/go-state-types/builtin/v13/miner" - market "github.com/filecoin-project/go-state-types/builtin/v9/market" + market "github.com/filecoin-project/go-state-types/builtin/v16/market" + miner "github.com/filecoin-project/go-state-types/builtin/v16/miner" ) var _ = xerrors.Errorf diff --git a/storage/pipeline/precommit_batch.go b/storage/pipeline/precommit_batch.go index 492f3ffdd77..a1ce012d1b3 100644 --- a/storage/pipeline/precommit_batch.go +++ b/storage/pipeline/precommit_batch.go @@ -13,7 +13,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/lotus/api" diff --git a/storage/pipeline/sealing.go b/storage/pipeline/sealing.go index 3c6b1be55a6..0d505bda744 100644 --- a/storage/pipeline/sealing.go +++ b/storage/pipeline/sealing.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" - verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/network" diff --git a/storage/pipeline/states_sealing.go b/storage/pipeline/states_sealing.go index a7b894035b7..2af17f4c9a5 100644 --- a/storage/pipeline/states_sealing.go +++ b/storage/pipeline/states_sealing.go @@ -18,9 +18,9 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" - miner2 "github.com/filecoin-project/go-state-types/builtin/v13/miner" - verifreg13 "github.com/filecoin-project/go-state-types/builtin/v13/verifreg" - "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + minertypes "github.com/filecoin-project/go-state-types/builtin/v16/miner" + "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v16/verifreg" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/network" @@ -736,11 +736,11 @@ func (m *Sealing) processPieces(ctx context.Context, sector SectorInfo) ([]miner return nil, xerrors.Errorf("getting client address for deal %d: %w", info.Impl().DealID, err) } - var vac *miner2.VerifiedAllocationKey + var vac *minertypes.VerifiedAllocationKey if alloc != verifreg.NoAllocationID { - vac = &miner2.VerifiedAllocationKey{ + vac = &minertypes.VerifiedAllocationKey{ Client: abi.ActorID(clientId), - ID: verifreg13.AllocationId(alloc), + ID: verifregtypes.AllocationId(alloc), } } @@ -753,7 +753,7 @@ func (m *Sealing) processPieces(ctx context.Context, sector SectorInfo) ([]miner CID: piece.Piece().PieceCID, Size: piece.Piece().Size, VerifiedAllocationKey: vac, - Notify: []miner2.DataActivationNotification{ + Notify: []minertypes.DataActivationNotification{ { Address: market.Address, Payload: payload, @@ -791,7 +791,7 @@ func (m *Sealing) handleSubmitCommitAggregate(ctx statemachine.Context, sector S Proof: sector.Proof, Spt: sector.SectorType, - ActivationManifest: miner2.SectorActivationManifest{ + ActivationManifest: minertypes.SectorActivationManifest{ SectorNumber: sector.SectorNumber, Pieces: pams, }, diff --git a/storage/pipeline/types_test.go b/storage/pipeline/types_test.go index d92b68d5597..c9ff3f167dd 100644 --- a/storage/pipeline/types_test.go +++ b/storage/pipeline/types_test.go @@ -9,7 +9,7 @@ import ( cborutil "github.com/filecoin-project/go-cbor-util" "github.com/filecoin-project/go-state-types/abi" - markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + markettypes "github.com/filecoin-project/go-state-types/builtin/v16/market" tutils "github.com/filecoin-project/specs-actors/v2/support/testing" "github.com/filecoin-project/lotus/api" diff --git a/storage/sealer/mock/util.go b/storage/sealer/mock/util.go index bedddb91278..1125ad7a7d5 100644 --- a/storage/sealer/mock/util.go +++ b/storage/sealer/mock/util.go @@ -13,7 +13,7 @@ import ( commcid "github.com/filecoin-project/go-fil-commcid" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/go-state-types/builtin/v9/market" + "github.com/filecoin-project/go-state-types/builtin/v16/market" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet/key" diff --git a/storage/wdpost/wdpost_changehandler_test.go b/storage/wdpost/wdpost_changehandler_test.go index 1f4c49b0f3f..4148d60be73 100644 --- a/storage/wdpost/wdpost_changehandler_test.go +++ b/storage/wdpost/wdpost_changehandler_test.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" tutils "github.com/filecoin-project/specs-actors/support/testing" diff --git a/storage/wdpost/wdpost_run_test.go b/storage/wdpost/wdpost_run_test.go index e8f71446beb..0d826555653 100644 --- a/storage/wdpost/wdpost_run_test.go +++ b/storage/wdpost/wdpost_run_test.go @@ -15,7 +15,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v16/miner" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/manifest"