Config: `DynamicHasher`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 489
- Forks
- 293
- Avg merge
- 18h 35m
- Merged PRs (30d)
- 3
Description
Currently, Config params like Hasher and Signature are hardcoded to specific values that must match what's on the chain.
Could we make it possible to set config like:
impl Config {
// ...
type Hash = DynamicHash
type Hasher = DynamicHasher;
}
Where DynamicHasher in this example would use the metadata to determine how the given chain wants to hash things (it would know about certain hashing functions, eg "blake2_256", so that if the metadata specifies a hasher that we know about, it's all good, and otherwise we'd throw an error when trying to hash or whatever).
This sort of thing may require changes to the metadata (and ultimately a V16 metadata release, which we don't want to jump to doing too quickly as V15 has just merged), but would allow us to have more flexible defaults for, in this example Hash and Hasherwhich would only need configuring if the chain used some custom hashing thing Subxt didn't know about.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the Config and DynamicHasher concepts described in the issue, then review how metadata currently represents hashers in V15. Define how known hash functions are selected from metadata, how unknown hashers fail, and whether the design requires a V16 metadata change while preserving custom configuration for unsupported chains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100