Joystream / Joystream/joystream
Unit tests for @joystream/types
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
After updating types package for a new runtime by following steps in https://github.com/Joystream/joystream/issues/1835
it is not possible to know if the implementation was done correctly.
We lack is a set of unit tests with 100% coverage of the types that can read state from chain and look for warnings from the polkadot-api library that can detect if the custom defined types are defined correctly.
At one point there was a debug feature in the polkadot-js library that would display a warning in console when it detects a discrepancy between how a custom defined type gets encoded to raw bytes vs how it was read from chain
Maybe there is a way to write some rust utility that can construct the runtime types and compare their encoding with how the types library encodes them to find discrepancies.
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 locating the @joystream/types package and its runtime type definitions. Review how the polkadot-api or polkadot-js library reads chain state and reports type warnings, then assess whether the proposed Rust utility can compare runtime and library encodings. Done should include a defined test strategy covering the types and detecting encoding discrepancies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript
- Domain
- blockchain, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100