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

unbonding watcher: potential OOM with many BTC delegations #223

Open
SebastianElvis opened this issue Jun 14, 2024 · 0 comments
Open

unbonding watcher: potential OOM with many BTC delegations #223

SebastianElvis opened this issue Jun 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@SebastianElvis
Copy link
Member

For every active delegation, the unbonding watcher creates a new goroutine that's intended to watch for any new transactions whose input matches the output of the staking tx (ref). A large amount of go-routines can cause performance degradation or slowdowns, or maybe even cause the vigilante to crash with an OOM.

A proper fix is to subscribe to each new BTC block rather than each staking tx, such that upon each new BTC block, unbonding watcher sees whether it includes an unbonding tx for a BTC delegation. If yes then unbonding watcher reports it to Babylon.

@SebastianElvis SebastianElvis added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant