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

Store tip of the BTC light client as separate key in db #244

Open
KonradStaniec opened this issue Oct 31, 2024 · 0 comments
Open

Store tip of the BTC light client as separate key in db #244

KonradStaniec opened this issue Oct 31, 2024 · 0 comments
Assignees
Labels
Performance Some performance bottlenecks

Comments

@KonradStaniec
Copy link
Collaborator

Currently retrieving tip of BTC Light client is implemented as retrieving the first element of reverese iterator of all the headers:
https://github.com/babylonlabs-io/babylon/blob/v0.15.0/x/btclightclient/keeper/state.go#L122

This proves to be inefficient. Given that retrieving the tip is frequent operation it worth investigating whether storing tip as separate entry improves the sitution.
Screenshot 2024-10-31 at 12 02 47

@KonradStaniec KonradStaniec added the Performance Some performance bottlenecks label Oct 31, 2024
@KonradStaniec KonradStaniec self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Some performance bottlenecks
Projects
None yet
Development

No branches or pull requests

1 participant