> For the complete documentation index, see [llms.txt](https://docs.bsvblockchain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bsvblockchain.org/network-topology/nodes/sv-node/frequently-asked-questions/safe-mode.md).

# Safe Mode

If a node believes it has detected a potential Withholding attack, the node will enter safe mode and the wallet functionality (e.g. `getbalance)` will be disabled as a protective measure. At this point a miner should stay alert and be prepared to take manual intervention.

Withholding attacks can be neutralised by calling the `invalidateblock` RPC on the block at the base of the attack chain. The local node will then consider the entire attack chain as no longer valid.

Safe mode will be triggered by the presence of a chain fork longer than that specified by the configuration parameter `safemodeminforklength` (defaults to 6). It is possible that in exceptional circumstances such a fork can be produced normally. i.e. by a node that is not under attack.

Once a node goes into safe mode, it will remain in that state until the main branch is longer than the attack chain by the number of block specified by the configurable parameter `safemodeminblockdifference` (defaults to 72 blocks).

Safe mode can be disabled (RPC functionality restored) by putting the `disablesafemode` configuration parameter to 1 and restarting the node. It is recommended that this is NOT done, except in extreme circumstances. If this option is set, the node becomes vulnerable to Withholding attacks.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bsvblockchain.org/network-topology/nodes/sv-node/frequently-asked-questions/safe-mode.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
