Skip to content

[subxt-historic] Finish subxt-historic up, merge codebases more completely and unify them. #2087

@jsdw

Description

@jsdw

The overall aim here is to explore how best to unify the code and the interfaces for subxt and subxt-historic, such that there is consistency throughout, and share configuration to the extent that it’s possible to use subxt to “call into” subxt-historic to access historic blocks, or otherwise be merged more closely with subxt-historic. Some challenges are enumerated here. In summary, we need to take into account:

  1. Different configuration needed for decoding head-of-chain vs historic blocks.
    1. Also, subxt’s configuration is 100% type system based, whereas subxt-historics configuration has runtime functionality eg providing the type information.
  2. Different metadata abstractions. Subxt hides runtime metadata differences by converting what it needs into a Metadata object. Subxt-historic uses the raw frame-metadata types, with traits on top to pull the relevant information from them.
  3. Different connectivity: subxt supports light clients but subxt-historic cannot. Both rely on different APIs (archive methods vs chainHead methods) with different semantics.
  4. Different interface types: Subxt primarily focused on using type safe, statically generated code to interact with chains. Subxt-historic has to span numerous runtimes and so focuses instead on providing a dynamic interface and allowing type safety only at the borders.

These differences all need to be catered for in order to provide a consistent and simple interface for users.

Metadata

Metadata

Assignees

No one assigned

    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