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

block number to hash #113

Open
gilescope opened this issue Nov 15, 2023 · 2 comments
Open

block number to hash #113

gilescope opened this issue Nov 15, 2023 · 2 comments

Comments

@gilescope
Copy link

It's not uncommon for people to want to query from a particular block number rather than hash.
Currently this is possible with the 'legacy' rpc mechanism in subxt to get a block hash for a particular block number, but is there a non-legacy mechanism?

(I saw on the subxt lounge element room that it's not uncommon to want to do such a thing and currently it's not as easy as it ought to be.)

@lexnv
Copy link
Contributor

lexnv commented Nov 15, 2023

Hey Giles,

Soon, the archive methods will expose the archive_unstable_hashByHeight; which will handle most use-case I believe going back to genesis.

It might be worth adding a chainHead_hashByHeight as well that only works in the context of pinned blocks (@tomaka what do you think?)

@tomaka
Copy link
Contributor

tomaka commented Nov 15, 2023

I don't see a reason why you would want to refer to blocks by their number except in an archive context.

Yes, people with limited technical knowledge want to do all sort of things, but that doesn't make it correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants