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

rpcserver: fix LSAT issue on account recovery #243

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

guggero
Copy link
Member

@guggero guggero commented Apr 6, 2021

This problems affected two users who reported on Slack that they were unable to recover their account state.
I've sponsored them an LSAT so they can proceed. This fix should prevent any user with data loss from running into the same problem in the future.

The account recovery process uses a bi-directional streaming RPC on
the server side. Unfortunately, because of the way streaming RPCs
work, the LSAT interceptor isn't able to purchase a token during
a streaming RPC call (the 402/payment required error is only returned
after the interceptor was handed the call, so it cannot act on it
anymore). But since a user that has lost their data most likely als
lost their LSAT, the recovery will fail if this is the first call to
the server ever. That's why we call an RPC that's definitely not on
the white list first to kick off LSAT creation.

The account recovery process uses a bi-directional streaming RPC on
the server side. Unfortunately, because of the way streaming RPCs
work, the LSAT interceptor isn't able to _purchase_ a token during
a streaming RPC call (the 402/payment required error is only returned
after the interceptor was handed the call, so it cannot act on it
anymore). But since a user that has lost their data most likely als
lost their LSAT, the recovery will fail if this is the first call to
the server ever. That's why we call an RPC that's definitely not on
the white list first to kick off LSAT creation.
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍄

// lost their LSAT, the recovery will fail if this is the first call to
// the server ever. That's why we call an RPC that's definitely not on
// the white list first to kick off LSAT creation.
_, _ = s.auctioneer.OrderState(ctx, order.Nonce{})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid workaround! Should be good enough for now.

@Roasbeef Roasbeef merged commit c36273f into master Apr 7, 2021
@guggero guggero deleted the account-recover-lsat-fix branch April 7, 2021 06:38
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.

3 participants