Skip to content

refactor: Bundle SystemMetadata subnet fields into OwnSubnetInfo struct#10638

Open
alin-at-dfinity wants to merge 2 commits into
alin/move-api_boundary_nodes-into-NetworkTopologyfrom
alin/bundle-OwnSubnetInfo
Open

refactor: Bundle SystemMetadata subnet fields into OwnSubnetInfo struct#10638
alin-at-dfinity wants to merge 2 commits into
alin/move-api_boundary_nodes-into-NetworkTopologyfrom
alin/bundle-OwnSubnetInfo

Conversation

@alin-at-dfinity

Copy link
Copy Markdown
Contributor

Bundle SystemMetadata fields own_subnet_features, own_resource_limits and node_public_keys into an OwnSubnetInfo struct, in preparation for easy reuse across ReplicatedStates when using the same registry version.

…struct

Bundle `SystemMetadata` fields `own_subnet_features`, `own_resource_limits` and `node_public_keys` into an `OwnSubnetInfo` struct, in preparation for easy reuse across `ReplicatedStates` using the same registry version.
@alin-at-dfinity alin-at-dfinity requested a review from a team as a code owner July 2, 2026 14:20
@zeropath-ai

zeropath-ai Bot commented Jul 2, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 4b3050a.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/canonical_state/src/lazy_tree_conversion.rs
    Use own_subnet_info.node_public_keys instead of node_public_keys
Enhancement ► rs/canonical_state/src/traversal.rs
    Modify test to update own_subnet_info.node_public_keys via Arc::make_mut
Enhancement ► rs/execution_environment/src/execution_environment.rs
    Switch from own_subnet_features.http_requests to state.subnet_features().http_requests
Enhancement ► rs/execution_environment/src/execution_environment/tests.rs
    Update tests to mutate own_subnet_info.subnet_features.http_requests via Arc::make_mut
Enhancement ► rs/execution_environment/src/scheduler/tests/metrics.rs
    Update tests to mutate own_subnet_info.subnet_features.http_requests via Arc::make_mut
Enhancement ► rs/messaging/src/message_routing.rs
    Replace returned tuple types to use OwnSubnetInfo; update read_registry/read flow accordingly
Enhancement ► rs/messaging/src/state_machine.rs
    Adapt StateMachine trait and implementation to use OwnSubnetInfo; remove direct node_public_keys usage
Enhancement ► rs/messaging/src/state_machine/tests.rs
    Update tests to pass OwnSubnetInfo instead of separate subnet_features/resource_limits/node_public_keys
Enhancement ► rs/protobuf/def/state/metadata/v1/metadata.proto
    Add OwnSubnetInfo message and own_subnet_info field; deprecate direct fields
Enhancement ► rs/protobuf/src/gen/state/state.metadata.v1.rs
    Add OwnSubnetInfo struct; adjust SystemMetadata to hold own_subnet_info instead of individual fields
Enhancement ► rs/replicated_state/src/lib.rs
    Expose OwnSubnetInfo in public API instead of separate fields
Enhancement ► rs/replicated_state/src/metadata_state.rs
    Replace own_subnet_features/own_resource_limits/node_public_keys with own_subnet_info: Arc
Enhancement ► rs/replicated_state/src/replicated_state.rs
    Add subnet_features()/resource_limits() accessors delegating to own_subnet_info
Enhancement ► rs/state_manager/src/tree_hash.rs
    Initialize node_public_keys via own_subnet_info in tests
Enhancement ► rs/state_manager/tests/state_manager.rs
    Mutate node_public_keys via own_subnet_info in tests
Enhancement ► rs/test_utilities/execution_environment/src/lib.rs
    Prepare and mutate own_subnet_info for subnet_features adjustments
Enhancement ► rs/test_utilities/state/src/lib.rs
    Mutate own_subnet_info.subnet_features instead of direct field
Enhancement ► rs/replicated_state/src/metadata_state/proto.rs
    Implement From/TryFrom for OwnSubnetInfo; adjust serialization to reflect new structure
Enhancement ► rs/replicated_state/src/metadata_state/proto.rs
    Handle backward-compatibility for missing own_subnet_info when reading older checkpoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant