Skip to content

bug: Accounts get "stuck" when a delegation event is missed for an account that is already present in the validator as readable. #765

@GabrielePicco

Description

@GabrielePicco

Report

Description

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.

Commit / version

master

Environment

No response

Metadata

Metadata

Assignees

Labels

P0Very high prioritybugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions