Skip to main content

StorageShardedKeyEncoded

Type Alias StorageShardedKeyEncoded 

Source
pub type StorageShardedKeyEncoded = [u8; 60];
Expand description

Stack-allocated encoded key for StorageShardedKey.

This avoids heap allocation in hot database paths. The key layout is:

  • 20 bytes: Address
  • 32 bytes: B256 storage key
  • 8 bytes: BlockNumber (big-endian)

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 60 bytes