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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- chore: return `method not supported` via Gateway when /v2 isn't supported by the backend ([filecoin-project/lotus#13121](https://github.com/filecoin-project/lotus/pull/13121))
- chore: disable F3 participation via gateway ([filecoin-project/lotus#13123](https://github.com/filecoin-project/lotus/pull/13123)
- chore: increase the F3 GMessage buffer size to 1024 ([filecoin-project/lotus#13126](https://github.com/filecoin-project/lotus/pull/13126))
- feat(f3): integrate cached MapReduce from go-hamt-ipld, which improves performance of F3 power table calculation by 6-10x ([filecoin-project/lotus#13134](https://github.com/filecoin-project/lotus/pull/13134))

# Node v1.33.0 / 2025-05-08
The Lotus v1.33.0 release introduces experimental v2 APIs with F3 awareness, featuring a new TipSet selection mechanism that significantly enhances how applications interact with the Filecoin blockchain. This release candidate also adds F3-aware Ethereum APIs via the /v2 endpoint. All of the /v2 APIs implement intelligent fallback mechanisms between F3 and Expected Consensus and are exposed through the Lotus Gateway.
Expand All @@ -30,7 +31,7 @@ The Lotus V2 APIs introduce a powerful new TipSet selection mechanism that signi
> [!NOTE]
> V2 APIs are highly experimental and subject to change without notice.

See [Filecoin v2 APIs docs](https://filoznotebook.notion.site/Filecoin-V2-APIs-1d0dc41950c1808b914de5966d501658) for an in-depth overview. /v2 APIs are exposed through Lotus Gateway.
See [Filecoin v2 APIs docs](https://filoznotebook.notion.site/Filecoin-V2-APIs-1d0dc41950c1808b914de5966d501658) for an in-depth overview. /v2 APIs are exposed through Lotus Gateway.

This work was primarily done in ([filecoin-project/lotus#13003](https://github.com/filecoin-project/lotus/pull/13003)), ([filecoin-project/lotus#13027](https://github.com/filecoin-project/lotus/pull/13027)), ([filecoin-project/lotus#13034](https://github.com/filecoin-project/lotus/pull/13034)), ([filecoin-project/lotus#13075](https://github.com/filecoin-project/lotus/pull/13075)), ([filecoin-project/lotus#13066](https://github.com/filecoin-project/lotus/pull/13066))

Expand Down
1 change: 1 addition & 0 deletions chain/actors/builtin/power/actor.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ type State interface {
// before returning the actor.
ForEachClaim(cb func(miner address.Address, claim Claim) error, onlyEligible bool) error
ClaimsChanged(State) (bool, error)
CollectEligibleClaims(cacheInOut *builtin{{.latestVersion}}.MapReduceCache) ([]builtin{{.latestVersion}}.OwnedClaim, error)

// Testing or genesis setup only
SetTotalQualityAdjPower(abi.StoragePower) error
Expand Down
1 change: 1 addition & 0 deletions chain/actors/builtin/power/power.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ type State interface {
// before returning the actor.
ForEachClaim(cb func(miner address.Address, claim Claim) error, onlyEligible bool) error
ClaimsChanged(State) (bool, error)
CollectEligibleClaims(cacheInOut *builtin16.MapReduceCache) ([]builtin16.OwnedClaim, error)

// Testing or genesis setup only
SetTotalQualityAdjPower(abi.StoragePower) error
Expand Down
22 changes: 22 additions & 0 deletions chain/actors/builtin/power/state.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
power{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}power"
adt{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}util/adt"
{{end}}
builtin{{.latestVersion}} "github.com/filecoin-project/go-state-types/builtin"
)

var _ State = (*state{{.v}})(nil)
Expand Down Expand Up @@ -147,6 +148,27 @@ func (s *state{{.v}}) ListAllMiners() ([]address.Address, error) {
return miners, nil
}

func (s *state{{.v}}) CollectEligibleClaims(cacheInOut *builtin{{.latestVersion}}.MapReduceCache) ([]builtin{{.latestVersion}}.OwnedClaim, error) {
{{if (ge .v 16)}}
return s.State.CollectEligibleClaims(s.store, cacheInOut)
{{else}}
var res []builtin{{.latestVersion}}.OwnedClaim
err := s.ForEachClaim(func(miner address.Address, claim Claim) error {
res = append(res, builtin{{.latestVersion}}.OwnedClaim{
Address: miner,
RawBytePower: claim.RawBytePower,
QualityAdjPower: claim.QualityAdjPower,
})
return nil
}, true)
if err != nil {
return nil, fmt.Errorf("collecting claims: %w", err)
}
return res, nil
{{end}}
}


func (s *state{{.v}}) ForEachClaim(cb func(miner address.Address, claim Claim) error, onlyEligible bool) error {
claims, err := s.claims()
if err != nil {
Expand Down
19 changes: 19 additions & 0 deletions chain/actors/builtin/power/v0.go

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

19 changes: 19 additions & 0 deletions chain/actors/builtin/power/v10.go

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

19 changes: 19 additions & 0 deletions chain/actors/builtin/power/v11.go

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

19 changes: 19 additions & 0 deletions chain/actors/builtin/power/v12.go

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

19 changes: 19 additions & 0 deletions chain/actors/builtin/power/v13.go

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

19 changes: 19 additions & 0 deletions chain/actors/builtin/power/v14.go

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

19 changes: 19 additions & 0 deletions chain/actors/builtin/power/v15.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/power/v16.go

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

19 changes: 19 additions & 0 deletions chain/actors/builtin/power/v2.go

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

19 changes: 19 additions & 0 deletions chain/actors/builtin/power/v3.go

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

Loading
Loading