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

index block numbers vs hashes #1

Open
brenzi opened this issue Mar 18, 2024 · 2 comments
Open

index block numbers vs hashes #1

brenzi opened this issue Mar 18, 2024 · 2 comments

Comments

@brenzi
Copy link
Member

brenzi commented Mar 18, 2024

we currently have no way of querying the block hash of a specific block number.
This, however, is necessary for certain historical queries using the cli with --at <HASH>

@brenzi
Copy link
Member Author

brenzi commented Mar 18, 2024

we might workaround theis missing index by using the public subquery of novawallet. but it seems only extrinsics are indexed:
https://explorer.subquery.network/subquery/nova-wallet/nova-wallet-encointer

{
  historyElements(first: 5) {
    nodes {
      blockNumber
      extrinsic
    }
  }
}

@brenzi
Copy link
Member Author

brenzi commented Mar 18, 2024

hmm, our rpc supports this:
image
so we may not even need it and implement this rpc in cli directly

test:

polkadot-js-api rpc.chain.getBlockHash 5555 --ws wss://kusama.api.encointer.org:443

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

1 participant