Bitcointalk · Privacy versus Safety: handling change

中本聪,2010 年 7 月 17 日

SN-1366 已核对来源,附原文与上下文。

阅读语言
中文译文

我们应该在钱包里预生成一批备用地址,需要新地址时取用。它们不大,多存一些也无妨。这样还能更一般地覆盖另一种情况:某人做了备份,之后请求了一个新地址并用它收了一大笔款。也许应该分设几个队列,免得一种地址需求把别的需求饿死。

这些地址会照常创建并存在常规位置,同时登记在另一个「已创建但从未使用」的名单上。请求地址时,从未使用队列队首的地址被发放,同时创建一个新地址加到队尾。

区块加载代码里有某种重新扫描机制,本来是用来修复有人复制了 wallet.dat 的情形。我需要确认这个重新扫描能处理「在已收到的区块里重新发现收到的付款,但因为钱包被恢复而曾经被遗忘」的情况。

ORIGINAL · 英文原文
We should queue up a supply of pre-made addresses in the wallet to use when a new address is needed.  They aren't very big, so it wouldn't hurt to have a lot of them.  This would more generally cover the case also where someone backs up, then requests a new address and receives a big payment with it.  Maybe there should be separate queues so one type of demand on addresses doesn't deplete it for the others.

The addresses would be created and stored in the normal place, but also listed on a separate list of created-but-never-used addresses.  When an address is requested, the address at the front of the never-used queue is handed out, and a new address is created and added to the back.

There's some kind of rescan in the block loading code that was made to repair the case where someone copied their wallet.dat.  I would need to check that the rescan handles the case of rediscovering received payments in blocks that were already received, but are forgotten because the wallet was restored.
上下文
← 上一条 SN-1366 · 当前 下一条 → 在档案中查看完整主题串 →
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-1366