Skip to content

feat: regenerate metadata#113

Merged
illuzen merged 1 commit into
mainfrom
beast/regen-metadata
Jun 17, 2026
Merged

feat: regenerate metadata#113
illuzen merged 1 commit into
mainfrom
beast/regen-metadata

Conversation

@dewabisma

@dewabisma dewabisma commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Regenerate metadata


Note

Medium Risk
Metadata and compatibility gate changes affect all chain interactions; multisig proposal decoding and error indices changed, so tools must match spec 131 or they may mis-decode events and extrinsics.

Overview
Regenerates the checked-in Subxt bindings and bumps CLI runtime compatibility from spec 127 → 131 (transaction version still 2).

The generated quantus_subxt snapshot reflects upstream pallet changes: MiningRewards gains a TreasuryMintFailed event (critical signal when treasury mint fails and reward is not issued), multisig ProposalData no longer includes call_weight, and ReversibleTransfers error variants are reindexed (e.g. RecovererCannotBeSelf and CallDecodingFailed removed). Docs in the bindings now clarify that high-security mode stays permanent, recover_funds can be called repeatedly, and get_difficulty is described as current mining difficulty. Metadata validation hashes and several storage address hashes were updated accordingly.

Reviewed by Cursor Bugbot for commit fb4bd3e. Configure here.

@dewabisma dewabisma requested review from illuzen and n13 June 16, 2026 14:09

@n13 n13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Clean, low-risk metadata regeneration

This regenerates the checked-in Subxt bindings against runtime spec 131 (up from 127) and bumps the compatibility gate accordingly. CI is fully green (all 10 checks pass, including the Build & Test Matrix on Linux/macOS, Clippy, and Bugbot).

What changed

  • src/chain/quantus_subxt.rs — regenerated bindings (metadata validation hash, storage address hashes, doc comments, three structural changes).
  • src/config/mod.rs — compatibility gate spec_version: 127 → 131 (tx version stays 2).
  • src/quantus_metadata.scale — regenerated binary snapshot.

The three structural (non-doc) changes:

  1. MiningRewards gains a TreasuryMintFailed event (codec index 4).
  2. Multisig ProposalData drops the call_weight field.
  3. ReversibleTransfers Error drops RecovererCannotBeSelf and CallDecodingFailed, reindexing remaining variants.

Verification — does hand-written CLI code depend on the changed structures?

Checked the whole codebase for usages of the affected items; none of the breaking changes touch hand-written code:

  • call_weight: the multisig module reads proposals in several places (e.g. src/cli/multisig.rs:745, 2102, 2578) but only accesses .call.0 / .deposit etc. — never call_weight. Safe to drop.
  • Reversible error variants: src/cli/reversible.rs wraps failures in generic QuantusError strings and never decodes error indices by hand, so the reindexing has no effect.
  • TreasuryMintFailed / get_difficulty: no references outside the generated file — the new event needs no handling and the get_difficulty change is doc-only.
  • Compatibility gate: the only hardcoded version lives in src/config/mod.rs; the README describes the gate generically with no stale version, and nothing else hardcodes 127.

Verdict: Approve

The PR is mechanically generated and internally consistent — the storage-hash changes for Multisig::Proposals line up with the ProposalData layout change, the metadata validation hash is updated, and the version gate matches. No accompanying hand-written code changes are required, which the green build confirms.

Minor, non-blocking note: since this regen carries a real chain-breaking layout change (proposals/errors), anyone running an older CLI against spec 131 will now be correctly rejected by the gate rather than mis-decoding — the intended fail-early behavior.

@illuzen illuzen merged commit 9eedea3 into main Jun 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants