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

Support lotus-miner actor withdraw when owner address is a multisig #5647

Open
apengn opened this issue Feb 21, 2021 · 9 comments
Open

Support lotus-miner actor withdraw when owner address is a multisig #5647

apengn opened this issue Feb 21, 2021 · 9 comments

Comments

@apengn
Copy link

apengn commented Feb 21, 2021

Describe the bug
A clear and concise description of what the bug is.
To use a multi-signature wallet as the miner owner, use the command: lotus-miner actor control list | actor withdraw 0.001

To Reproduce
Steps to reproduce the behavior:

  1. Run 'lotus-miner actor withdraw 0.01' 'lotus-miner actor control list'
  2. See error
owner f02222: error getting account key: failed to get account actor state for f02222: unknown actor code bafkqadtgnfwc6mrpnv2wy5djonuwo

Expected behavior
A clear and concise description of what you expected to happen.
success
Screenshots
If applicable, add screenshots to help explain your problem.

Version (run lotus version):
1.4,2
Additional context
Add any other context about the problem here.

@apengn apengn changed the title To use a multi-signature wallet as the miner owner, use the command: lotus-miner actor control list | actor withdraw 0.001 err:owner f02222: error getting account key: failed to get account actor state for f02222: unknown actor code bafkqadtgnfwc6mrpnv2wy5djonuwo To use a multi-signature wallet as the miner owner Feb 21, 2021
@apengn apengn changed the title To use a multi-signature wallet as the miner owner To use a multi-signature wallet as the miner owner. withdraw failed Feb 21, 2021
@jennijuju jennijuju added area/wallet Area: Wallet kind/bug Kind: Bug area/ux Area: UX labels Feb 22, 2021
@jennijuju jennijuju changed the title To use a multi-signature wallet as the miner owner. withdraw failed Support lotus-miner actor withdraw when owner address is a multisig Feb 22, 2021
@arajasek
Copy link
Contributor

Three options here:

  • create a new CLI command to do this (easy, but somewhat unsustainable)
  • add docs to explain how to do this (akin to what we have for the set-owner) (terrible UX)
  • actually improve the UX of encoding params & sending arbitrary messages (not easy)

@arajasek
Copy link
Contributor

for now we might as well include docs akin to #5342 (comment)

@modytor
Copy link

modytor commented Jun 26, 2021

I am waiting for this feature, and my customers are also very anxious. When will we release this feature?

@jennijuju
Copy link
Member

blocked by #1136

@stuberman
Copy link

Would love to see progress on this! Needed by SPs @Reiers @ribasushi

@rjan90
Copy link
Contributor

rjan90 commented Jun 1, 2022

Hey @stuberman! I know the UX is not ideal, but you can withdraw the balance with a msig owner following this guide https://lotus.filecoin.io/tutorials/lotus-miner/msig-as-owner/#withdraw-balance-with-multisig-owner using the lotus-shed tool.

Else you can use regular Lotus by encoding and sending the right message, but the UX is not nice, so I deliberately left it out from the Docs:

1.lotus chain encode params --encoding=hex minerid 16 '{"AmountRequested": "amount"}'. Note that AmountRequested is in attoFIL here. This command will output some params that will be needed later.

Then propose from one msig member:
2. lotus msig propose --from=<multisignature member 1> <multisignature address> <minerid> 0 16 <params>

Then approve with the rest of the msig signers:
3. lotus msig approve --from=<multisignature member 2> <multisignature address> <transactionId> <address of proposer of txnId> <minerid> 0 16 <params>

@alvin-reyes
Copy link

alvin-reyes commented Jun 13, 2022

We can wrap the steps above and introduce the following

lotus-miner actor withdraw propose --from=<multisignature member 1> <multisignature address> <minerid> 0 16 <params>

lotus-miner actor withdraw approve --from=<multisignature member 2> <multisignature address> <transactionId> <address of proposer of txnId> <minerid> 0 16 <params>

We set the encoding as hex by default but the user can specify --encoding=base64 if an encoding needs to be enforced.

@jennijuju
Copy link
Member

thanks @alvin-reyes !

given that under actor, we also have following cmd lines

 set-addresses, set-addrs  set addresses that your miner can be publicly dialed on
   withdraw                  withdraw available balance
   repay-debt                pay down a miner's debt
   set-peer-id               set the peer id of your miner
   set-owner                 Set owner address (this command should be invoked twice, first with the old owner as the senderAddress, and then with the new owner)
   control                   Manage control addresses
   propose-change-worker     Propose a worker address change
   confirm-change-worker     Confirm a worker address change
   compact-allocated         compact allocated sectors bitfield
   help, h                   Shows a list of commands or help for one command

that might use a different method id - so id suggest to have some indicator on then cmd that this is for the withdraw method!

@alvin-reyes
Copy link

Adding here the related slack discussion(s):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

7 participants