Skip to content

ParaSessionInfo


Storage functions


AccountKeys

The validator account keys of the validators actively participating in parachain consensus.

Python

result = substrate.query(
    'ParaSessionInfo', 'AccountKeys', ['u32']
)

Return value

['AccountId']

AssignmentKeysUnsafe

Assignment keys for the current session. Note that this API is private due to it being prone to 'off-by-one' at session boundaries. When in doubt, use Sessions API instead.

Python

result = substrate.query(
    'ParaSessionInfo', 'AssignmentKeysUnsafe', []
)

Return value

['[u8; 32]']

EarliestStoredSession

The earliest session for which previous session info is stored.

Python

result = substrate.query(
    'ParaSessionInfo', 'EarliestStoredSession', []
)

Return value

'u32'

SessionExecutorParams

Executor parameter set for a given session index

Python

result = substrate.query(
    'ParaSessionInfo', 'SessionExecutorParams', ['u32']
)

Return value

[
    {
        None: None,
        'MaxMemoryPages': 'u32',
        'PrecheckingMaxMemory': 'u64',
        'PvfExecTimeout': (('Backing', 'Approval'), 'u64'),
        'PvfPrepTimeout': (('Precheck', 'Prepare'), 'u64'),
        'StackLogicalMax': 'u32',
        'StackNativeMax': 'u32',
        'WasmExtBulkMemory': None,
    },
]

Sessions

Session information in a rolling window. Should have an entry in range EarliestStoredSession..=CurrentSessionIndex. Does not have any entries before the session index in the first session change notification.

Python

result = substrate.query(
    'ParaSessionInfo', 'Sessions', ['u32']
)

Return value

{
    'active_validator_indices': ['u32'],
    'assignment_keys': ['[u8; 32]'],
    'discovery_keys': ['[u8; 32]'],
    'dispute_period': 'u32',
    'n_cores': 'u32',
    'n_delay_tranches': 'u32',
    'needed_approvals': 'u32',
    'no_show_slots': 'u32',
    'random_seed': '[u8; 32]',
    'relay_vrf_modulo_samples': 'u32',
    'validator_groups': [['u32']],
    'validators': ['[u8; 32]'],
    'zeroth_delay_tranche_width': 'u32',
}