Bitcoin versions 0.3.10 and later have an alert system which allows messages about critical network problems to be broadcast to all clients. When an alert is in effect, the message it contains will appear in the status bar of all clients, and also in the "errors" field of RPC getinfo.
Alerts are broadcast using the same TCP relay system as block and tx messages. They are not encoded in a special transaction. Unlike block and tx relaying, alerts are sent at the start of every new connection for as long as the alert is in effect. This ensures that everyone receives the alert.
Alerts contain this information:
- How long to relay the alert.
- How long to consider the alert valid.
- An alert ID number.
- A list of alerts that should be canceled upon receipt of this alert.
- Exactly which versions of Bitcoin are affected by the alert. Unaffected versions still relay the alert for the benefit of older versions.
- Alert priority.
- The alert text.
Only alerts that are signed by a specific ECDSA public key are considered valid. A copy of the private key is held by at least Satoshi, Gavin, and theymos.
Until version 0.3.20, Bitcoin went into safe mode when a valid alert was received. In safe mode, all RPC commands that send BTC or get info about received BTC return an error. Current Bitcoin versions no longer go into safe mode in response to alerts, though Bitcoin will still go into safe mode when it detects on its own that something is seriously wrong with the network.
Even though Bitcoin no longer automatically disables RPC when an alert is live, it is wise for Bitcoin sites to shut down when an alert has been issued. To detect an active alert, poll the "errors" field of getinfo.
To test safe mode, run Bitcoin with the -testsafemode switch. To override a real safe mode event, run Bitcoin with the -disablesafemode switch.
|ID||Sent date||Expires (UTC)||Versions||Priority||Message|
|1010||Feb 18, 2012||Feb 21 02:47:15||All||100||See bitcoin.org/feb20 if you have trouble connecting after 20 February|
|1011||Mar 16, 2012||cancelled May 15, 2012||0.5 - 0.5.3||5000||URGENT: security fix for Bitcoin-Qt on Windows: http://bitcoin.org/critfix|
|1012||Mar 16, 2012||cancelled May 15, 2012||6.0||5000||URGENT: security fix for Bitcoin-Qt on Windows: http://bitcoin.org/critfix|
|1013||Mar 16, 2012||cancelled May 15, 2012||5.99||5000||URGENT: security fix for Bitcoin-Qt on Windows: http://bitcoin.org/critfix|
|1015||May 15, 2012||May 16, 2013||0.1 - 0.4.5||5000||URGENT: upgrade required, see http://bitcoin.org/dos for details|
|1016||May 15, 2012||May 16, 2013||0.4.99 - 0.5.4||5000||URGENT: upgrade required, see http://bitcoin.org/dos for details|
|1017||May 15, 2012||May 16, 2013||0.6.0||5000||URGENT: upgrade required, see http://bitcoin.org/dos for details|