Hal Finney 通信

回复:v0.1.3 MSVC 调试版

中本聪 · 2009 年 1 月 12 日 · 11:26(原件未注明时区)

SN-10227 附来源、原文与上下文。

阅读语言

这是 0.1.3 的 MSVC 调试版。

Here's the 0.1.3 MSVC debug build

引用 Hal 的来信Hal Finney来源 ↗

很遗憾,看起来 0.1.3 在夜里崩溃了。下次我会试着运行调试版。今天我需要工作,会频繁开关这台电脑,所以白天大部分时间都没法让它运行。今晚我会试着花点时间看看。

Looks like 0.1.3 crashed during the night, unfortunately. Next time I will try running the debug version. Today I am working and will need to take this computer up and down quite a bit, so I won't be able to run it for most of the day. Tonight I will try to look at it a little bit.

Hal

Hal

2009 年 1 月 12 日(星期一)上午 8:41,Satoshi Nakamoto satoshi@vistomail.com 写道:

On Mon, Jan 12, 2009 at 8:41 AM, Satoshi Nakamoto satoshi@vistomail.com wrote:

引用中本聪前信中本聪来源 ↗

看来0.1.3确实解决了这个问题。之前僵尸节点越来越多,我发出的消息几乎收不到回复。现在,发出4条 inventory 消息,就能收到4条 getdata 消息。

It definitely looks like 0.1.3 solved it. It was getting so there were so many zombie nodes, I was having a hard time getting a reply to any of my messages. Now, four inventory messages go out, four getdata messages come back.

你有没有遇到过显示“未被接受”(not accepted)的区块?如果节点当时无法广播,这个连接问题可能会导致生成的区块不被接受。等状态超过5左右,就可以放心认为它已经被接受了。

Did you get any "not accepted" blocks? The connectivity bug could have caused a generated block not to be accepted if the node wasn't able to broadcast at the time. Once the status is above 5 or so it's safely accepted.

可惜,我所在的地方无法接收传入连接,这让事情更困难了。最初一两天,网络主要靠你的节点能够接收传入连接,才一直运转下去。

Unfortunately, I can't receive incoming connections from where I am, which has made things more difficult. Your node receiving incoming connections was the main thing keeping the network going the first day or two.

如果愿意,你可以向我的比特币地址付款,不过这样你看不到完整的转账过程: 1NSwywA5Dvuyw89sfs3oLPvLiDNGf48cPD

You can send to my Bitcoin address if you want to, but you won't get to see the full transfer sequence: 1NSwywA5Dvuyw89sfs3oLPvLiDNGf48cPD

你也可以运行 findstr /c:"version message" debug.log,然后从列表靠近末尾的已连接用户中随便找一个,试着给他付款。那些以端口8333结尾的节点可以接收连接。

You could always findstr /c:"version message" debug.log and send a test to some random person you're connected to near the end of the list. The ones ending in port 8333 can receive connections.

我刚想到一件事。迟早会有人对暴力搜索比特币地址感兴趣,找一个开头几个字符对应自己名字的地址,有点像挑一个能拼出某个词的电话号码。纯属巧合,我这个地址里正好有我的姓名首字母。

I just thought of something. Eventually there'll be some interest in brute force scanning bitcoin addresses to find one with the first few characters customized to your name, kind of like getting a phone number that spells out something. Just by chance I have my initials.

Satoshi

Satoshi

引用 Hal 的来信Hal Finney来源 ↗

谢谢,Satoshi,这个新版本似乎运行得好多了。我有8个连接,看 debug.log,似乎有不少活动。我看到你给我付了一笔款,谢谢!告诉我你的地址,我也试着给你付一笔。如果我理解得没错,我昨天成功生成了一个区块,这些币就快成熟了。

Thanks, Satoshi, this new version seems to be running much better. I've got 8 connections, and watching debug.log there seems to be quite a bit of activity. I see you sent me a payment, thanks! Let me know your address and I will try sending one to you. I managed to generate a block yesterday and the coins are about to mature, if I understand it correctly.

Hal

Hal

2009 年 1 月 11 日(星期日)晚上 9:31,Satoshi Nakamoto satoshi@vistomail.com 写道:

On Sun, Jan 11, 2009 at 9:31 PM, Satoshi Nakamoto satoshi@vistomail.com wrote:

引用中本聪前信中本聪来源 ↗

我想我已经修复了与“select failed: 10038”(WSAENOTSOCK 错误)有关的问题。select 出错本身不是大问题,但它导致通信线程阻塞在一个套接字上;这个套接字本该处于非阻塞模式,却没有正确设置。这个问题以前一直没有暴露,是因为只要 select 没有失败,只有在有数据可读时才会调用 receive。

I believe I've fixed the bug related to "select failed: 10038" (error WSAENOTSOCK). The select error is not a big deal, but it led the communications thread to get blocked on a socket that should have been in non-blocking mode but wasn't. It never came up until now because as long as select never failed, receive would never be called unless there was data.

如果不修复这个问题,你的节点有时就会停止通信。连接仍会建立,但不会传送数据。生成的区块很可能不会被接受,因为你无法把它们广播出去,其他节点会把你的分支甩在后面。这就是没有网络连接时 Generate(生成比特币)不运行的原因。

Without this fix, your node's communication sometimes goes dead. Connections are still made, but no data is passed. Any generated blocks would probably not be accepted since you can't broadcast them and other nodes will leave your branch behind. That's why Generate doesn't run when you're not connected.

这也可能是 bitcoin.exe 无法退出的原因。关闭程序时没有理由等待通信线程,因此我把它改成只等待消息处理线程。以后我会再做更彻底的强制关闭处理。

This could also have caused bitcoin.exe to fail to exit. There's no reason for shutdown to wait for the com thread, so I made it only wait for the message processing thread. I'll do a more thorough forced shutdown later.

看起来你的节点的通信线程刚刚又被这个问题阻塞了。这次它运行了几个小时才出问题。

Looks like your node's com thread just now got blocked on this bug again. It went for a few hours this time before it did.

随信附上 0.1.3 版 exe。

Version 0.1.3 exe attached.

来源

阅读字号

选择适合你的字号,之后阅读会继续使用。