Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ⏫ upgrade to Polkadot SDK v1.13.0 #216

Merged
merged 37 commits into from
Oct 7, 2024
Merged

Conversation

TDemeco
Copy link
Contributor

@TDemeco TDemeco commented Oct 4, 2024

This PR replaces #214 since that branch got messed up when merging from main

This PR includes all changes from Polkadot SDK v1.11.0 to v1.12.0 and from v1.12.0 to v1.13.0. Those are as following:

v1.11.0 to v1.12.0 - Polkadot SDK Upgrade

  • Changelog for Node Dev:
    • #4442 - Improve relay mock in —dev mode for async backing.
    • #4035 - prospective-parachains rework from trees of unincluded candidates to only maintaining candidate chains (for elastic scaling). No longer are parachain cycles supported.
    • #4329 - Deprecate the native executor
      • Note: removed from StorageHub
    • #4295 - Make parachain template async backing ready (both node and runtime)
      • Note: changed some imports to follow guidance.
  • Changelog for Runtime Dev:
    • #4220 - Refactor XCM Simulator example.
      • Note: our XCM simulator was already done considering this refactor, so no changes have to be made.
    • #3865 - Safeguard consumer reference underflow in pallet-balances.
      • Note: useful to know since we handle holds across the runtime.
      • Note 2: in the tests of this PR they use a “hypothetically!()” macro to execute changes in the runtime that get rolled back afterwards. I did not know about that one and it seems super useful when, from an initial state, you want to test multiple scenarios in a single test.
    • #3872 - Add XcmDryRunApi, a runtime API to dry-run extrinsics and XCM programs. It complementes the previously added XcmPaymentApi as that one required you knowing the actual XCM you wanted to execute or send, but most XCM messages are sent by extrinsics and are unknown to users.
      • Given an extrinsic or XCM program, the runtime API returns its effects:
        • Execution result
        • Local XCM (in the case of an extrinsic)
        • Forwarded XCMs
        • List of events
      • This API can be used on its own for dry-running, double-checking and testing, but it’s most useful in conjunction with the aforementioned XcmPaymentApi
      • Note: added the implementation for these runtime APIs but no tests yet, leftover todo
    • #4281 - Fix to use supported version (instead of latest one) when sending HRMP notifications from the relay chain
    • #4326 - The CheckWeight signed extension now properly checks the combined size of the proof and extrinsic lengths against the PoV size limit instead of verifying them individually.
    • #4034 - Introduction of TypeWithDefault<T, D: Get<T>> type, which allows us to provide a custom default for any type. For example, we could have a nonce type that returns as default the current block number, avoiding the replay of immortal transactions.
      • Note: this could be quite useful, we should keep it in mind
    • #3964 - Add burn extrinsic to pallet-balances to burn tokens from a user.
    • #4461 - Fix extrinsics count logging in frame-system, where the number of extrinsics in the block was always 0 in the log of frame-system
    • #4417 - Remove pallet:getter from mock network message queue
      • Note: XCM simulator uses this but it was already accessing storage directly instead of through the getters, so no changes here.
    • #4592 - Mandatory extrinsics were failing because of CheckWeight. This PR disables CheckWeight if the DispatchClass of the extrinsic is Mandatory
  • Changelog for Node Operator:
    • #3444 - Rate limiting of statement distribution v2 requests, maximum 1 per peer now.
    • #3701 - Add two CLI arguments (—rpc-rate-limit-whitelisted-ips & —rpc-rate-limit-trust-proxy-headers) to disable rate limiting for certain ips and whether to trust proxy headers
    • #4761 - Fixes issue with tree route calculation from genesis when reaching the tip of the parachain.

v1.12.0 to v1.13.0 - Polkadot SDK Upgrade

  • Changelog for Node Dev:
    • #4410 - Remove deprecated code from sc-chain-spec.
      • Note: RuntimeGenesisConfig generic type parameter was removed from GenericChainSpec struct, updated StorageHub accordingly.
    • #4555 - Move para_id to MockValidationDataInherentDataProvider instead of MockXcmConfig.
      • Note: Changes applied to StorageHub’s dev node.
    • #4595 - Removed elastic-scaling-experimental feature flag from collators. Collators of parachains with multiple cores must respond with CollationWithParentHeadData, otherwise with CollationFetchingResponse::Collation.
    • #4198 - Replace Multiaddr & related types with substrate-specific types.
      • Note: small change done in handler to use sc-network-types’s PeerId instead of libp2p-identity one.
  • Changelog for Runtime Dev:
    • #3935 - Introduce Polkadot SDK umbrella crate. This crate basically exports all crates from polkadot-sdk at once, with the features runtime to get the crate’s no-std versions and node to get the std ones (plus a few extra features).
      • Note: worth to take a look, it would clean up our .tomls A LOT. Examples of how to use it in the PR.
    • #3952 - Bound storage for the xcmp-queue pallet, enforcing upper limits for the number of active XCMP channels and outgoing XCMP messages.
      • Note: required changes applied to StorageHub.
    • #4380 - Remove parameterized-consensus-hook feature from the cumulus-pallet-parachain-system crate.
      • Note: removed from StorageHub, we weren’t even using it.
    • #4272 - Introduce CheckMetadataHash signed extension (as described in RFC78).
    • #4634 - Implement XcmPaymentApi and DryRunApi on all system parachains.
      • Note: implemented both runtime APIs on StorageHub.
    • #4249 - Moves Construct Runtime V2 macro out of experimental flag.
      • Note: we should explore it further now that it is stable. Relevant PR #1378.
    • #4475 - Deprecate dmp-queue pallet.
      • Note: removed from StorageHub.
    • #4571 - Disable total PoV size check for mandatory extrinsics (such as inherents), so even if on_initialize reserves a bunch of weight for on_finalize, the mandatory extrinsics can be applied.
      • Note: useful to know since we use a mandatory extrinsic in the randomness pallet.
    • #4621 - Change XcmDryRunApi::dry_run_extrinsic to take a call instead.
      • Note: Required changes done in StorageHub.
    • #4645 - Make all storage items of cumulus-parachain-system public.
      • Note: this means that the leftover critical TODOs of 1.10.0 that came as a result of when they removed the pallet:getters but did not make our required storage items public can finally be solved! Critical TODOs finished.
  • Changelog for Node Operator:
    • #4533 - Fixed RPC subscriptions leak when subcription stream is finished. This happened when, for example, using author_submitAndWatchExtrinsic, so it’s good to know it’s fixed.
    • #4542 - Adds the ability to chain-spec-builder cmd to specify the chain type, defaults to Live.

Copy link
Contributor

@snowmead snowmead left a comment

Choose a reason for hiding this comment

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

Nice! 👍🏼


let para_head_data = HeadData(para_header).encode();
let raw_para_head_data = HeadData(para_header);
let para_head_data = raw_para_head_data.encode();
Copy link
Contributor

Choose a reason for hiding this comment

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

Few too many tabs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's weird, it looks totally normal locally, not sure what happened here

runtime/src/configs/mod.rs Outdated Show resolved Hide resolved
runtime/src/configs/mod.rs Show resolved Hide resolved
runtime/src/configs/mod.rs Show resolved Hide resolved
runtime/src/configs/mod.rs Outdated Show resolved Hide resolved
@TDemeco TDemeco merged commit 6076d78 into main Oct 7, 2024
21 checks passed
@TDemeco TDemeco deleted the update/polkadot-sdk-v1.13.0 branch October 7, 2024 17:24
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