I've been looking into Cumulus SDK's parachain and XCM handling functions in XcmpQueue to handle XCM protocol functions such as sending an XCM message with send_xcm(). I noticed that there's a message size limit check when sending the XCM message with send_xcm() but I did not see any message size limit check when handling the inbound XCM messages.

My question is, what prevents a malicious user to write their own send_xcm() and spam large messages to block the queue? Is there an inherent message size limit in XCMP?

1 Answer 1


There is an enforced message size limit on the Polkadot side.

Right now all XCM messages passed between Parachains are transported via HRMP (horizontal message passing). This involves passing the message up to the relay chain, which then forwards the message back down to another parachain.

The relay chain simply drops any parachain block containing an oversized message. The message would never reach its destination. So you can’t spam another parachain with large messages in the way you suggested.

ump::Pallet::check_upward_messages does this. The max size is currently 102_400 bytes per message as set in the HostConfiguration in Polkadot’s chain spec.

When a message passing protocol other than HRMP is implemented for XCM, that protocol will need to mimic the size limiting that already takes place in HRMP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.