Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Increase recusive limits for macro expansions #7401

Closed
wants to merge 14 commits into from
366 changes: 183 additions & 183 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
//! The Kusama runtime. This can be compiled with `#[no_std]`, ready for Wasm.

#![cfg_attr(not(feature = "std"), no_std)]
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
#![recursion_limit = "256"]
// `construct_runtime!` does a lot of recursion and requires us to increase the limit.
#![recursion_limit = "512"]

use pallet_nis::WithMaximumOf;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
Expand Down Expand Up @@ -1145,6 +1145,7 @@ impl pallet_message_queue::Config for Runtime {
type MessageProcessor =
pallet_message_queue::mock_helpers::NoopMessageProcessor<AggregateMessageOrigin>;
type QueueChangeHandler = ParaInclusion;
type QueuePausedQuery = ();
type WeightInfo = weights::pallet_message_queue::WeightInfo<Runtime>;
}

Expand Down
1 change: 1 addition & 0 deletions runtime/parachains/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ impl pallet_message_queue::Config for Test {
type WeightInfo = TestMessageQueueWeight;
type MessageProcessor = TestProcessMessage;
type QueueChangeHandler = ParaInclusion;
type QueuePausedQuery = ();
type HeapSize = ConstU32<65536>;
type MaxStale = ConstU32<8>;
type ServiceWeight = MessageQueueServiceWeight;
Expand Down
12 changes: 10 additions & 2 deletions runtime/parachains/src/ump_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,13 +573,21 @@ fn overweight_queue_works() {
.into(),
);

// ... and if we try to service a message with index that doesn't exist it will error
// out.
// But servicing again will not work.
assert_noop!(
<MessageQueue as ServiceQueues>::execute_overweight(
Weight::from_parts(501, 501),
(Ump(UmpQueueId::Para(para_a)), 0, 2)
),
ExecuteOverweightError::AlreadyProcessed,
);

// And using an invalid index does not work.
assert_noop!(
<MessageQueue as ServiceQueues>::execute_overweight(
Weight::from_parts(501, 501),
(Ump(UmpQueueId::Para(para_a)), 0, 3)
),
ExecuteOverweightError::NotFound,
);
});
Expand Down
3 changes: 2 additions & 1 deletion runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#![cfg_attr(not(feature = "std"), no_std)]
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
#![recursion_limit = "256"]
#![recursion_limit = "512"]

use pallet_transaction_payment::CurrencyAdapter;
use runtime_common::{
Expand Down Expand Up @@ -1161,6 +1161,7 @@ impl pallet_message_queue::Config for Runtime {
type MessageProcessor =
pallet_message_queue::mock_helpers::NoopMessageProcessor<AggregateMessageOrigin>;
type QueueChangeHandler = ParaInclusion;
type QueuePausedQuery = ();
type WeightInfo = weights::pallet_message_queue::WeightInfo<Runtime>;
}

Expand Down
5 changes: 3 additions & 2 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
//! The Rococo runtime for v1 parachains.

#![cfg_attr(not(feature = "std"), no_std)]
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
#![recursion_limit = "256"]
// `construct_runtime!` does a lot of recursion and requires us to increase the limit.
#![recursion_limit = "512"]

use pallet_nis::WithMaximumOf;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
Expand Down Expand Up @@ -1076,6 +1076,7 @@ impl pallet_message_queue::Config for Runtime {
type MessageProcessor =
pallet_message_queue::mock_helpers::NoopMessageProcessor<AggregateMessageOrigin>;
type QueueChangeHandler = ParaInclusion;
type QueuePausedQuery = ();
type WeightInfo = weights::pallet_message_queue::WeightInfo<Runtime>;
}

Expand Down
1 change: 1 addition & 0 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ impl pallet_message_queue::Config for Runtime {
type MessageProcessor =
pallet_message_queue::mock_helpers::NoopMessageProcessor<AggregateMessageOrigin>;
type QueueChangeHandler = ParaInclusion;
type QueuePausedQuery = ();
type WeightInfo = weights::pallet_message_queue::WeightInfo<Runtime>;
}

Expand Down
1 change: 1 addition & 0 deletions xcm/xcm-simulator/example/src/relay_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ impl pallet_message_queue::Config for Runtime {
type ServiceWeight = MessageQueueServiceWeight;
type MessageProcessor = MessageProcessor;
type QueueChangeHandler = ();
type QueuePausedQuery = ();
type WeightInfo = ();
}

Expand Down
1 change: 1 addition & 0 deletions xcm/xcm-simulator/fuzzer/src/relay_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ impl pallet_message_queue::Config for Runtime {
type MessageProcessor =
pallet_message_queue::mock_helpers::NoopMessageProcessor<AggregateMessageOrigin>;
type QueueChangeHandler = ();
type QueuePausedQuery = ();
type WeightInfo = ();
}

Expand Down