-
-
Notifications
You must be signed in to change notification settings - Fork 675
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
Add busy screen #2445
Add busy screen #2445
Conversation
2e3d11b
to
15daebe
Compare
One thought that came to my mind after creating this PR is that it might be good to replace In case we decide to use |
we currently consider the session id to be (weakly) private so directly exposing an existing session id is a bad idea in general, I'm wondering, is there a strong reason to allow anything during the busy state? You could just send |
That was actually my initial implementation, see e1252ca. It is indeed quite simple in its minimal form. When @szymonlesisz implemented this, he actually decided to cancel the "Do not disconnect" screen just before signing and then run a fresh The other thing is that if another application sends in a Then in discussion with @prusnak I think we agreed that it would be nicer if Trezor would normally respond to My impression is that if we want to make the simple solution robust, it actually becomes way more complicated, but I haven't tried. Whereas the solution in this PR seems robust out of the box, I hope. Finally there are some thoughts around scalability. If we allow simultaneous CoinJoins for two accounts on the same Trezor (different passphrase each), then one account can be in the critical phase, while the second account is registering inputs ( |
fd02ad8
to
7d8ea6c
Compare
This PR implements a new
SetBusy
message incore
which causes Trezor T to show a "Do not disconnect" screen instead of the standard homescreen or lockscreen. Suite will need to display this screen at the moment before it commits to participate in a CoinJoin round. The message should appear for about 2 minutes, after which the CoinJoin transaction will be signed. During these two minutes Trezor is just waiting for the signing phase. It is possible for other operations to be called, but UI workflows should be discouraged, because if the UI workflow is running when Suite needs to sign the CoinJoin, then the workflow will be interrupted. Applications should check thebusy
parameter inFeatures
and prevent the user from launching a UI workflow ifbusy == True
, e.g. by disabling the "Receive" button in Suite.The message has an optional parameter
expiry_ms
that sets the time after which the "Do not disconnect" screen will automatically disappear. This is to prevent the message from appearing on the Trezor forever in case the desktop app shuts down in the middle of the CoinJoin workflow. Applications should explicitly hide the busy screen when the workflow is complete by callingSetBusy
withexpiry_ms=0
or not set.In the future we can add an
enum
toSetBusy
which will indicate the reason for the busy state. Right now it only makes sense to show CoinJoin as the reason.