# Reactivate

To reactivate from [deactivation](#deactivating), the subnet node must call `reactivate_subnet_node` up to the `MaxDeactivationEpochs` from the deactivation epoch plus one. Once reactivated, the subnet node will begin to be involved in consensus on the following epoch as a Validator classified node.

If a deactivated node doesn't reactivate by the `MaxDeactivationEpochs` from the epoch they deactivated, it won't be able to reactivate and must remove itself from the blockchain and reregister.

```rust
pub fn reactivate_subnet_node(
    origin: OriginFor<T>, 
    subnet_id: u32, 
    subnet_node_id: u32,
)
```

#### Inserted & Updated Storage

```rust
let mut subnet_node = DeactivatedSubnetNodesData::<T>::take(subnet_id, subnet_node_id);

...

subnet_node.classification.class = SubnetNodeClass::Validator;
subnet_node.classification.start_epoch = epoch + 1;

...

// --- Enter node into the Queue class
SubnetNodesData::<T>::insert(subnet_id, subnet_node.id, subnet_node);

// Increase total subnet nodes
TotalSubnetNodes::<T>::mutate(subnet_id, |n: &mut u32| *n += 1);
```

#### Note

There are cleanup functions for registered and deactivated nodes that fail to activate or reactivate that anyone can call.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hypertensor.org/network/subnet-node/reactivate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
