Skip to content

Added OnNewHead to pallet-bridge-parachains#8531

Merged
bkontur merged 6 commits intomasterfrom
bko-bridges-onnewhead
May 14, 2025
Merged

Added OnNewHead to pallet-bridge-parachains#8531
bkontur merged 6 commits intomasterfrom
bko-bridges-onnewhead

Conversation

@bkontur
Copy link
Contributor

@bkontur bkontur commented May 14, 2025

Relates to: #8326
Relates to: #6675

(Extracted from #8325)

This PR introduces a new OnNewHead hook for pallet-bridge-parachains, which is triggered when a new parachain head is relayed.

It will be used in conjunction with the syncing mechanism, which sends relayed AssetHubRococo headers with state_roots to AssetHubWestend for message proof verification.

@bkontur bkontur added the T15-bridges This PR/Issue is related to bridges. label May 14, 2025
@paritytech-review-bot paritytech-review-bot bot requested a review from a team May 14, 2025 08:35
@bkontur
Copy link
Contributor Author

bkontur commented May 14, 2025

/cmd prdoc --audience runtime_dev --bump major

@bkontur bkontur enabled auto-merge May 14, 2025 09:55
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/15017732333
Failed job name: build-rustdoc

@bkontur bkontur added this pull request to the merge queue May 14, 2025
Merged via the queue into master with commit bf143d4 May 14, 2025
245 of 249 checks passed
@bkontur bkontur deleted the bko-bridges-onnewhead branch May 14, 2025 12:40
fellowship-merge-bot bot pushed a commit to polkadot-fellows/runtimes that referenced this pull request Aug 7, 2025
This brings in `stable2506` Polkadot SDK, and integrates many new
features.

Integrated breaking changes to be verified by the original authors:

- [x] ~paritytech/polkadot-sdk#8127 @kianenigma
@Ank4n~
     This will come in with AHM, and not before.
- [x] paritytech/polkadot-sdk#7597 @gui1117 
- [x] paritytech/polkadot-sdk#8254 @bkchr 
- [x] paritytech/polkadot-sdk#7592 @bkontur 
- [x] paritytech/polkadot-sdk#8382
@UtkarshBhardwaj007
- [x] paritytech/polkadot-sdk#8021 @serban300 
- [x] paritytech/polkadot-sdk#8344 @serban300 
- [x] paritytech/polkadot-sdk#8262 @athei 
- [x] paritytech/polkadot-sdk#8584 @athei 
- [x] paritytech/polkadot-sdk#8299 @skunert
- [x] paritytech/polkadot-sdk#8652 @pgherveou 
- [x] paritytech/polkadot-sdk#8554 @pgherveou 
- [x] paritytech/polkadot-sdk#8281 @mrshiposha 
- [x] paritytech/polkadot-sdk#7730
@franciscoaguirre
- [x] paritytech/polkadot-sdk#8599 @yrong
@claravanstaden
- [x] paritytech/polkadot-sdk#8531 @bkontur 
- [x] paritytech/polkadot-sdk#8409 @kianenigma 
- [x] paritytech/polkadot-sdk#9137
@franciscoaguirre
- [x] paritytech/polkadot-sdk#7944 @bkontur 
- [x] paritytech/polkadot-sdk#8179 @bkontur 
- [x] paritytech/polkadot-sdk#8037 @yrong

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: claravanstaden <[email protected]>
Co-authored-by: Branislav Kontur <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Alain Brenzikofer <[email protected]>
Co-authored-by: kianenigma <[email protected]>
Co-authored-by: Francisco Aguirre <[email protected]>
Co-authored-by: ron <[email protected]>
Co-authored-by: joe petrowski <[email protected]>
Co-authored-by: Overkillus <[email protected]>
manuelmauro added a commit to moonbeam-foundation/moonbeam that referenced this pull request Oct 10, 2025
This adds the required OnNewHead configuration parameter introduced in paritytech/polkadot-sdk#8531
alvicsam pushed a commit that referenced this pull request Oct 17, 2025
Relates to: #8326
Relates to: #6675

(Extracted from #8325)

This PR introduces a new `OnNewHead` hook for
`pallet-bridge-parachains`, which is triggered when a new parachain head
is relayed.

It will be used in conjunction with the [syncing
mechanism](#8326), which
sends relayed AssetHubRococo headers with `state_root`s to
AssetHubWestend for message proof verification.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
RomarQ added a commit to moonbeam-foundation/moonbeam that referenced this pull request Nov 26, 2025
* chore: ⬆️ upgrade dependencies to 2506

* refactor: 🚨 use workspace dependencies in pallet crowdloan rewards

* chore: 📌 depend on crates.io ethereum (similarly to frontier)

* fix: 🐛 remove PassByCodec

PassByCodec was replaced by PassFatPointerAndDecode in paritytech/polkadot-sdk@1cb22ca

* fix: 🐛 use Weight::MAX instead of Weight::max_value()

* fix: 🐛 add TrieCacheContext parameter to state_at

* fix: 🐛 add missing relay_parent_descendants and collator_peer_id fields to ParachainInherentData

* fix: 🐛 remove deprecated AssetHubMigrationStarted config

* fix: 🐛 update ExecuteXcm::prepare() to accept weight_limit parameter

* fix: 🐛 add generic parameters to Sha3FIPS256<Runtime, ()>

* fix: 🐛 add metrics field to BuildNetworkParams

* chore: 📌 upgrade pins

* fix: 🐛 add OnNewHead to bridge parachain configs

This adds the required OnNewHead configuration parameter introduced in paritytech/polkadot-sdk#8531

* fix: 🐛 add relay chain slot duration to FixedVelocityConsensusHook

* fix: 🐛 add SlotDuration trait items

Upstream PR: Moonsong-Labs/moonkit#83 - "Use PostInherents to validate timestamp"   - Author: Rodrigo Quelhas (RomarQ)   - Merged: September 30, 2025    Details: This trait item is used in the PostInherents validation to ensure that the configured block time in the node and runtime is compatible with Nimbus's consensus mechanism.   The value is set to MILLISECS_PER_BLOCK (12000ms for Moonbeam), matching the parachain's block production time. This change prepares for Polkadot SDK updates that deprecated the   CheckInherents parameter in favor of PostInherents validation.

* fix: 🐛 add RelayParentOffset trait item

Upstream PR: paritytech/polkadot-sdk#8299 - "Allow building on older relay parents"   - Author: Sebastian Kunert (skunert)   - Merged: May 29, 2025    Details: With an offset of 0, blocks are built on the current relay chain tip. Non-zero values allow building on older relay parents (e.g., offset of 2 means building 2 blocks   behind the tip) to avoid building on short-lived relay chain forks. The runtime enforces this offset by requiring multiple relay parent descendants to be present in the   set_validation_data inherent.

* fix: 🐛 refactor build_relay_chain_interface to return only required tuple elements

* fix: 🐛 fixed RuntimeOrigin trait bounds by removing From<Option<AccountId>> bound

Fixed RuntimeOrigin trait bounds - Removed From<Option<AccountId>> bound and updated all precompiles to use frame_system::RawOrigin::Signed().into()

* fix: 🐛 update cumulus_pallet_xcmp_queue WeightInfo methods

* fix: 🐛 fix AccountId ambiguity

Added proper type qualifications and EncodeLike trait bound in crowdloan-rewards precompile

* fix: 🐛 use QueueFootprintQuery trait for message queue footprint method

paritytech/polkadot-sdk#8021

* fix: 🐛 remove deprecated RuntimeEvent

* fix: 🐛 update the runtime interface to use explicit marshalling strategies

PR #7375 - Host/Runtime Interface Refactoring   🔗 paritytech/polkadot-sdk#7375

* fix: 🐛 do not enable SharedTrieCache

* fix: 🐛 implement BenchmarkHelper

* fix: 🐛 remove PalletTransactionPaymentBenchmark

* fix: 🐛 add missing crate in Cargo feature

* fix: 🐛 remove RuntimeEvent associated type

Polkadot SDK changes: paritytech/polkadot-sdk#7229

* fix: 🐛 remove unused imports

* fix: 🐛 remove RuntimeEvent associated type

* fix: 🐛 remove AssetHubMigrationStarted associated type

* fix: 🐛 add RelayParentOffset associated type

* fix: 🐛 add metrics_registry: None to database configuration

* fix: 🐛 add warm_up_trie_cache: None to service configuration

* fix: 🐛 fix reference to deprecated RuntimeEvent associated type

* fix: 🐛 update WeightBounds trait API

* fix: 🐛 add missing fields to ParachainInherentData

* fix: 🐛 add missing associated types to Runtime

* fix: 🐛 replace `Fail(Option<T::Hash>, XcmError)` with `Fail(Option<T::Hash>, InstructionError)`

* style: 🎨 format code

* fix: 🐛 fix `XcmExecutor::prepare` args

* fix: 🐛 impl create_bare from CreateInherent trait

* fix: 🐛 mock BenchmarkHelper

* fix: ⬆️ upgrade frame-metadata

* chore: ⬆️ upgrade polkadot-sdk

* fix: 🐛 silence warning

* style: 🚨 mark args as unused

* fix: 🐛 fix deprecation warning

* style: 🎨 format code

* test: 🐛 update snapshot

* chore: 📌 update pins

* refactor: ♻️ move lint directive to root Cargo.toml

* chore: ⚡ run benchmarks

* chore: ⚡ run benchmarks

* test: ✅ assert specific error type

* test: ✅ use proper assert_noop!

* test: ✅ use new extrinsic for asset transfers using explicit XCM transfer types

paritytech/polkadot-sdk#3695

* fix: 🐛 pin udeps Rust nightly version

* Revert "fix: 🐛 pin udeps Rust nightly version"

This reverts commit 09e6d03.

* fix: 🐛 fix some Cargo.toml features

* revert: 🔥 remove AssetHubMigrationStarted storage flag

* refactor: 🔥 remove unused import

* fix: 🐛 add missing feature flags for pallet-assets dependency

* refactor: 🚨 remove duplicated feature flags

* revert: 🔥 delete file committed by mistake

* fix: 📌 properly pin polkadot-sdk version

* test: ✅ initialize ParachainSystem HostConfiguration in runtime tests

The ParentAsUmp XCM router now validates upward messages by checking   HostConfiguration, which was previously uninitialized in test environments,   causing ErrorValidating and SendFailure errors.

* update polkadot-sdk pin

* update polkadot-sdk pin

* fix unit tests

* update polkadot-sdk pin

* fix check-unused-dependencies

* fix test

* refactor: ♻️ remove IdentityBenchmarkHelper

* Revert "refactor: ♻️ remove IdentityBenchmarkHelper"

This reverts commit b872ee4.

* revert: ⏪ restore pallet_transaction_payment

* test: ✅ update tests call_pallet_xcm_with_fee

* refactor: ♻️ add mock_abridged_host_config function

* fix pallet-identity benchmarks

* fix: 🐛 add helper function to set up XCM router for benchmarks

* fix: 🐛 add custom delivery helper for Moonbeam

* chore: 🔧 update weights

* style: 🎨 keep original name TestDeliveryHelper

* fix pallet-randomness benchmarks

* Revert "chore: 🔧 update weights"

This reverts commit ea91959.

* test: ✅ update snapshots

---------

Co-authored-by: Rodrigo Quelhas <[email protected]>
Co-authored-by: Rodrigo Quelhas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T15-bridges This PR/Issue is related to bridges.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants