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

Ensure device removal doesn't affect unaffiliated stake #113

Open
annybs opened this issue Apr 4, 2022 · 0 comments
Open

Ensure device removal doesn't affect unaffiliated stake #113

annybs opened this issue Apr 4, 2022 · 0 comments

Comments

@annybs
Copy link
Member

annybs commented Apr 4, 2022

Say a stake is reassigned from device A to device B, creating a pending transaction. Device A won't know it is unassigned until the transaction is processed and enters the blockchain. In this period, it is theoretically possible for device A to be removed, creating a second pending transaction that unassigns the stake (being that the unassign_stake action doesn't require a device input).

This is a highly unlikely scenario but we should take the extra step to mitigate it by checking pending transactions before removing a device. If any pending transaction pertains to the target stake, it should be ignored (but other device events still allowed, namely removal).

After this change is made we should also explore the necessity of checking pending transactions for other actions, e.g. adding to network, or anything else that may alter the stake.

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

2 participants