build: ⬆️ Upgrade polkadot-sdk deps to stable2506#709
Draft
build: ⬆️ Upgrade polkadot-sdk deps to stable2506#709
Conversation
Upgrade all polkadot-sdk git dependencies from branch `stable2503` to `stable2506`. Upgrade all Frontier EVM dependencies from branch `stable2503` to tag `frontier-stable2506`. Fix all compilation errors and test failures caused by upstream breaking API changes in polkadot-sdk stable2506 (134 PRs) and 9 patch releases. Upstream breaking changes addressed: - Remove local `AccountIdFor` alias, now provided by `frame_system::pallet_prelude` (paritytech/polkadot-sdk#7229) - Add `RelayParentOffset = ConstU32<0>` to parachain system config (paritytech/polkadot-sdk#8299) - Fix `Outcome` enum pattern matching: `Error` is now tuple variant wrapping `InstructionError` (paritytech/polkadot-sdk#8535) - Remove `RuntimeEvent` from `pallet_evm::Config` and `pallet_ethereum::Config` (frontier stable2506) - Add `RuntimeEvent` to `pallet_session::historical::Config` - Remove `PassByInner` import, use `.0` for `H256` inner access (paritytech/polkadot-sdk#7375) - Destructure 4 return values from `build_relay_chain_interface` (paritytech/polkadot-sdk#8072) - Add `metrics` field to `BuildNetworkParams` (paritytech/polkadot-sdk#8332) - Add `prometheus_registry` to `StartRelayChainTasksParams` (paritytech/polkadot-sdk#8332) Release: https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2506 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FRAME now auto-derives the RuntimeEvent conversion using associated type bounds on frame_system::Config when a #[pallet::event] block is present, making the explicit `type RuntimeEvent` in pallet Config traits redundant. Removed from 7 StorageHub pallets (bucket-nfts, file-system, payment-streams, proofs-dealer, providers, randomness, provider-randomness), the mock_message_queue pallet, and all corresponding mock/runtime/xcm-simulator Config implementations. Events themselves are unchanged — only the redundant associated type declaration was removed. Ref: paritytech/polkadot-sdk#7229 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Regenerate api-augment metadata and TypeScript type definitions from fresh stable2506 runtime binaries built via cargo build --release, crossbuild:mac, and docker:build. Reflects all runtime API and pallet changes from the polkadot-sdk stable2506 upgrade including V16 metadata stabilization (paritytech/polkadot-sdk#8443) and RuntimeEvent removal from pallet Config traits (paritytech/polkadot-sdk#7229). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove unused `pallet_prelude::*` import in pallet-bucket-nfts (leftover from RuntimeEvent removal in paritytech/polkadot-sdk#7229) - Prefix unused `relay_network_service` and `relay_req_receiver` variables with underscore (new return values from build_relay_chain_interface in paritytech/polkadot-sdk#8072) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace `<T as pallet::Config>::RuntimeEvent` with `<T as frame_system::Config>::RuntimeEvent` in all benchmark files, since RuntimeEvent was removed from pallet Config traits (paritytech/polkadot-sdk#7229) - Add missing 5th argument (SharedTrieCache) to storage benchmark `cmd.run()` calls in node/src/command.rs (paritytech/polkadot-sdk#7556) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
06497f4 to
86546c3
Compare
…stable2506)
The fork-aware transaction pool (fatxpool), now default in stable2506,
has behavioral differences from the old single-state pool that broke
integration tests. All changes are validated against the actual fatxpool
source code in polkadot-sdk.
Rust change (utils.rs):
Detect implicit retraction by fatxpool (polkadot-sdk#5479). When a
second InBlock arrives for a different block hash, log it as an
implicit retraction. fatxpool intentionally suppresses Retracted
events — watchers receive InBlock→InBlock instead.
Test changes:
- transaction-manager: Handle both fatxpool outcomes after reorg
(tx re-included in fork OR returned to pool). Fix skipTo boundary
condition. Handle async cascading invalidation (polkadot-sdk#5496).
- reorg-proof: Dual-path reorg handling for proof and bspConfirmStoring
re-inclusion. Flush seals after reorgs to clear stale InBlock txs.
- reorg-accept-storage-request: Handle MSP accept auto-re-inclusion.
- sync-deletion-catchup: Verify provider root matches on-chain
regardless of whether deletion was reverted or re-included.
- batch-file-deletion-catchup: Force P2P reconnection via
system_addReservedPeer after Docker pause/resume (long pauses kill
gossip connections). Force fatxpool view creation by sealing a post-
sync block via normal gossip (bulk sync notifications are unreliable
per polkadot-sdk README, leaving fatxpool with stale views).
86546c3 to
ce223ae
Compare
…-sdk-2506 # Conflicts: # Cargo.lock # Cargo.toml # api-augment/dist/parachain/interfaces/lookup.js # api-augment/dist/parachain/interfaces/lookup.js.map # api-augment/dist/solochain-evm/interfaces/lookup.js # api-augment/dist/solochain-evm/interfaces/lookup.js.map # api-augment/dist/types/parachain/interfaces/lookup.d.ts # api-augment/dist/types/parachain/interfaces/registry.d.ts # api-augment/dist/types/parachain/interfaces/types-lookup.d.ts # api-augment/dist/types/solochain-evm/interfaces/lookup.d.ts # api-augment/dist/types/solochain-evm/interfaces/registry.d.ts # api-augment/dist/types/solochain-evm/interfaces/types-lookup.d.ts # api-augment/metadata-sh-parachain.json # api-augment/metadata-sh-solochain-evm.json # api-augment/package.json # api-augment/src/parachain/interfaces/lookup.ts # api-augment/src/parachain/interfaces/types-lookup.ts # api-augment/src/solochain-evm/interfaces/lookup.ts # api-augment/src/solochain-evm/interfaces/types-lookup.ts # bun.lock # types-bundle/package.json
P2P gossip reconnects naturally after Docker pause/resume — the addReservedPeer + peer polling was unnecessary. The post-sync seal for fatxpool view creation is sufficient.
- Replace template literal without interpolation with string literal (biome lint error in reorg-proof.test.ts) - Remove unused onChainBspForestRootBefore variable (TS6133) - Replace nonexistent isFileInFileSystem call with pendingStorageRequestsByMsp check (TS2339) - Bump api-augment version to 0.5.1
c1db7c9 to
bb228f4
Compare
The Polkadot SDK stable2506 upgrade introduced the fatxpool (Fork-Aware Transaction Pool) which has different timing characteristics during rapid block production. This causes BSP/MSP nodes to fall behind on P2P gossip when tests use skipTo/advanceToBlock to rapidly seal blocks. Root causes identified and fixed: 1. After skipTo, BSPs lag behind the chain tip due to P2P gossip delay. Their forest-write lock queue (proof submissions → confirm-storing → stop-storing-insolvent → confirm-stop-storing) blocks lower-priority actions until the BSP catches up. 2. The fatxpool's maintain() needs block production to process gossiped transactions. Without continuous block sealing, BSPs cannot progress through their internal queues. 3. Reactive extrinsics (MSP stop-storing) can arrive at different times and get spread across multiple blocks, so assertions that check for all events in a single block's system.events() may miss them. New test utilities (test/util/bspNet/waits.ts): - drainBspBacklog: Drains accumulated proof/charge backlog by sealing blocks, using runtime API (getNextTickToSubmitProofFor) for deterministic proof detection. Supports stopOnMethod to avoid consuming target extrinsics. - waitForExtrinsicAndSeal: Continuously seals blocks while polling for a target extrinsic, keeping the BSP's block-import handler active. Test fixes applied: - storage-delete, multiple-delete: skipTo → nodeCatchUpToChainTip → waitForExtrinsicAndSeal for bspConfirmStopStoring - debt-collection: Sync all 3 BSPs to chain tip before proof assertions - stop-storing-bucket-insolvent-user: Iterative block sealing to accumulate MspStopStoringBucketInsolventUser events across blocks - fisherman/indexer-fishing: BSP sync + drain after skipTo(cooldown) and skipTo(+100) - sync-deletion-catchup: Extra seal after MSP response for BSP gossip - batchStorageRequests helper: Increased volunteer timeout to 30s - multi-volunteer-3: Increased timeout to 60s for 9-volunteer assertion - bsp-thresholds, reorg-proof: Extra seals after skipTo for BSP sync
d490dd1 to
b05e4e7
Compare
…-sdk-2506 # Conflicts: # bun.lock
Reverted all fatxpool-related test changes to determine which CI failures are genuine regressions vs pre-existing flakes. All tests pass locally with zero test modifications — CI will reveal which tests need hardening for slower hardware.
The polkadot-sdk stable2506 CLI defaults --pool-type to fork-aware (ForkAwareTxPool). This pool maintains per-block "views" and processes them via async maintain() calls. During rapid manual-seal block production in tests, maintain() can't keep up — it skips 60-77% of NewBestBlock events. The block proposer queries ready_at_with_timeout() which finds no view for the current block and returns an empty transaction set, building empty blocks even when transactions exist in the mempool. This is a known upstream issue (paritytech/polkadot-sdk#10104), fixed in stable2512 via PR #10106 which auto-enforces SingleState pool for instant-seal nodes. Fix: add --pool-type=single-state to the test node container startup. The SingleState pool (BasicPool) uses a single transaction graph with no per-block views, so ready() always returns available transactions immediately regardless of block production speed. Also reverts the fatxpool-specific test adaptations (transaction watcher changes, extra seals, etc.) that are no longer needed with the correct pool type, restoring tests to their main branch versions.
All 5 adapted test files explicitly reference fatxpool behavior (polkadot-sdk#5479). With --pool-type=single-state (BasicPool), these adaptations are unnecessary — BasicPool doesn't have the view-based architecture or suppressed Retracted events.
…nerator The previous commit added the flag only to docker.ts (programmatic API), but test nodes are started via docker-compose templates and the dynamic service generator — not docker.ts. Add the flag everywhere --sealing=manual appears.
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.
Upgrade all polkadot-sdk git dependencies from branch
stable2503tostable2506. Upgrade all Frontier EVM dependencies from branchstable2503to tagfrontier-stable2506. Frontier still points to polkadot-sdk branch dependencies, so we cannot use tags yet.Upstream breaking changes addressed:
AccountIdForalias, now provided byframe_system::pallet_prelude[FRAME] Simplify pallet config definition: remove
RuntimeEventassociated type paritytech/polkadot-sdk#7229RelayParentOffset = ConstU32<0>to parachain system configAllow building on older relay parents paritytech/polkadot-sdk#8299
Outcomeenum pattern matching:Erroris now tuple variant wrappingInstructionErrorMake
WeightBoundsreturnXcmErrorto surface failures paritytech/polkadot-sdk#8535RuntimeEventfrompallet_evm::Configandpallet_ethereum::Config(frontier stable2506)RuntimeEventtopallet_session::historical::ConfigPassByInnerimport, use.0forH256inner accessRefactor the host <-> runtime interface machinery paritytech/polkadot-sdk#7375
build_relay_chain_interfaceRFC-0008: Store parachain bootnodes in the relay chain DHT paritytech/polkadot-sdk#8072
metricsfield toBuildNetworkParamsparachain informant paritytech/polkadot-sdk#8332
prometheus_registrytoStartRelayChainTasksParamsparachain informant paritytech/polkadot-sdk#8332
Retractedevents are intentionally suppressed (fatxpool: add retracted event paritytech/polkadot-sdk#5479). Watchers receive a secondInBlockwith a different block hash instead.fatxpool: view revalidation shall revalidate futures transactions paritytech/polkadot-sdk#5496). Dropping nonce N does not synchronously invalidate nonce N+1.Retractedevents in fatxpool (currently open, not in any stable release). Once landed, the implicit retraction detection added here can be replaced with explicitRetractedhandling.Future work:
Stabilize the FRAME umbrella crate paritytech/polkadot-sdk#8470
impl_runtime_apis!with pallet view functions#[pallet::view_function]Stabilize pallet view functions paritytech/polkadot-sdk#7960
Short description: Upgraded polkadot-sdk dependencies to branch
stable2506and the frontier dependencies to tagfrontier-stable2506. The default transaction pool is now fatxpool (fork-aware), which changes reorg behavior.Who is affected: Any runtimes and clients using the storage hub pallets and storage hub libraries respectively. Integration tests that depend on
Retractedtransaction status events or deterministic pool behavior after reorgs.Suggested code changes: Update runtime and client dependencies. For reorg-related test logic, check on-chain state after reorgs instead of assuming the transaction returns to the pool — fatxpool may auto-re-include it in the fork block.