build: ⬆️ Upgrade polkadot-sdk deps to stable2503#671
Merged
Conversation
This commit fixes multiple build issues that arose from the polkadot-sdk stable2503 upgrade when running `cargo test --features runtime-benchmarks`. Changes: 1. Downgrade Rust to 1.90 (from 1.91) - polkavm-linker generates target specs with "target-pointer-width": "64" (string) - Rust 1.91 (PR #144443) changed this to require an integer - Added documentation explaining this incompatibility in rust-toolchain.toml 2. Add `extern crate alloc;` to pallets - Required after polkadot-sdk PR #7043 removed sp-std - Added to: bucket-nfts, file-system, providers 3. Fix benchmark helper trait bounds - pallet_nfts now requires BenchmarkHelper impl for test signature types - Added TestNftsBenchmarkHelper to payment-streams and file-system precompile mocks 4. Fix proofs-dealer benchmark constraints - Changed ForestVerifier proof type from CompactProof to ShpCompactProof - ShpCompactProof implements DecodeWithMemTracking required by stable2503 5. Trim runtime benchmarks to StorageHub pallets only - Removed frame_system, pallet_balances, and other non-StorageHub pallets - Reduces benchmark maintenance burden 6. Remove rococo-native feature from polkadot-cli - Avoids pallet-xcm -> pallet-revive dependency chain - External relay chain via zombienet/RPC still works 7. Add runtime-benchmarks feature to file-system precompile - Required for proper feature propagation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. Set XcmEventEmitter to pallet_xcm::Pallet<Runtime> in parachain and xcm-simulator XCM configs for proper XCM event emission
2. Update relay token reserve transfer test to reflect stable2503 behavior:
- Network native asset reserve transfers are now blocked at pallet_xcm
level with InvalidAssetUnknownReserve (Asset Hub Migration prep, PR #9544)
- Test now expects failure at source rather than at destination
- Balances remain unchanged since transfer is rejected early
After the polkadot-sdk stable2503 upgrade, the frame-metadata version changed which made type decoding stricter. Polkadot.js now uses the metadata-derived types (camelCase) instead of custom type definitions (snake_case). Changes: - Update ValueProposition and ValuePropositionWithId to use camelCase field names to match the auto-generated lookup types from runtime metadata - Change pricePerGigaUnitOfDataPerBlock type from u64 to u128 to match runtime - Add missing commitment and available fields to ValueProposition - Update debt-collection.test.ts to use the new camelCase field names - Regenerate api-augment types from updated metadata - Bump types-bundle to 0.3.3 - Bump api-augment to 0.3.3 This fixes the error: "Cannot read properties of undefined (reading 'price_per_giga_unit_of_data_per_block')" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
b14657e to
e34bb6f
Compare
…sfers After polkadot-sdk stable2503, transfer_assets is disabled for network native asset reserve transfers (#9544). Replace the test that verified failure with a working transfer using execute with explicit XCM instructions. The test now demonstrates the recommended approach: - InitiateReserveWithdraw to relay chain (withdraws from sovereign account) - InitiateTeleport to StorageHub (teleport to system chain) - DepositAsset to beneficiary Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…types Replace ShpCompactProof with Vec<Vec<u8>> (aliased as CompactProofEncodedNodes) for proof types at extrinsic boundaries. This is required because polkadot-sdk stable2503+ requires DecodeWithMemTracking for extrinsic parameters, which CompactProof does not implement. Changes: - Remove ShpCompactProof struct from shp-traits - Add CompactProofEncodedNodes type alias for Vec<Vec<u8>> - Update CommitmentVerifier and TrieProofDeltaApplier trait implementations to use CompactProofEncodedNodes as the Proof type - Convert Vec<Vec<u8>> to CompactProof internally when needed for trie ops - Update all mock implementations, tests, and benchmarks accordingly
e342b67 to
3f0c4a6
Compare
…PoV size measurement in solochain evm runtime
ffarall
approved these changes
Mar 12, 2026
ffarall
requested changes
Mar 12, 2026
Collaborator
ffarall
left a comment
There was a problem hiding this comment.
Requesting changes to make sure minor fixes are applied before merging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… background tasks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ffarall
approved these changes
Mar 12, 2026
Previous tests drain the user's balance via payment stream charges during MSP catch-up, causing the MSP to detect insolvency and reject new storage requests with OperationNotAllowedWithInsolventUser. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <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.
Notable changes:
Downgraded rust toolchain version from
1.91to1.90Changes were also caused by this change due to clippy warnings that were not present in 1.91.
derive
DecodeWithMemTrackingforRuntimeCallparitytech/polkadot-sdk#7634:DecodeWithMemTrackingtrait derivation was added toRuntimeCall.This change would have been simply inherited if sp-trie updated theirCompactProoftype which we use extensively in the codebase.To satisfy the bound, proof types at extrinsic boundaries now useVec<Vec<u8>>instead ofCompactProof(aliased asCompactProofEncodedNodes. This represents theencoded_nodesfield of a compact proof which implementsDecodeWithMemTrackingby the parity-scale-code crate. The conversion toCompactProofis done internally when needed for trie operations.This was one of the two solutions that posed the least amount of code changes and is easier to change onceCompactProofimplements the new trait. The other more intrusive way was wrapping theCompactProofin a struct which implements the trait, but this lead to many changes that were hard to track.Remove usage of
sp-stdfrom Substrate paritytech/polkadot-sdk#7043sp-stdcrate is deprecated and all uses of it in the codebase have been replaced with theallocorcoreequivalent imports.Implement cumulus StorageWeightReclaim as wrapping transaction extension + frame system ReclaimWeight paritytech/polkadot-sdk#6140
Wrapped transaction extensions for both parachain and solochain-evm runtimes with
StorageWeightReclaim.StorageWeightReclaimis meant to be used as a wrapping of the whole transaction extension pipeline, and will take into account all proof size accurately.Frontier EVM /
ProofSizeExton solochain-evm:Frontier EVM (stable2503) introduced
get_proof_size()host function calls at multiple points in the EVM runner to measure actual proof size via theProofSizeExthost extension. IfProofSizeExtis present during block building but absent during block import on syncing nodes,get_proof_size()returns different values on each path, leading to different gas/weight calculations, different state roots, and digest mismatch panics.To fix this, two changes were made to the solochain-evm node service:
ProposerFactory::with_proof_recording(instead ofProposerFactory::new) to registerProofSizeExtduring block authoring.sc_service::new_full_parts_record_import(..., true)(instead ofnew_full_parts) so that the Client registersProofSizeExtduring block import on syncing BSP/MSP nodes, matching the block building path.runtimes: presets are provided as config patches paritytech/polkadot-sdk#6349:
Genesis config preset files have been migrated to use the new
build_struct_json_patch!macro instead of the previous pattern of constructing a fullRuntimeGenesisConfigstruct and serializing it withserde_json::to_value().Before:
After:
client/net: Use litep2p as the default network backend paritytech/polkadot-sdk#8461
Substrate based chains are now configured to use
litep2pas the network backend (before was libp2p)While
litep2pimplements the same wire protocol and is interoperable withlibp2pnodes, several behavioral differences required fixes:GRANDPA notification keepalive: In dev mode with manual sealing, the GRANDPA voter is not started but its notification protocol is still registered for P2P negotiation.
litep2pkills all P2P connections if any registered notification protocol's service handle is dropped (unlikelibp2pwhich tolerates this). A keepalive task was added that drains GRANDPA notification events without running consensus, keeping the protocol handler alive for the lifetime of the node.Chunk uploader retry count:
litep2pmaps transient connectivity errors (ConnectionClosed,SubstreamClosed,dial-failed, etc.) toRequestFailure::Refusedinstead ofRequestFailure::NotConnected. The chunk uploader's retry limit forRefusederrors was increased from 3 to 30 to handle peer recovery scenarios during file uploads.Integration tests: Integration tests were modified to take into account hew new
Refusederror propagation which changed timing and logging assertions in the tests.Short description
The transaction extension pipeline (
SignedExtra/TxExtension) must now be wrapped withcumulus_pallet_weight_reclaim::StorageWeightReclaim. This wrapper measures PoV size before and after execution and reclaims unused storage weight, including weight consumed by the extensions themselves. Runtimes must also implementcumulus_pallet_weight_reclaim::Config.This affects:
SignedExtra/TxExtensiontype aliasfrom_minimal_extensionimplementation (must wrap the inner extension tuple)compute_signed_extra_implicitruntime API implementation (same wrapping)Who is affected
ExtensionOperations::from_minimal_extensionSuggested code changes
Type alias:
Before:
After:
from_minimal_extension:Before:
After:
New pallet config required:
Short description
For EVM runtimes using Frontier, both block building and block import must now register the
ProofSizeExthost extension. Frontier EVM (stable2503) callsget_proof_size()at multiple points during EVM execution. IfProofSizeExtis present during block building but absent during block import on syncing nodes,get_proof_size()returns different values on each path, leading to different gas/weight calculations, different state roots, and digest mismatch panics.Two changes are needed in the node service:
ProposerFactory::newmust be replaced withProposerFactory::with_proof_recordingsc_service::new_full_partsmust be replaced withsc_service::new_full_parts_record_importwith proof recording enabledWho is affected
Non-EVM runtimes (e.g. parachain-only) are not affected by this specific change, though using
with_proof_recordingis still recommended for accurateStorageWeightReclaimoperation.Suggested code changes
Block building — ProposerFactory:
Before:
After:
Block import — Client initialization:
Before:
After:
Short description
StorageHub now targets polkadot-sdk
stable2503and frontierstable2503. Downstream consumers must align their polkadot-sdk and frontier dependency versions. This brings several inherited breaking changes from the Polkadot SDK upgrade.Who is affected
Suggested code changes
sp_stddeprecated (polkadot-sdk#7043): Replace allsp_std::*imports withalloc::*orcore::*equivalents. Addextern crate alloc;where needed.Genesis config presets (polkadot-sdk#6349): Migrate from
serde_json::to_value()to thebuild_struct_json_patch!macro.pallet_session::Config: Addtype DisablingStrategy = ();DecodeWithMemTracking(polkadot-sdk#7634): Custom types used at extrinsic boundaries or inRuntimeCallmust deriveDecodeWithMemTrackingfrom theparity-scale-codeccrate.litep2pdefault network backend (polkadot-sdk#8461): Substrate chains now uselitep2pinstead oflibp2pby default. Whilelitep2pis wire-compatible withlibp2p, behavioral differences exist (e.g. notification protocol handling, error mapping for request-response).