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

feat: add API methods to get allocations and claims #9437

Merged
merged 1 commit into from Oct 12, 2022

Conversation

geoff-vball
Copy link
Contributor

Related Issues

Integrates filecoin-project/go-state-types#88 into lotus

Proposed Changes

Adds 3 new API methods:
Add StateGetAllocations to return a map of all allocations for a given client.
Add StateGetClaims to return a map of all claims for a given provider.
Add StateGetClaim to return a claim given a provider and ClaimId

Additional Info

Checklist

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

  • All commits have a clear commit message.
  • The 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, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@geoff-vball geoff-vball requested a review from a team as a code owner October 5, 2022 22:26
@geoff-vball
Copy link
Contributor Author

The API methods for StateGetClaim and StateGetAllocation aren't strictly necessary. We could always return the map and let the client access the ID they want themselves, but would be a fair bit less efficient.

@geoff-vball geoff-vball force-pushed the gstuart/integrate-verifreg-changes-fip45 branch from 2b740dd to b891472 Compare October 5, 2022 23:15
@jennijuju
Copy link
Member

@arajasek @geoff-vball can you help me understand why this got prioritized? i.e: does this make further changes easier later? I want to understand if this is needed for development, why we did not capture it in the initial issue creation.

@geoff-vball
Copy link
Contributor Author

@jennijuju StateGetAllocation was necessary for dealpacking (it's already included in the big PR). These were very quick and easy to add after that and allow us to test the new verifreg functionality if we want.

@jennijuju
Copy link
Member

nice!

@geoff-vball geoff-vball force-pushed the gstuart/integrate-verifreg-changes-fip45 branch from 8c8b860 to b5e9f27 Compare October 6, 2022 15:06
@geoff-vball geoff-vball force-pushed the gstuart/verifreg-accessors branch 2 times, most recently from 5de6f48 to 12c015e Compare October 6, 2022 15:18
Base automatically changed from gstuart/integrate-verifreg-changes-fip45 to release/v1.18.0 October 7, 2022 15:27
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.

None yet

3 participants