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

Remove the market actor state mutation pattern #656

Closed
anorth opened this issue Sep 15, 2022 · 0 comments · Fixed by #734
Closed

Remove the market actor state mutation pattern #656

anorth opened this issue Sep 15, 2022 · 0 comments · Fixed by #734
Labels
chore cleanup good first issue Good for newcomers help wanted Extra attention is needed

Comments

@anorth
Copy link
Member

anorth commented Sep 15, 2022

The storage market actor uses a different pattern for state mutation than all the other actors. The market state mutator adds a lot of noise and little safety, and introduces new classes of errors (e.g. mutations that are not committed due to incorrect "permissions").

Remove the pattern, and revert to simple access and mutation methods on the state object.

@anorth anorth added good first issue Good for newcomers help wanted Extra attention is needed cleanup chore labels Sep 15, 2022
@anorth anorth moved this to 📋 Backlog in Network v18 Nov 28, 2022
@anorth anorth moved this from 📋 Backlog to 🏗 In progress in Network v18 Nov 28, 2022
anorth pushed a commit that referenced this issue Dec 5, 2022
Repository owner moved this from 🏗 In progress to ✅ Done in Network v18 Dec 5, 2022
vyzo pushed a commit that referenced this issue Dec 7, 2022
* Remove the market actor state mutation pattern (#734)

Fixes #656

* Proof of concept exported API for Account actor (#797)

* Export stable methods for public access (#807)

* Export Datacap Actor methods

* Export Init Actor methods

* Export Market Actor methods

* Export Miner Actor methods

* Export Multisig Actor methods

* Export Verifreg Actor methods

* Address review

* Restrict internal APIs of all actors (#809)

* Exported API method for market actor escrow/locked balance (#812)

* Power actor: Add exported getters for raw power (#810)

* Power actor: Add exported getters for raw power

* FRC-XXXX is FRC-0042

* Power actor: network_raw_power: Return this_epoch_raw_byte_power

* Power actor: miner_raw_power: Return whether above consensus min power

* Power actor: types: serialize one-element structs transparently

* Address review

* Miner actor: Add exported getters for info and monies (#811)

* Miner actor: Add exported getters for info and monies

* Tweak comment

* Miner actor: Replace GetWorker and GetControls with IsControllingAddress

* Miner actor: Add exported GetAvailableBalance

* Miner actor: Add exported GetVestingFunds

* Miner actor: Remove exported monies getters

* Miner actor: types: serialize one-element structs transparently

* Address review

* Address review

* Built-in market API for deal proposal metadata (#818)

* Call exported authenticate method from PSD (#829)


Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>

* Drop CALLER_TYPES_SIGNABLE and signable caller validation (#821)

* Market actor: Minor improvements to two exported getters (#826)

* Market actor: GetDealTermExported: Return (start_epoch, duration)

* Market actor: Export getter for deal total price

* Exported API for market deal activation state (#819)

* Paych actor: Drop account req, use AuthenticateMessage to verify sigs (#824)

* Paych actor: Drop account req, use AuthenticateMessage to verify sigs

* Address review

* Address review

* Account actor: Deprecate AuthenticateMessage (#856)

* Market actor: Export PublishStorageDeals (#857)

* Miner: Export several more methods (#863)

* Miner: Export ChangeWorkerAddress

* Miner: Export ChangePeerID

* Miner: Export WithdrawBalance

* Miner: Export ChangeMultiaddrs

* Miner: Export ConfirmUpdateWorkerKey

* Miner: Export RepayDebt

* Miner: Export ChangeOwnerAddress

* Miner: Add exported getters for PeerID & multiaddrs

* Miner: Refactor: Rename ConfirmUpdateWorkerKey to ConfirmChangeWorkerAddress

* Power actor: Export methods to CreateMiner and get miner counts (#868)

* Power: Export CreateMiner

* Power Actor: Export MinerCount and MinerConsensusCount

* Update actors/power/src/lib.rs

Co-authored-by: Alex <445306+anorth@users.noreply.github.com>

Co-authored-by: Alex <445306+anorth@users.noreply.github.com>

* Verifreg: Export AddVerifiedClient and GetClaims (#873)

* Verifreg: Rename AddVerifierClientParams to AddVerifiedClientParams

* Verifreg: Export AddVerifiedClient and GetClaims

* Datacap actor: Modify exported methods (#909)

* Datacap: Export Mint and Destroy

* Datacap actor: Deprecate all internal methods

* Datacap actor: Rename BalanceOf to Balance

* Datacap actor: Add Granularity method

* fix: comments on newly exported methods (#910)

Co-authored-by: RK <r.raajey@gmail.com>
Co-authored-by: Alex <445306+anorth@users.noreply.github.com>
Co-authored-by: ZenGround0 <5515260+ZenGround0@users.noreply.github.com>
Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
shamb0 added a commit to shamb0/builtin-actors that referenced this issue Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore cleanup good first issue Good for newcomers help wanted Extra attention is needed
Projects
No open projects
Status: Done
1 participant