Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
quantus storage get --pallet <P> --name <N> --key <K> --key-type <T>builds the storage key astwox128(P) ++ twox128(N) ++ encode(K). It never applies the map's hasher. ForSystem::Account(Blake2_128Concat), the example in the--keyhelp text, the resulting key does not exist, so the command always prints "No value found". (#27 worked around this by passing a hand-built--storage-key.)This PR looks up the entry's hasher in the live metadata and applies it to the encoded key (all seven
StorageHashervariants). Using--keyon a plain value, or on a map with more than one key, now returns a clear error instead of silently querying a key that does not exist.Before (key built by the CLI) vs. what subxt's codegen produces for
System::Account([7; 32]):Testing
storage_map_key_matches_codegen_for_system_account, which compares againstget_address_bytesfor the generatedSystem::Accountaddress using the checked-in metadata, andstorage_map_key_rejects_plain_storage_value. Both fail onmainand pass with this change.cargo test --lib,cargo clippy --all-targets -- -D warnings,cargo +nightly-2026-08-31 fmt --check. The only test failure isbatch_verifier::loads_private_and_public_batch_verifiers, which needs generated circuit bins that I skipped withSKIP_CIRCUIT_BUILD=1.I used an AI assistant (Claude) while preparing this. I reproduced the issue and checked the fix and tests myself.
🤖 Generated with Claude Code