Limit the maximum size of a downward message (#1690)

This commit is contained in:
Sergei Shulepov authored and GitHub committed 2020-09-10 15:39:55 +00:00
1 parent f3abba15c6
commit e40ec81685
3 files changed
+11 -1

No files matched your search

@@ -260,6 +260,7 @@ any of dispatchables return an error.
Utility routines.
`queue_downward_message(P: ParaId, M: DownwardMessage)`:
1. Check if the serialized size of `M` exceeds the `config.critical_downward_message_size`. If so, return an error.
1. Wrap `M` into `InboundDownwardMessage` using the current block number for `sent_at`.
1. Obtain a new MQC link for the resulting `InboundDownwardMessage` and replace `DownwardMessageQueueHeads` for `P` with the resulting hash.
1. Add the resulting `InboundDownwardMessage` into `DownwardMessageQueues` for `P`.