-
Notifications
You must be signed in to change notification settings - Fork 283
Open
Description
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:
- Different configuration needed for decoding head-of-chain vs historic blocks.
- Also, subxt’s configuration is 100% type system based, whereas subxt-historics configuration has runtime functionality eg providing the type information.
- 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.
- Different connectivity: subxt supports light clients but subxt-historic cannot. Both rely on different APIs (archive methods vs chainHead methods) with different semantics.
- 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
Labels
No labels