referrerpolicy=no-referrer-when-downgrade

Constant bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE

pub const EXTRA_STORAGE_PROOF_SIZE: u32 = 1024; // 1_024u32
Expand description

Number of extra bytes (excluding size of storage value itself) of storage proof, built at Polkadot-like chain. This mostly depends on number of entries in the storage trie. Some reserve is reserved to account future chain growth.

To compute this value, we’ve synced Kusama chain blocks [0; 6545733] to see if there were any significant changes of the storage proof size (NO):

  • at block 3072 the storage proof size overhead was 579 bytes;
  • at block 2479616 it was 578 bytes;
  • at block 4118528 it was 711 bytes;
  • at block 6540800 it was 779 bytes.

The number of storage entries at the block 6546170 was 351207 and number of trie nodes in the storage proof was 5 (log(16, 351207) ~ 4.6).

So the assumption is that the storage proof size overhead won’t be larger than 1024 in the nearest future. If it’ll ever break this barrier, then we’ll need to update this constant at next runtime upgrade.