network_node.move

Warning Mud

Warning

CCP will be switching the blockchain for EVE Frontier from the Ethereum Layer 2 to the Sui Blockchain in Q1/2 2026. This will render Mud based development for EVM obsolete, consider this section to be deprecated from October 2025 onwards, the content will likely remain in place for historical reference.

The network_node.move module is a Layer 1 Composable Primitive that manages energy distribution networks within EVE Frontier. It enables assemblies to connect to power sources and facilitates the flow of energy across structures.

1. Core Component Architecture

The module defines the relationship between energy-producing structures and energy-consuming assemblies.

classDiagram
    class NetworkNode {
        +UID id
        +ID energy_source_id
        +bool is_connected
    }
    Note for NetworkNode "Represents a connection point \nto an energy distribution network."

Key Data Structures

  • NetworkNode: A storeable struct embedded within assemblies that require power. It tracks:
    • energy_source_id: The ID of the connected EnergySource.
    • is_connected: A boolean indicating whether the node is actively drawing power.

2. Role in the Architecture

Network nodes serve as the “power cables” of the EVE Frontier universe, linking energy producers to consumers.

flowchart LR
    Producer[Energy Source] --> Node[Network Node]
    Node --> Consumer[Assembly]
    
    subgraph Energy Flow
        Producer -->|Reserves Energy| Node
        Node -->|Powers| Consumer
    end
  • Energy Reservation: When an assembly goes online, its NetworkNode calls the energy.move primitive to reserve the required power from the connected source.
  • Energy Release: When the assembly goes offline, the reserved energy is released back to the source.

3. Integration with Assemblies

As a Layer 1 Primitive, network_node is composed into Layer 2 Assemblies to enable power connectivity.

  • Connection: An assembly’s NetworkNode is connected to an EnergySource during deployment or configuration.
  • Validation: Before an assembly can go online, the system verifies that the NetworkNode is connected and the energy source has sufficient available capacity.

4. Security and Access Patterns

  • Package-Level Encapsulation: Like other primitives, mutation functions are public(package), ensuring only authorized assemblies can modify connection states.
  • Event Emission: Connection and disconnection events are emitted for off-chain tracking of the power grid topology.

Tip

Use the menu on the left hand side to find the article you are looking for. You can also use search at the top to search for specific terms.