Skip to main content

Module features

Module features 

Source
Expand description

Compile-time feature registry namespace.

This module owns the features namespace: each feature name the runtime understands is declared here as a pub const &'static str handle, and KNOWN_FEATURES lists every one of them.

Sibling tables (e.g. the builtin-upgrade registry, the compute-budget gating table) carry their own compile-time assertions that every feature_name they reference is a member of KNOWN_FEATURES.

Constants§

ENABLE_STAKE_INFO_V2
Enables the StakeInfo schema version 2 on-disk layout.
KNOWN_FEATURES
Every feature name the runtime knows about.
TEST_AUTHORITY_PROBE_1
Probe features for the authority-transfer demonstrator. Gate no runtime behaviour; the authority-transfer CLI test enables them to prove that a feature can be activated before/after an authority transfer (and that the old authority can no longer activate features after the transfer).
TEST_AUTHORITY_PROBE_2
See TEST_AUTHORITY_PROBE_1.
TEST_GATED_SYSCALL
Enables the rlo_test_gated system call at link time.
TEST_SCHEDULED
Standalone target for the scheduled-activation demonstrator.
TEST_SCHEDULED_CANCEL
Target for the schedule-cancellation demonstrator. Gates no runtime behaviour; the test ScheduleEnables it, then Cancels the pending request and confirms it never activates. Registered (like the others) so that, were the cancel to fail and the schedule to fire, the resulting active set would still be a subset of KNOWN_FEATURES and not halt the node.
TEST_UPGRADE_BUILTIN_V1
Enables version 1 (the baseline) of the test-upgrade demonstrator builtin.
TEST_UPGRADE_BUILTIN_V2
Enables version 2 of the test-upgrade demonstrator builtin.

Functions§

const_str_eq
Const-evaluable string equality.
is_known_feature
Returns true if name appears in KNOWN_FEATURES.