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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- feat(gateway): add CORS headers if --cors is provided ([filecoin-project/lotus#13145](https://github.com/filecoin-project/lotus/pull/13145))
- feat(spcli): make settle-deal optionally take deal id ranges ([filecoin-project/lotus#13146](https://github.com/filecoin-project/lotus/pull/13146))
- fix(f3): properly wire up eth v2 APIs for f3 ([filecoin-project/lotus#13149](https://github.com/filecoin-project/lotus/pull/13149))
- `lotus state active-sectors` now outputs CSV format and supports an optional `--show-partitions` to list active sector deadlines and partitions. ([filecoin-project/lotus#13152](https://github.com/filecoin-project/lotus/pull/13152))

# 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 Down
23 changes: 22 additions & 1 deletion cli/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ var StateActiveSectorsCmd = &cli.Command{
Name: "active-sectors",
Usage: "Query the active sector set of a miner",
ArgsUsage: "[minerAddress]",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "show-partitions",
Usage: "show sector deadlines and partitions",
},
},
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
if err != nil {
Expand Down Expand Up @@ -329,8 +335,23 @@ var StateActiveSectorsCmd = &cli.Command{
return err
}

showPartitions := cctx.Bool("show-partitions")
header := "Sector Number, Sealed CID"
if showPartitions {
header = "Sector Number, Deadline, Partition, Sealed CID"
}
fmt.Println(header)

for _, s := range sectors {
fmt.Printf("%d: %s\n", s.SectorNumber, s.SealedCID)
if showPartitions {
sp, err := api.StateSectorPartition(ctx, maddr, s.SectorNumber, ts.Key())
if err != nil {
return err
}
fmt.Printf("%d, %d, %d, %s\n", s.SectorNumber, sp.Deadline, sp.Partition, s.SealedCID)
} else {
fmt.Printf("%d, %s\n", s.SectorNumber, s.SealedCID)
}
}

return nil
Expand Down
3 changes: 2 additions & 1 deletion documentation/en/cli-lotus.md

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

Loading