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

Allow multisigs to be set as miner owner address #5342

Merged
merged 3 commits into from
Jan 21, 2021
Merged

Conversation

arajasek
Copy link
Contributor

Fixes #5287

Motivation

Miners want to be able to set multisigs as their miner owner address. This currently fails if you use the set-owner command, because it assumes both the old and new owner address are accounts whose keys are in the Lotus wallet.

Changes

  • Breaks the assumption that both the old and new owner address are accounts whose keys are in the Lotus wallet by changing the set-owner command to
    • take the sender of the ChangeOwnerAddress message as a param
    • not send both ChangeOwnerAddress messages within a single execution.
  • Add a chain encode command as a util to encode params (does this not already exist somewhere? I couldn't find it?)
  • Minor bugfix to lotus msig approve that makes it unusable when all optional params are provided.

Usage

  • When the new owner is an account
    • Run lotus-miner actor set-owner --really-do-it <newOwner> <oldOwner>
    • Run lotus-miner actor set-owner --really-do-it <newOwner> <newOwner>. This command can be run from a different node or with a hardware wallet plugged in as needed.
  • When the new owner is a multisig
    • Run lotus-miner actor set-owner --really-do-it <newOwner> <oldOwner> (assuming the old owner is an account)
    • Run lotus chain encode params --encoding=hex <minerAddress> 23 \"<newOwnerIdAddress>\", where 23 is the method number for ChangeOwnerAddress.
    • Run lotus msig propose --from=<newOwnerSigner> <newOwner> <minerAddress> 0 23 <params>, where params is the encoding outputted in the previous step.
    • (if needed) Run lotus msig approve --from=<newOwnerSigner> <newOwner> <transactionId> <proposingSigner> <minerAddress> 0 23 <params>.

@arajasek arajasek merged commit 23ce064 into master Jan 21, 2021
@arajasek arajasek deleted the asr/change-owner branch January 21, 2021 02:30
bibibong pushed a commit to EpiK-Protocol/go-epik that referenced this pull request Feb 22, 2021
…ange-owner

Allow multisigs to be set as miner owner address
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.

Support multig wallet address as miner owner address
3 participants