paritytech / paritytech/frame-decode
System.Events decoding fails for V11/V12 metadata blocks
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 8
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Summary
System.Events storage cannot be decoded for historical blocks that use V11/V12 metadata. This is a metadata version incompatibility issue, not a lazy migration issue (those are tracked in #85).
Affected Blocks
| Attribute | Value |
|---|---|
| Chain | Kusama Relay |
| Spec Versions | 1058, 1062 |
| Example Blocks | 2064962, 2064963, 2064964, 2064965, 2201991-2201995, 2671528 |
| Total Occurrences | 10 |
Errors Observed
CannotDecodeValue { ty: Vec<EventRecord<T::Event, reason: VariantNotFound(72) at .[2].event }
CannotDecodeValue { ty: Vec<EventRecord<T::Event, reason: CodecError("Not enough data to fill buffer") at .[1].event.[0].[1] }
CannotDecodeValue { ty: Vec<EventRecord<T::Event, reason: CodecError("Not enough data to fill buffer") at .[1].event.[0].[0].[0].[15] }
Root Cause (Investigation Needed)
The issue appears to be related to how event pallet indices are encoded in V11/V12 metadata vs V14:
- V11/V12: Events may use a different pallet index encoding scheme
- V14: The current decoder assumes V14-style pallet indices
When decoding V11/V12 events with V14 assumptions, the decoder either:
- Encounters an unknown variant (
VariantNotFound(72)) - Runs out of data because it's reading the wrong structure
TODO
- Confirm root cause - is it pallet index encoding or something else?
- Check what Polkadot-JS does for these blocks - does it decode successfully?
- Determine what changes would be needed to support V11/V12 event decoding
- Decide if this is worth fixing or if those blocks should simply be excluded from testing
Related
- #85 tracks lazy migration issues (mixed data formats within same spec version)
- This issue is specifically about metadata version incompatibility
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 reproducing the listed Kusama blocks, especially 2064962-2064965, 2201991-2201995, and 2671528, and inspect the reported decoding errors. Compare their V11/V12 event decoding with Polkadot-JS, then determine whether pallet-index encoding is the cause. Done means confirming the root cause and documenting the required support or an explicit decision to exclude these blocks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100