Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Comment thread
rjan90 marked this conversation as resolved.
Comment thread
rjan90 marked this conversation as resolved.
Comment thread
rjan90 marked this conversation as resolved.
Comment thread
rjan90 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ For certain node operators, such as full archival nodes or systems that need to
- Removed `--only-cc` from `spcli sectors extend` command
- Change circulating supply calculation for calibnet, butterflynet and 2k for nv25 upgrade; see ([filecoin-project/lotus#12938](https://github.com/filecoin-project/lotus/pull/12938)) for more information.
- feat(miner): remove batch balancer-related functionality ([filecoin-project/lotus#12919](https://github.com/filecoin-project/lotus/pull/12919))
- feat(market): expose access to ProviderSectors on the market actor abstraction ([filecoin-project/lotus#12978](https://github.com/filecoin-project/lotus/pull/12978))

## Improvements
- refactor(eth): attach ToFilecoinMessage converter to EthCall ([filecoin-project/lotus#12844](https://github.com/filecoin-project/lotus/pull/12844))
Expand All @@ -76,6 +77,7 @@ For certain node operators, such as full archival nodes or systems that need to
- 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)).
- chore: switch to pure-go zstd decoder for snapshot imports. ([filecoin-project/lotus#12857](https://github.com/filecoin-project/lotus/pull/12857))
- 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))
- chore(eth): make `EthGetBlockByNumber` & `EthGetBlockByHash` share the same cache and be impacted by `EthBlkCacheSize` config settings ([filecoin-project/lotus#12979](https://github.com/filecoin-project/lotus/pull/12979))

## Bug Fixes
- fix(eth): minor improvements to event range checking ([filecoin-project/lotus#12867](https://github.com/filecoin-project/lotus/pull/12867))
Expand Down
Binary file modified build/actors/v16.tar.zst
Binary file not shown.
4 changes: 2 additions & 2 deletions build/buildconstants/params_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ var UpgradeTuktukHeight abi.ChainEpoch = 4461240
// Tuktuk migration. along with a RampStartEpoch matching the upgrade height.
var UpgradeTuktukPowerRampDurationEpochs = uint64(builtin.EpochsInYear)

// ??????
var UpgradeTeepHeight = abi.ChainEpoch(9999999999)
// 2025-04-10T23:00:00Z
var UpgradeTeepHeight = abi.ChainEpoch(4867320)

// 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.
Expand Down
14 changes: 7 additions & 7 deletions build/builtin_actors_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{
}, {
Network: "butterflynet",
Version: 16,
BundleGitTag: "v16.0.0-rc3",
BundleGitTag: "v16.0.0",
ManifestCid: cid.MustParse("bafy2bzacedn2h6huw7v2elmmdmpv4phdv4wjwgct7kcrrtdgz7jkjdm6uwa6k"),
Actors: map[string]cid.Cid{
"account": cid.MustParse("bafk2bzacebtd4bl5htqzhnueqwchxjocw35bjfk4u34h33tkhl7l3ll7jjzp6"),
Expand Down Expand Up @@ -387,7 +387,7 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{
}, {
Network: "calibrationnet",
Version: 16,
BundleGitTag: "v16.0.0-rc3",
BundleGitTag: "v16.0.0",
ManifestCid: cid.MustParse("bafy2bzacebc7zpsrihpyd2jdcvmegbbk6yhzkifre3hxtoul5wdxxklbwitry"),
Actors: map[string]cid.Cid{
"account": cid.MustParse("bafk2bzaced4jhgt6peqc3m2lrclj347kjhwt3wjsdxrbt336m5kxcrkyyfg4o"),
Expand Down Expand Up @@ -594,7 +594,7 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{
}, {
Network: "caterpillarnet",
Version: 16,
BundleGitTag: "v16.0.0-rc3",
BundleGitTag: "v16.0.0",
ManifestCid: cid.MustParse("bafy2bzacea6y67oqqokphvqdf4rruflrwzxyuquq2fgb34zjnh67nsk53is6k"),
Actors: map[string]cid.Cid{
"account": cid.MustParse("bafk2bzaceb22mvrw4jzf2c4cypor3nbaap2lzkhpim6ny7rhd5pysazcpwet4"),
Expand Down Expand Up @@ -792,7 +792,7 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{
}, {
Network: "devnet",
Version: 16,
BundleGitTag: "v16.0.0-rc3",
BundleGitTag: "v16.0.0",
ManifestCid: cid.MustParse("bafy2bzaceafzrqb6adck3o3mbyd33gtp2272f577hidqyo7cszg2ksn5sebh2"),
Actors: map[string]cid.Cid{
"account": cid.MustParse("bafk2bzacedqy7umr3bmmkrepi3ostdxrlxaln33wecqllsz5eqgdwzb2oqov2"),
Expand Down Expand Up @@ -1013,7 +1013,7 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{
}, {
Network: "mainnet",
Version: 16,
BundleGitTag: "v16.0.0-rc3",
BundleGitTag: "v16.0.0",
ManifestCid: cid.MustParse("bafy2bzaceaj3s3rrfbibikplap264uw74qor5yl35mqwokv4lwst4plpwry36"),
Actors: map[string]cid.Cid{
"account": cid.MustParse("bafk2bzacec5ozi2c34ekahcae7ddflen4drqlbvumxdmos4oemwejnd6fng7i"),
Expand Down Expand Up @@ -1211,7 +1211,7 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{
}, {
Network: "testing",
Version: 16,
BundleGitTag: "v16.0.0-rc3",
BundleGitTag: "v16.0.0",
ManifestCid: cid.MustParse("bafy2bzacea35za4a3ljlupfn2wxdzwz5py6vbu267s5p4p4uvdoqyhhggbbfq"),
Actors: map[string]cid.Cid{
"account": cid.MustParse("bafk2bzacedzuxjcmialu22l24x6z5x2j3lxsxxruxmhvhpkttkvlkrjulkbyq"),
Expand Down Expand Up @@ -1409,7 +1409,7 @@ var EmbeddedBuiltinActorsMetadata = []*BuiltinActorsMetadata{{
}, {
Network: "testing-fake-proofs",
Version: 16,
BundleGitTag: "v16.0.0-rc3",
BundleGitTag: "v16.0.0",
ManifestCid: cid.MustParse("bafy2bzacec4tth5r62ny75wt27tyzgzc4nc3zte6cxainlrxs54g7yvmlezs4"),
Actors: map[string]cid.Cid{
"account": cid.MustParse("bafk2bzacedzuxjcmialu22l24x6z5x2j3lxsxxruxmhvhpkttkvlkrjulkbyq"),
Expand Down
16 changes: 13 additions & 3 deletions chain/actors/builtin/market/actor.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ func MakeState(store adt.Store, av actorstypes.Version) (State, error) {
type State interface {
cbor.Marshaler

Code() cid.Cid
ActorKey() string
ActorVersion() actorstypes.Version
Code() cid.Cid
ActorKey() string
ActorVersion() actorstypes.Version

BalancesChanged(State) (bool, error)
EscrowTable() (BalanceTable, error)
Expand All @@ -95,6 +95,7 @@ type State interface {
NextID() (abi.DealID, error)
GetState() interface{}
GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error)
ProviderSectors() (ProviderSectors, error)
}

type BalanceTable interface {
Expand Down Expand Up @@ -155,6 +156,15 @@ type DealState interface {
Equals(other DealState) bool
}

type ProviderSectors interface {
Get(actorId abi.ActorID) (SectorDealIDs, bool, error)
}

type SectorDealIDs interface {
ForEach(cb func(abi.SectorNumber, []abi.DealID) error) error
Get(sectorNumber abi.SectorNumber) ([]abi.DealID, bool, error)
}

func DealStatesEqual(a, b DealState) bool {
if a.SectorNumber() != b.SectorNumber() {
return false
Expand Down
10 changes: 10 additions & 0 deletions chain/actors/builtin/market/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ type State interface {
NextID() (abi.DealID, error)
GetState() interface{}
GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error)
ProviderSectors() (ProviderSectors, error)
}

type BalanceTable interface {
Expand Down Expand Up @@ -283,6 +284,15 @@ type DealState interface {
Equals(other DealState) bool
}

type ProviderSectors interface {
Get(actorId abi.ActorID) (SectorDealIDs, bool, error)
}

type SectorDealIDs interface {
ForEach(cb func(abi.SectorNumber, []abi.DealID) error) error
Get(sectorNumber abi.SectorNumber) ([]abi.DealID, bool, error)
}

func DealStatesEqual(a, b DealState) bool {
if a.SectorNumber() != b.SectorNumber() {
return false
Expand Down
60 changes: 60 additions & 0 deletions chain/actors/builtin/market/state.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -460,3 +460,63 @@ func (s *state{{.v}}) Code() cid.Cid {

return code
}

func (s *state{{.v}}) ProviderSectors() (ProviderSectors, error) {
{{if lt .v 13}}
return nil, xerrors.Errorf("unsupported before actors v13")
{{else}}
proverSectors, err := adt{{.v}}.AsMap(s.store, s.State.ProviderSectors, builtin.DefaultHamtBitwidth)
if err != nil {
return nil, err
}
return &providerSectors{{.v}}{proverSectors, s.store}, nil
{{end}}
}

{{if ge .v 13}}
type providerSectors{{.v}} struct {
*adt{{.v}}.Map
adt{{.v}}.Store
}

type sectorDealIDs{{.v}} struct {
*adt{{.v}}.Map
}

func (s *providerSectors{{.v}}) Get(actorId abi.ActorID) (SectorDealIDs, bool, error) {
var sectorDealIdsCID cbg.CborCid
if ok, err := s.Map.Get(abi.UIntKey(uint64(actorId)), &sectorDealIdsCID); err != nil {
return nil, false, xerrors.Errorf("failed to load sector deal ids for actor %d: %w", actorId, err)
} else if !ok {
return nil, false, nil
}
sectorDealIds, err := adt{{.v}}.AsMap(s.Store, cid.Cid(sectorDealIdsCID), builtin.DefaultHamtBitwidth)
if err != nil {
return nil, false, xerrors.Errorf("failed to load sector deal ids for actor %d: %w", actorId, err)
}
return &sectorDealIDs{{.v}}{sectorDealIds}, true, nil
}

func (s *sectorDealIDs{{.v}}) ForEach(cb func(abi.SectorNumber, []abi.DealID) error) error {
var dealIds abi.DealIDList
return s.Map.ForEach(&dealIds, func(key string) error {
uk, err := abi.ParseUIntKey(key)
if err != nil {
return xerrors.Errorf("failed to parse sector number from key %s: %w", key, err)
}
return cb(abi.SectorNumber(uk), dealIds)
})
}

func (s *sectorDealIDs{{.v}}) Get(sectorNumber abi.SectorNumber) ([]abi.DealID, bool, error) {
var dealIds abi.DealIDList
found, err := s.Map.Get(abi.UIntKey(uint64(sectorNumber)), &dealIds)
if err != nil {
return nil, false, xerrors.Errorf("failed to load sector deal ids for sector %d: %w", sectorNumber, err)
}
if !found {
return nil, false, nil
}
return dealIds, true, nil
}
{{end}}
6 changes: 6 additions & 0 deletions chain/actors/builtin/market/v0.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions chain/actors/builtin/market/v10.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions chain/actors/builtin/market/v11.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions chain/actors/builtin/market/v12.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions chain/actors/builtin/market/v13.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions chain/actors/builtin/market/v14.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading