mail@pastecode.io avatar
7 months ago
2.0 kB
1. Mark Node for Recycling:

        The process starts by marking each unreachable node for recycling.
        Each node is individually tagged with a timestamp, indicating the exact time when the decision to recycle that particular node was made.

2. Repair Workflow:

        Subsequently, repair workflows are triggered for each of the marked nodes.
        Repair workflows are responsible for removing or fixing any cells associated with the node. In this context, a cell is a group of related nodes.
        The goal is to ensure that the node is no longer associated with any cells, making it ready for recycling.

3. Isolation Safety Check:

        The critical step is the isolation safety check, which determines whether it's safe to proceed with isolating (or recycling) the node.
    Incorporating Timestamps:
        The algorithm considers the timestamps recorded earlier during the marking process.
    Cross-Referencing with CDS Data:
        CDS (Colony Data Service) data, which contains information about the relationships between nodes and cells, is used in the safety check.
    Validating Absence of Cells:
        The safety check ensures that there are no remaining cells associated with the node. If a cell still exists, it would mean the repair workflow did not completely remove the node from the cell.
    Sweep Completion Confirmation:
        The absence of cells on the node is not solely dependent on repair workflows. To further ensure safety, the safety check cross-references this information with the fact that every cell in the subzone has already been successfully swept.
    Final Decision:
        If CDS indicates that there are no cells on a node, and the last sweep occurred after the node was sealed (timestamped), the node is deemed safe for isolation. This means the node can be safely recycled without risking the integrity of the system.
Leave a Comment