Skip to content

回复:Linux 构建 ​

首次公开证据

打开首次公开证据
查看 1 个交叉存档
来源说明

Published on GitHub in February 2024 as part of Martti Malmi's testimony in the COPA v. Wright trial

heapchk() 只是一个未被使用的 MSVCRT 调试功能。在 Linux 上它可以不执行任何操作。OpenSSL 在 Linux 上会自动使用 /dev/urandom 生成种子,所以 RandAddSeedPerfmon 也可以不执行任何操作。

在我们彻底进行离线测试之前,不要让它连接到网络。如果你有两台计算机,就断开互联网,并使用“bitcoin -connect=<ip>”让它们互相连接,一台运行 Windows,另一台运行 Linux。-connect 可以让你连接到 192.168.x.x 之类的不可路由地址。如果它抛出一些我们尚未想到要检查的畸形垃圾数据,或者发现了其他会在网络上做出的反社会行为,我们不希望这有损网络可靠性的形象。

等你有可构建的版本可供测试时,我有时间做一些测试。我可以把它加入我目前正在针对迄今为止这些更改运行的压力测试中。

我在 util.h 中加了一个 #ifdef,用 Linux 的 gettimeofday 替换 QueryPerformanceCounter。更新到 wxWidgets 2.9 后,一些 Unicode/ANSI 错误无需修改代码就解决了。目前我在 Linux 中遇到的唯一编译错误来自 util.h 中的 heapchk()。

我修复了一些遇到的不可移植内容: QueryPerformanceCounter printf 格式字符串中的 %I64d Sleep CheckDiskSpace

如果你知道还有其他不可移植的东西需要我修复,请告诉我。

我想把 debug.log 和 db.log 移到与数据文件相同的目录 (%appdata%\Bitcoin),而不是放在碰巧作为当前目录的地方。

英文原文 ​

展开英文原文

heapchk() is just a MSVCRT debugging thing that's not being used. It can be a no-op on Linux. OpenSSL automatically uses /dev/urandom to seed on Linux, so RandAddSeedPerfmon can also be a no-op.

Don't let it connect to the network before we've tested it thoroughly off-net. If you have two computers, unplug the internet and use "bitcoin -connect=<ip>" to connect to each other, one windows and one linux. -connect will allow you to connect to non-routable addresses like 192.168.x.x. We don't want to reflect badly on the reliability of the network if it throws off some malformed crud we hadn't thought to check for yet, or discovers something else anti-social to do on the network.

I have time that I can do some testing when you've got something buildable to test. I can include it in the stress test I'm currently running on the changes so far.

I made an #ifdef to replace QueryPerformanceCounter with Linux's gettimeofday in util.h. Some Unicode/ANSI errors were resolved without code changes when I updated to wxWidgets 2.9. The only compile error I'm getting in Linux at the moment is from heapchk() in util.h.

I fixed some non-portable stuff I came across: QueryPerformanceCounter %I64d in printf format strings Sleep CheckDiskSpace

If there's any other unportable stuff you know of I should fix, let me know.

I think I'll move debug.log and db.log into the same directory as the data files (%appdata%\Bitcoin), rather than whatever the current directory happens to be.

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。