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

Add tests #2

Open
jsdw opened this issue Sep 30, 2024 · 0 comments
Open

Add tests #2

jsdw opened this issue Sep 30, 2024 · 0 comments

Comments

@jsdw
Copy link
Collaborator

jsdw commented Sep 30, 2024

This library has no tests currently. This isn't quite as bad as it seems because it's been tested fairly extensively via https://github.com/jsdw/polkadot-historic-decoding-example (so we can see that it succeeds in decoding extrinsics and storage entries across a bunch of runtimes and blocks) and via its integration PR into Subxt (paritytech/subxt#1785), both of which are helping to turn up any issues.

That said, it would be good to add some tests! A couple of options:

  • Store more extrinsic hex's in artifacts with the corresponding metadatas, and manually ensure that they decode as expected (same with storage entries). This is fairly verbose and doesn't cover as much ground as the historic decoding example, but helps prevent us from breaking things in isolation going forwards.
  • Have some more E2E thing or integrate a simple version of the historic decode stuff to point at some RPC node and try decoding some set of blocks? Easier than the above in the sense that we don't need to save a bunch of offline data, but more brittle if RPC servers have issues and requires pulling an RPC server etc in.
  • Manually build extrinsics via sp_core etc?
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