Skip to main content

Module ns_table

Module ns_table 

Source
Expand description

This module provides helpers for namespace table.

Constantsยง

NS_ID_BYTE_LEN ๐Ÿ”’
NS_OFFSET_BYTE_LEN ๐Ÿ”’
NUM_NSS_BYTE_LEN ๐Ÿ”’
Byte lengths for the different items that could appear in a namespace table.

Functionsยง

ns_table_offsets ๐Ÿ”’
The namespace end offsets bytes encodes, in order. None if bytes is not a namespace table: too short, an entry count that disagrees with its length, or offsets that decrease.
ns_table_payload_byte_len
The payload length bytes claims to be the namespace table of: its final offset, or zero for a table with no entries. None if bytes is not a namespace table at all.
parse_ns_table
Helper function for AvidM scheme to parse a namespace table. If the namespace table is invalid, it returns a default single entry namespace table. For details, please refer to block/full_payload/ns_table.rs in the sequencer crate.
single_ns_table ๐Ÿ”’