原始文献 / 论坛帖 / Development of alert system
Development of alert system
Bitcointalk · 2010-08-22 23:55:06 UTC
我一直在写警报系统。警报通过网络广播,适用于一段版本号范围。警报消息用只有我持有的私钥签名。
节点收到警报可以做两件事:
- 在状态栏放一条警告消息。
- 让 json-rpc 接口中涉及资金的方法返回错误。
在溢出 bug 或分叉这类用户可能无法信任收到的付款的情况下,警报可以在他们升级前让旧版本基本保持安全。手动用户在查看收款时会注意到状态栏警告,json-rpc 安全模式会让自动化网站在升级前不再做任何交易。
警报期间返回错误的方法有:
sendtoaddress
getbalance
getreceivedbyaddress
getreceivedbylabel
listreceivedbyaddress
listreceivedbylabel
英文原文
I've been working on writing the alert system. Alerts are broadcast through the network and apply to a range of version numbers. Alert messages are signed with a private key that only I have.
Nodes can do two things in response to an alert:
- Put a warning message on the status bar.
- Make the money handling methods of the json-rpc interface return an error.
In cases like the overflow bug or a fork where users may not be able to trust received payments, the alert should keep old versions mostly safe until they upgrade. Manual users should notice the status bar warning when looking for received payments, and the json-rpc safe mode stops automated websites from making any more trades until they're upgraded.
The json-rpc methods that return errors during an alert are:
sendtoaddress
getbalance
getreceivedbyaddress
getreceivedbylabel
listreceivedbyaddress
listreceivedbylabel
