Skip to content

[subxt-historic] Build a test suite for frame-decode type information and run in CI when type information changes #2089

@jsdw

Description

@jsdw

The goal here is to automate the sort of thing we can do manually using the historic decoding tool. We probably don’t want to try to decode every block, and certainly can’t expect to decode all state (unless we have access to some snapshot of historic state we can use), because this would take too long.

What we can do though is write a test function whereby we can provide a list of archive RPC nodes for some chain, ranges of blocks to try decoding, and a list of blocks from which to decode storage entries from, probably with a way to match or ignore specific storage entries. In other words, we want to be able to:

  1. Decode ranges of blocks (this is reasonably cheap so we can try decoding a fair amount of blocks; possibly 10-100k of them)
  2. Decode all storage entries from a small selection of blocks, for sanity checking that types work.
  3. Upon hitting some issue decoding a block, add that block to the list of blocks to test and fix it.
  4. Upon hitting some issue decoding storage at a block, add that specific entry or entries that fail to the list of things to be tested.

Once such a test suite exists,let's wire it up to run in CI whenever our type definitions are touched (and not if they aren't, because it might be quite slow) in order to check that changes to our type defitions aren't breaking anything!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions