You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(state): display DealIDs from market actor for sectors (#13140)
* fix(state): display DealIDs from market actor for sectors
The 'lotus state sector' command was showing empty DealIDs for sectors
that actually contain deals. This occurred because for actors v13+,
deal IDs are stored in the market actor's ProviderSectors HAMT, not
in the sector's DeprecatedDealIDs field.
This fix:
- Adds dual DealIDs display showing both deprecated and market sources
- Retrieves deal IDs from market actor's ProviderSectors HAMT for v13+
- Maintains backward compatibility with older network versions
- Provides clear labeling of data sources
- Handles errors gracefully with informative messages
Resolves issue where sectors containing deals incorrectly showed
'DealIDs: []' instead of the actual deal IDs.
Example output after fix:
DealIDs (deprecated): []
DealIDs (market): [84864966]
* refactor(state): break getMarketDealIDs into smaller helper functions
Improve code readability and maintainability by refactoring the
getMarketDealIDs function into three focused helper functions:
- getMinerActorID: Handles miner address to actor ID conversion
- loadMarketState: Manages market actor state loading
- extractSectorDealIDs: Extracts deal IDs from ProviderSectors HAMT
Each function now has a single responsibility, making the code
easier to understand, test, and maintain.
* docs: add changelog entry for DealIDs fix in lotus state sector command
* fix: address PR review feedback from rvagg
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
> *[CHANGELOG_1.2x.md](./documentation/changelog/CHANGELOG_1.2x.md) - v1.20.0 to v1.29.2
9
9
10
10
# UNRELEASED
11
+
- fix(cli): fix `lotus state sector` command to display DealIDs correctly post-FIP-0076 by querying market actor's ProviderSectors HAMT while maintaining backward compatibility with DeprecatedDealIDs field ([filecoin-project/lotus#13140](https://github.com/filecoin-project/lotus/pull/13140))
11
12
- chore(deps): bump filecoin-ffi for [email protected] which adds Logs and IpldOps to debug FVM execution traces ([filecoin-project/lotus#13029](https://github.com/filecoin-project/lotus/pull/13029))
12
13
- 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))
13
14
- chore: disable F3 participation via gateway ([filecoin-project/lotus#13123](https://github.com/filecoin-project/lotus/pull/13123)
0 commit comments