You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accounts get stuck when a delegation event is missed for an account that is already present in the validator as readable.
Proposed solution
Approach 1: Mitigation
This seems to happen frequently with accounts that are delegated, undelegated, and re-delegated quickly. One possible solution is to remove accounts from the bank when they are undelegated and the undelegation is confirmed on the base layer, at the point where we would downgrade the accounts to readable. We also need to investigate why this occurs and whether it happens more frequently in these cases, as there may be a bug or race condition.
Approach 2: Use gRPC with historical updates
Using historical updates would make it impossible to miss events. This appears to be the more robust long-term solution.
Approach 3: Fetch on write attempt to a readable account
There are potential drawbacks to consider, but a viable solution could be to fetch the account, either always, after certain errors, or once, when we detect that a transaction is attempting to write to an account that is marked as readable in the bank.