Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: chain: use latest go-state-types types for miner UI #11566

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

arajasek
Copy link
Contributor

Related Issues

@jimpick pointed out that the SectorOnChainInfo returned over the API has the wrong field names.

Proposed Changes

Use {{.latestVersion}} types which will keep us up to date.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@@ -5875,12 +5875,12 @@ Response:
"InitialPledge": "0",
"ExpectedDayReward": "0",
"ExpectedStoragePledge": "0",
"ReplacedSectorAge": 10101,
"PowerBaseEpoch": 10101,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not going to be an issue for API stability? And/or historical state?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm honestly not sure? But it is a breaking change that we've had in the protocol itself, so I feel like the API needs to break too here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it does need to change. I guess: do it and see if anyone cares?

@arajasek arajasek force-pushed the asr/update-miner-gst branch from 0516e71 to 5746c48 Compare January 11, 2024 14:39
@arajasek arajasek force-pushed the asr/update-miner-gst branch from 5746c48 to c86f5a1 Compare January 11, 2024 15:37
@jimpick
Copy link
Contributor

jimpick commented Jan 17, 2024

The PowerBaseEpoch and ReplacedDayReward fields weren't being populated, so here's a PR for that:

#11586

@arajasek arajasek merged commit 8f73f15 into master Jan 22, 2024
88 checks passed
@arajasek arajasek deleted the asr/update-miner-gst branch January 22, 2024 19:39
jimpick pushed a commit to glifio/go-pools that referenced this pull request Jan 23, 2024
Requires Lotus build on master branch with this PR:

* filecoin-project/lotus#11566
Schwartz10 added a commit to glifio/go-pools that referenced this pull request Jan 24, 2024
* Clean up types, delete unused code

* More type cleanup

* Fetch MinerInfo directly from state, not api

* Return Vesting and pledged bal in PreviewTerminateSectorsReturn

* Cleanup agent liquidation summary method

* Add helper methods to the PreviewAgentTerminationSummary struct

* Move test helpers to utils package

* Add tests

* Add Agent Liquid balance for ADO integration

* Delete max withdraw query

* Update mocks

* Fix max borrow helpers

Fix tests and tweak rr calc

* Polish

* Use new liquidation value in econ.ComputeAgentData

* Prepare for set-recovered handling of faulty agents

* Prepare for set-recovered with agents with bad LV's

* Update types

* Remove incomplete test

* Fix AgentMaxBorrow

* Add AgentCollateralStatsQuick method

* Update types

* Improve naming, add Summarize fn

* Add LTV helper to PreviewATS struct

* Updated off-chain termination calculation for network v12

Requires Lotus build on master branch with this PR:

* filecoin-project/lotus#11566

* Use StateCall instead of StateCompute for on-chain terminations

* Check early terminations in state for on-chain

* Remove debug code

* Update go sum

* Change ComputeAgentData func sig

* Add econ package tests

* Remove old unused code

* Update naming

* Update use of WAD math

---------

Co-authored-by: Jim Pick <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants