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

core: Consider removing GetByHash from getter interface #3952

Open
renaynay opened this issue Nov 20, 2024 · 0 comments
Open

core: Consider removing GetByHash from getter interface #3952

renaynay opened this issue Nov 20, 2024 · 0 comments
Labels
area:core_and_app Relationship with Core node and Celestia-App area:header Extended header

Comments

@renaynay
Copy link
Member

We don't really need to ever fetch a header or block by its hash. We use it once (to fetch genesis hash). We could just GetByHeight(1) and compare the hashes to make sure they match.

We could do the same in case of TrustedHash passed (we can also ask for height from the user) and compare the hashes.

Wouldn't this also eliminate the need for an index hash-> height?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core_and_app Relationship with Core node and Celestia-App area:header Extended header
Projects
None yet
Development

No branches or pull requests

1 participant