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 @@ -36,6 +36,7 @@
- fix(cli): make lotus-miner sectors extend command resilient to higher gas ([filecoin-project/lotus#11927](https://github.com/filecoin-project/lotus/pull/11928))
- feat(api): update go-f3 to 0.8.8, add F3GetPowerTableByInstance to the API ([filecoin-project/lotus#13201](https://github.com/filecoin-project/lotus/pull/13201))
- fix(cli): use F3GetPowerTableByInstance to resolve F3 power tables by default, `--by-tipset` flag can be used to restore old behavior ([filecoin-project/lotus#13201](https://github.com/filecoin-project/lotus/pull/13201))
- fix(cli): correctly construct the TerminateSectors params

# 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
20 changes: 14 additions & 6 deletions cli/spcli/sectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ type TerminatorNode interface {

func TerminateSectors(ctx context.Context, full TerminatorNode, maddr address.Address, sectorNumbers []int, fromAddr address.Address) (*types.SignedMessage, error) {

terminationDeclarationParams := []miner2.TerminationDeclaration{}
terminationMap := make(map[string]*miner2.TerminationDeclaration)

for _, sectorNum := range sectorNumbers {

Expand All @@ -1425,13 +1425,21 @@ func TerminateSectors(ctx context.Context, full TerminatorNode, maddr address.Ad
return nil, fmt.Errorf("get state sector partition %s", err)
}

para := miner2.TerminationDeclaration{
Deadline: loca.Deadline,
Partition: loca.Partition,
Sectors: sectorbit,
key := fmt.Sprintf("%d-%d", loca.Deadline, loca.Partition)
if td, exists := terminationMap[key]; exists {
td.Sectors.Set(uint64(sectorNum))
} else {
terminationMap[key] = &miner2.TerminationDeclaration{
Deadline: loca.Deadline,
Partition: loca.Partition,
Sectors: sectorbit,
}
}
}

terminationDeclarationParams = append(terminationDeclarationParams, para)
terminationDeclarationParams := make([]miner2.TerminationDeclaration, 0, len(terminationMap))
for _, td := range terminationMap {
terminationDeclarationParams = append(terminationDeclarationParams, *td)
}

terminateSectorParams := &miner2.TerminateSectorsParams{
Expand Down