Skip to content

Explorer node: Allow querying blocks by their hash #2016

@dbadol

Description

@dbadol

Current situation
Blocks can be queried with their block height ('height') or with a kernel id they contain ('kernel').
Examples:

block?exp_am=1&height=3514287
block?exp_am=1&kernel=79e06042bc0b713abd228ed8010866e25550f9af9c213f62fcfca7b6c253a258

However, they cannot be queried by their hash (although it seems that was possible in the old explorer?).

A possible solution
Add a new option to search by hash ('hash'):

block?exp_am=1&hash=62e61ddefcef68218ea8909c24f3121d7ed99794cbe55c54663dcb5ad7873173

Possible alternative
We could imagine ALSO allowing a general search for all the three above, by instance with argument 'id' (which was used in previous versions), so that no previous knowledge of the hash nature is needed:

block?exp_am=1&id=3514287
block?exp_am=1&id=79e06042bc0b713abd228ed8010866e25550f9af9c213f62fcfca7b6c253a258
block?exp_am=1&id=62e61ddefcef68218ea8909c24f3121d7ed99794cbe55c54663dcb5ad7873173

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions