pokt-network / pocket-core

Official implementation of the Pocket Network Protocol
http://www.pokt.network
MIT License
210 stars 103 forks source link

Allow an AppMsgStake tx to change the address of a staked app #1585

Closed msmania closed 9 months ago

msmania commented 11 months ago

The patch implements PIP-35, allowing the existing AppMsgStake transaction to change the address of a staked app. This enables us to transfer the existing app slot from one to a new account without unstaking. To make this operation easier, this patch also introduces a new command app transfer.

Description

Summary generated by Reviewpad on 15 Dec 23 11:53 UTC

This pull request includes changes in multiple files. Here is a summary of the changes:

  1. The file appStateChanges_test.go has changes related to application state changes and transfers. The changes include the addition of new import statements, test functions, and helper functions.

  2. The file types.go has changes related to the MsgStake type. The changes involve adding a new method IsValidTransfer to check for a special case in the MsgStake type where ownership transfer is being done.

  3. The file codec.go has changes related to the support of an "App Transfer" feature. The changes include adding a constant and a new function for checking if a certain upgrade has occurred.

  4. The file expectedKeepers.go has changes related to the addition of a new interface AppKeeper.

  5. The file keeper.go has changes that involve adding a new field to the Keeper struct.

  6. The file baseapp.go has changes that include formatting changes in the package comment and modifications in the DeliverTx function.

  7. The file app.go has changes related to the assignment of a field in the app.accountKeeper object.

  8. The file auth.go has changes that include adding comments and conditions for non-custodial and output address editor upgrades.

  9. The file common_test.go has changes that involve importing packages, renaming a package, and adding/modifying functions.

  10. The file appStateChanges.go has changes related to the validation and transfer functionality of applications.

  11. The file txUtil.go has changes that add a new function for transferring an application.

  12. The file app/cmd/cli/app.go has changes related to the addition of a new command for transferring the ownership of a staked app.

  13. The file keeper.go has changes that add a new method for checking if a message is for transferring ownership.

  14. The file handler.go has changes that include import statements, function parameter modifications, and logic for transferring application ownership.

These are the summaries of the changes in each file. Let me know if you have any specific questions or need further information regarding these changes.

POKT-Discourse commented 11 months ago

This pull request has been mentioned on Pocket Network Forum. There might be relevant details there:

https://forum.pokt.network/t/pip-35-introduce-a-secure-way-to-transfer-a-staked-app-to-a-new-account/4806/1

POKT-Discourse commented 10 months ago

This pull request has been mentioned on Pocket Network Forum. There might be relevant details there:

https://forum.pokt.network/t/era-cycle-report-cycle-2/4828/1

Olshansk commented 9 months ago

@msmania See the one linger comment I have here.


Also, I tried to do a Show changes since your last review (see screenshots below) but I'm guessing there was a rebase/force-push/etc done to the branch which prevents that from happening.

I'm travelling on a trip this weekend and will aim to take a second look at this mid next week.

Screenshot 2023-12-15 at 3 18 11 PM Screenshot 2023-12-15 at 3 19 06 PM
POKT-Discourse commented 8 months ago

This pull request has been mentioned on Pocket Network Forum. There might be relevant details there:

https://forum.pokt.network/t/rc-0-11-1-upgrade-and-hi/5012/1