paritytech / paritytech/subxt

How can we validate that the `subxt::Config` aligns with the chain we're talking to?

Open
#1,461 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
489
Forks
293
Avg merge
18h 35m
Merged PRs (30d)
3

Description

We can already validate that the generated subxt interface aligns with the chain we're communicating with. It would be great if there was also a way to validate that the Config implementation we use actually lines up with the chain too.

I think that this can be a part of the problem we're trying to solve in KR2:

Reduce the configuration needed for Subxt to connect to different chains (aim is to make all config discoverable through metadata, but we need to see how much this is possible).

I suspect that the two go hand in hand; if we expose in the metadata enough information to allow us to reduce the params in our config that need hard coding, we'll inevitably also gain some of the information eeded to validate it.

This was initially raised by @smiasojed, who would like to be able to run this check as a part of the cargo contract tool, so eg cargo-contract --config moonbeam can confirm that the moonbean config is appropriate for example.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing validation for whether the generated Subxt interface aligns with the chain, then inspect how chain metadata and the subxt::Config implementation are represented. Define what metadata can validate and what configuration can be discovered; done means a clear validation path that could support cargo-contract --config moonbeam.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.