Alert Messages
The alert message format is standardized for all message types. Depending on the alert type, the message
can vary in format.
Version
Alert key message version = 1.
uint32
4
Sequence Number
The alert message sequence number.
uint32
4
Timestamp
Alert -key message timestamp in Unix timestamp / Unix epoch format as (seconds since 1970-01-01T00:00 UTC).
uint32
4
Alert Type
Alert key message type.
uint32
4
Signatures
Signature data concatenated
Signature[N]
65*N
Message
Alert message
Variable Bytes
Depends on alert type
Signatures are calculated on doublesha256(Version || Sequence Number || Time || Alert Type || Message Body)
, where ||
is byte concatenation and will be encoded using just r, and s and the 1 byte header to guarantee a fixed length of 65 bytes.
The alert message format for each type is defined elsewhere. The important detail is that the alert type defines what associated action the Alert System should perform.
Prior to the release of Teranode, the Alert System interfaces with SV Node over the RPC interface. Below is a list of the supported Alert Messages and their associated RPC calls:
Informational Message
Informational broadcast to the network
0x01
N/A
N/A
Freeze UTXO
Sets a specified UTXO as unspendable until further notice
0x02
addToConsensusBlacklist
UTXO ID
vout
Enforce at height start
Enforce at height end
Unfreeze UTXO
Sets a specified UTXO as spendable
0x03
addToConsensusBlacklist
UTXO ID
vout
Enforce at height start
Enforce at height end
Reassign UTXO
Reassigns a frozen UTXO to a new locking script.
0x04
addTxIdToConfiscationWhitelist
Enforce at height
Transaction Hex
Ban Peer
Adds a peer to the node’s ban list.
0x05
setBan
Peer Address
Unban Peer
Removes a peer from the node’s ban list.
0x06
setBan
Peer Address
Invalidate Block
Invalidates a specified block hash, and nodes reject any chains built on top of it.
0x07
invalidateBlock
Block Hash
Set Keys
Sets the public keys associated with the current Alert Key Holders
0x08
N/A
N/A
Alert Messages are valid when they are signed by 3 of 5 current Alert Key Holders. Alert Messages increment by sequence number, and the initial message referenced by sequence number 0 contains the following Set Keys Alert Message:
This message is the valid genesis message for the mainnet instance of the Alert System. The public keys associated with this message are:
02a1589f2c8e1a4e7cbf28d4d6b676aa2f30811277883211027950e82a83eb2768
03aec1d40f02ac7f6df701ef8f629515812f1bcd949b6aa6c7a8dd778b748b2433
03ddb2806f3cc48aa36bd4aea6b9f1c7ed3ffc8b9302b198ca963f15beff123678
036846e3e8f4f944af644b6a6c6243889dd90d7b6c3593abb9ccf2acb8c9e606e2
03e45c9dd2b34829c1d27c8b5d16917dd0dc2c88fa0d7bad7bffb9b542229a9304
Last updated