Skip to main content

MAX_SUBSCRIPTION_LIST_BYTES

Constant MAX_SUBSCRIPTION_LIST_BYTES 

Source
pub const MAX_SUBSCRIPTION_LIST_BYTES: i64 = _; // 32_768i64
Expand description

Upper bound on the serialized subscription list a host may report from __frnt__delegate__list_subscriptions_len, in bytes — 32 KiB, i.e. 1024 contract ids.

This exists because the delegate allocates on the strength of that number. An allocation failure inside a delegate is an abort, not a value we can return, so an implausible length has to be refused before vec![0u8; len] rather than survived afterwards. A delegate holding a thousand subscriptions is already well outside the intended shape.