diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fa4de71bda..47ecf7d0768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ## Bug Fixes - Fix a bug in the `lotus-shed indexes backfill-events` command that may result in either duplicate events being backfilled where there are existing events (such an operation *should* be idempotent) or events erroneously having duplicate `logIndex` values when queried via ETH APIs. ([filecoin-project/lotus#12567](https://github.com/filecoin-project/lotus/pull/12567)) - Event APIs (Eth events and actor events) should only return reverted events if client queries by specific block hash / tipset. Eth and actor event subscription APIs should always return reverted events to enable accurate observation of real-time changes. ([filecoin-project/lotus#12585](https://github.com/filecoin-project/lotus/pull/12585)) +- Add logic to check if the miner's owner address is delegated (f4 address). If it is delegated, the `lotus-shed sectors termination-estimate` command now sends the termination state call using the worker ID. This fix resolves the issue where termination-estimate did not function correctly for miners with delegated owner addresses. ([filecoin-project/lotus#12569](https://github.com/filecoin-project/lotus/pull/12569)) ## Improvements diff --git a/cmd/lotus-shed/sectors.go b/cmd/lotus-shed/sectors.go index 6ca214cd2dc..fd49fbe35c4 100644 --- a/cmd/lotus-shed/sectors.go +++ b/cmd/lotus-shed/sectors.go @@ -124,6 +124,18 @@ var terminateSectorPenaltyEstimationCmd = &cli.Command{ return err } + ownerAddr, err := nodeApi.StateAccountKey(ctx, mi.Owner, types.EmptyTSK) + if err != nil { + ownerAddr = mi.Owner + } + + var fromAddr address.Address + if ownerAddr.Protocol() == address.Delegated { + fromAddr = mi.Worker + } else { + fromAddr = mi.Owner + } + terminationDeclarationParams := []miner2.TerminationDeclaration{} for _, sn := range cctx.Args().Slice() { @@ -159,7 +171,7 @@ var terminateSectorPenaltyEstimationCmd = &cli.Command{ } msg := &types.Message{ - From: mi.Owner, + From: fromAddr, To: maddr, Method: builtin.MethodsMiner.TerminateSectors,