paritytech / cumulus

Write Parachains on Substrate
GNU General Public License v3.0
617 stars 378 forks source link

runtime integration test don't initialize pallets #2703

Open slumber opened 1 year ago

slumber commented 1 year ago

Tests in question are parachains/integration-tests. @rphmeier suggested the issue is related to https://github.com/paritytech/cumulus/blob/31b1469d830aaa7b0441d4d60f0c0c17be0cf114/xcm/xcm-emulator/src/lib.rs#L417-L420

For instance, explicit panic in aura-ext pallet on initialization isn't triggered. Related to #2658

slumber commented 1 year ago

cc @muharem

rphmeier commented 1 year ago

The issue we were observing was that with the new logic from https://github.com/paritytech/cumulus/pull/2658/, https://github.com/paritytech/cumulus/pull/2501, https://github.com/paritytech/cumulus/pull/2551 , that integration tests for all runtimes began to fail when integrating the new Aura hook, and the root cause of this failure was that AuraExt wasn't initialized before set_validation_data was called.

The change in behavior from these PRs is that ParachainSystem::set_validation_data can now require some other pallets to initialized properly (i.e. when calling the configured ConsensusHook).

I see that the logic in decl_test_parachains is directly invoking on_initialize and set_validation_data, so I see two solutions going forward:

bkchr commented 1 year ago
  • Alter the macro to initialize all pallets

If that isn't done currently, it sounds like the tests are not being setup correctly.