cumulus icon indicating copy to clipboard operation
cumulus copied to clipboard

runtime integration test don't initialize pallets

Open slumber opened this issue 2 years ago • 3 comments

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 avatar Jun 07 '23 15:06 slumber

cc @muharem

slumber avatar Jun 07 '23 15:06 slumber

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:

  • Add AuraExt to the pallets_extra field for the macro for each runtime and ensure it is initialized
  • Alter the macro to initialize all pallets

rphmeier avatar Jun 07 '23 15:06 rphmeier

  • Alter the macro to initialize all pallets

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

bkchr avatar Jun 07 '23 16:06 bkchr