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

multi: Enable staking on trezor. #2681

Open
JoeGruffins opened this issue Sep 28, 2020 · 12 comments
Open

multi: Enable staking on trezor. #2681

JoeGruffins opened this issue Sep 28, 2020 · 12 comments

Comments

@JoeGruffins
Copy link
Member

This purpose of this issue is to track changes needed to enable staking through decrediton on the trezor hardware wallet.

Depends on changes tracked by #2680

Staking also depends on changes being merged in the trezor firmware. Those changes are here:
trezor/trezor-firmware#1249

Work on this in decrediton cannot begin until the above two changes are completed.

Ticket purchasing on testnet has been reliably achieved using a combination of these diffs with the above firmware changes:
trezor/trezor-utxo-lib#9
trezor/connect#678
matheusd/trezor-decred-poc#6

@JoeGruffins
Copy link
Member Author

Related to #1491

@JoeGruffins
Copy link
Member Author

We have to decided to roll our own firmware as we wait for Trezor to merge. #2705 is in so we can continue. We were not able to get firmware updates working in that pr, so there will be an intermediate pr to get that working, then this issue can be solved for those who wish to use custom firmware rather soon I believe.

@xaur
Copy link
Contributor

xaur commented Aug 15, 2022

Every once in a while people ask about the status of Decred staking with Trezor. This is the most relevant issue I could find. Having a short status for 2022 would make it a good reference to link to.

@JoeGruffins
Copy link
Member Author

All work on the trezor side is done actually! Will update this OP after a refresh on what still needs to be done over here and in dcrwallet.

@JoeGruffins
Copy link
Member Author

Well, I thought trezor was done for staking, but there is a bug in version v2.5.1 through v2.5.3 and am trying to get fixed here

#3848 allows purchasing on testnet. There is already a follow up pr ready that handles creating a new voting key that will allow vsps to vote for the trezor with deterministic voting addresses based on data produced from signing a message with the trezor.

The last piece that is still in development is error handling when fee payment does not go smoothly. I would like to handle this in decrediton, since it will require the user's input to attempt to re-pay a fee. We cannot do this passively in dcrwallet as I believe is the case normally.

@xaur
Copy link
Contributor

xaur commented Dec 28, 2022

dcrwallet's VSP client (or the autobuyer?) has machinery for tracking VSP tickets throughout their lifecycle, doesn't it handle failed fee payments already?

@JoeGruffins
Copy link
Member Author

You have to pay the fee with trezor. So you have to confirm the signing of the transaction on the device. You can't just leave it unlocked like dcrwallet.

The fees for the vsp are valid for a certain time window. So if you need to re-send the tx fee later, that is a new transaction that requires physical input from the user.

@rdallman
Copy link

any way to help out here? looks like just waiting on trezor/trezor-firmware#2703 - happy to test, etc. thanks for getting this hooked up!

@JoeGruffins
Copy link
Member Author

This is a perpetual waiting game.

@xaur xaur mentioned this issue May 10, 2023
21 tasks
@norwnd
Copy link

norwnd commented Aug 5, 2023

You have to pay the fee with trezor. So you have to confirm the signing of the transaction on the device. You can't just leave it unlocked like dcrwallet.

The fees for the vsp are valid for a certain time window. So if you need to re-send the tx fee later, that is a new transaction that requires physical input from the user.

Could you also clarify why single transaction can't bundle both: ticket-buy and fee-payment (just to confirm my hunch that ticket-buy must specifically have exactly 1 input and 3 outputs) ?

Another potential way to get rid of the need to confirm VSP fee payment transaction on Trezor would be to have a temporary Decrediton-owned wallet, if you still have to do a split transaction anyway (to prepare the input to buy a ticket) which requires approval on Trezor - might as well create a separate output to pay into Decrediton-owned wallet so it can pay VSP fee later automatically without additional confirmation from the user (I'm assuming VSP fee is payed after ticket-buy transaction is issued, maybe we can pay it even earlier - wasting it shouldn't be a huge deal either way). I didn't research this deep, but that probably requires adjusting the way split transaction is generated in dcrwallet.

@JoeGruffins
Copy link
Member Author

Could you also clarify why single transaction can't bundle both: ticket-buy and fee-payment (just to confirm my hunch that ticket-buy must specifically have exactly 1 input and 3 outputs)

We must inform the vsp of our fee transaction and current vspd logic cannot handle that. It would be a lot of changes in a few repos.

@JoeGruffins
Copy link
Member Author

Another potential way to get rid of the need to confirm VSP fee payment transaction ...

Yeah, but it's only a couple clicks. Hours of dev time and adding code that can add more bugs and more dev time for a not so great return.

The message confirmations were really awful, and I think the extra dev time to get rid of those was worth it. But one extra transaction confirmation is not such a big deal imo.

Also, I hope the first implementation that closes this issue can be simple. Improvements can be made from there.

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

No branches or pull requests

4 participants