Repository navigation
Multiple fixes - #2017
Open
HenriqueNogara wants to merge 7 commits into
Open
Multiple fixes#2017HenriqueNogara wants to merge 7 commits into
HenriqueNogara wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several dispatch weights are stale, the migration is unbounded and undercounted, metadata snapshots are missing, and one regression test is not registered.
8 open findings
Missing metadata snapshots for new storage item · New Unbounded proposal migration can exceed block budget · New set_frozen_tokens weight omits holder DID read · New Proposal creation weights omit ProposalProposers write · New Storage iteration weight undercounts terminating lookup · New Missing #[test] leaves scheduler cancellation regression untested · New Same-DID transfer weights omit custom portfolio reads · New Settlement weights omit scheduler cancellation storage work · New
What changed in this PR
Adds validation and storage optimizations across compliance, settlement, assets, governance, and NFT precompiles.
Changes:
- Rejects invalid compliance, affirmation, holder, and receipt inputs.
- Adds indexed PIP proposer storage and scheduler cleanup during settlement pruning.
- Makes ERC-721
tokenURIrevert for nonexistent NFTs and expands regression coverage.
| File | Description |
|---|---|
primitives/src/condition.rs |
Detects empty claim lists and adjusts complexity. |
pallets/settlement/src/lib.rs |
Adds affirmation, receipt, holder, and pruning checks. |
pallets/runtime/tests/src/settlement_test.rs |
Tests settlement validation and pruning. |
pallets/runtime/tests/src/settlement_pallet/transfer_funds.rs |
Tests invalid destination portfolios. |
pallets/runtime/tests/src/compliance_manager_test.rs |
Tests empty-claim rejection. |
pallets/runtime/tests/src/asset_pallet/mod.rs |
Registers freeze tests. |
pallets/runtime/tests/src/asset_pallet/freeze.rs |
Tests holder identity validation. |
pallets/precompiles/src/interface/nft/metadata.rs |
Validates NFT existence for tokenURI. |
pallets/pips/src/migration.rs |
Backfills proposal proposers. |
pallets/pips/src/lib.rs |
Adds and uses proposer index storage. |
pallets/compliance-manager/src/lib.rs |
Rejects empty claim conditions. |
pallets/asset/src/lib.rs |
Validates holders before freezing. |
integration/tests/revive_erc721.rs |
Tests nonexistent NFT URI behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+461
to
+464
| /// The [`Proposer`] for each proposal ([`PipId`]). | ||
| #[pallet::storage] | ||
| pub type ProposalProposers<T: Config> = | ||
| StorageMap<_, Twox64Concat, PipId, Proposer<T::AccountId>, OptionQuery>; |
HenriqueNogara
marked this pull request as ready for review
October 10, 2026 16:48
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.


changelog
other