paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.com/
1.89k stars 696 forks source link

`EthereumBlobExporter` should not consume `dest/msg` when returning `NotApplicable` #5788

Closed bkontur closed 1 month ago

bkontur commented 1 month ago

For example, here, a .take clears dest:

let dest = destination.take().ok_or(SendError::MissingArgument)?;
if dest != Here {
    log::trace!(target: "xcm::ethereum_blob_exporter", "skipped due to unmatched remote destination {dest:?}.");
    return Err(SendError::NotApplicable);
}

According to this, when returning NotApplicable, the exporter should not modify the input values, as this would prevent appending more exporters after this router in the tuple for xcm_executor::Config::MessageExporter.

I fixed something similar for other exporters here: https://github.com/paritytech/polkadot-sdk/pull/1519.

Note: This is not a crucial issue unless we are aware of it. However, if we don't fix it, we won't be able to append more exporters after EthereumBlobExporter.

TODO