@@ -96,11 +96,10 @@ impl WeightTrader for NoopTrader {
9696 }
9797}
9898
99- // TODO: wrong
10099/// Allows execution from `origin` if it is contained in `AllowedOrigin`
101100/// and if it is just a straight `Transact` which contains any call.
102101///
103- /// That's a 1:1 copy of corresponding Cumulus structure.
102+ /// That's a 1:1 copy of the corresponding Cumulus structure.
104103pub struct AllowUnpaidTransactsFrom < RuntimeCall , AllowedOrigin > (
105104 sp_std:: marker:: PhantomData < ( RuntimeCall , AllowedOrigin ) > ,
106105) ;
@@ -120,6 +119,8 @@ impl<RuntimeCall: Decode, AllowedOrigin: Contains<Location>> ShouldExecute
120119 {:?}" , origin, instructions, max_weight, _properties,
121120 ) ;
122121
122+ // TODO: check if this is enough, because we don't filter `Transact` at all,
123+ // but instead we allow all XCM instruction processing.
123124 // we only allow from configured origins
124125 ensure ! ( AllowedOrigin :: contains( origin) , ProcessMessageError :: Unsupported ) ;
125126
@@ -139,7 +140,8 @@ pub type XcmRouter = LocalExporter<ToBridgeHaulBlobExporter, UniversalLocation>;
139140/// The barriers one of which must be passed for an XCM message to be executed.
140141pub type Barrier = TrailingSetTopicAsId <
141142 WithComputedOrigin <
142- // We only allow unpaid execution from the PeoplePolkadot parachain.
143+ // TODO: check if this is working, I think we executed `Trap` in zombienet with
144+ // `DescendOrigin`. We only allow unpaid execution from the PeoplePolkadot parachain.
143145 AllowUnpaidTransactsFrom < RuntimeCall , OnlyPeoplePolkadotLocation > ,
144146 UniversalLocation ,
145147 ConstU32 < 2 > ,
@@ -213,8 +215,6 @@ impl DispatchBlob for ImmediateXcmDispatcher {
213215 let message: Xcm < RuntimeCall > =
214216 message. try_into ( ) . map_err ( |_| DispatchBlobError :: UnsupportedXcmVersion ) ?;
215217
216- // TODO: security - filter DesendOrigin
217-
218218 log:: trace!(
219219 target: "runtime::xcm" ,
220220 "Going to dispatch XCM message from {:?}: {:?}" ,
@@ -230,6 +230,8 @@ impl DispatchBlob for ImmediateXcmDispatcher {
230230 // execute the XCM program
231231 let mut message_hash = message. using_encoded ( blake2_256) ;
232232 XcmExecutor :: < XcmConfig > :: prepare_and_execute (
233+ // TODO: double-check if this, maybe should be just `Here`, I think we executed `Trap`
234+ // in zombienet with `DescendOrigin`.
233235 PeoplePolkadotLocation :: get ( ) ,
234236 message,
235237 & mut message_hash,
0 commit comments