回复:比特币相关事项
首次公开证据
打开首次公开证据查看 1 个交叉存档
来源说明
Published on GitHub in February 2024 as part of Martti Malmi's testimony in the COPA v. Wright trial
我还至少需要命令行工具来检查是否收到了币,以及发送币。这需要有某种方式与后台运行的比特币进程通信。我不知道该怎么实现,也许可以采用某种与 RPC 有关的方式。
如果后台进程不是图形化的,那也会很棒——当前服务等级的 VPS 没有足够的内存来运行 X Windowing 环境,除非我想出一些释放内存的办法。
我一直想不明白,为什么每个人都不停强调不要 UI,明明已经可以让它只在托盘里显示一个小图标来运行,这对 Windows 上的服务器服务来说很常见。所以我想,这就是原因了。如果他们连一个出现在他们永远不会看到的桌面上的小小图标都无法忍受,我原先把这归结为 unix 式的自命清高。
不打开任何窗口很容易,但可能会因为没有 gtk 库而失败。wxWidgets 有用于“仅 wxBase,无 GUI 功能”的 WXBASE。你可以试着以它为目标构建,而不是 WXGTK,看看会发生什么。如果能在同一个可执行文件上通过命令行开关来实现,会比又增加一种需要发布的构建变体更好。
你有多少内存可用?比特币必然会占用相当多的内存;在 Windows 上大约是 75MB。这会有问题吗?
命令行控制是清单中接下来要做的事情之一。我想谨慎地设计 API。
接收付款是存在许多设计选择的部分。调用者需要识别它所关注的交易,这正是“一笔交易使用一个比特币地址”模型能派上用场的地方。搜索注释文本中的订单号是另一种可能。可以采用轮询方式,询问给定比特币地址收到了什么,也可以采用事件驱动方式。我想,在事件驱动方式中,可以让 bitcoin 在某个比特币地址收到一定金额时运行一条命令行。
英文原文
展开英文原文
I'd also need at least the command line tools to check if coins have been received and to send coins. It would require some way to communicate with the Bitcoin process running in the background. I don't know how that should be done, maybe with something RPC related.
It would also be great if the background process was non-graphical - the VPS on the current service level doesn't have enough memory to run the X Windowing environment, unless I come up with some ways to free memory.
I had been wondering why everyone keeps harping on no-UI, when already you can run it with only a small icon on the tray, which is common for server services on Windows. So I guess this is why. I had chalked it up to unix snobbery if they couldn't abide a tiny little icon on a desktop they never see.
Not opening any windows is easy, but it may fail because the gtk libraries aren't there. wxWidgets has WXBASE for "Only wxBase, no GUI features". You could try building for that instead of WXGTK and see what happens. It would be preferable if there's any way to do it as a command line switch on the same executable, rather than yet another build variation to release.
How much memory do you have to work with? Bitcoin necessarily takes a fair bit of memory; about 75MB on Windows. Is that a problem?
Command line control is one of the next things on the list. I want to design the API carefully.
Receiving payments is the part that has a lot of design choices to be made. The caller needs to identify the transactions of interest, that's where the one-bitcoin-address-per-transaction model helps. Searching the comments text for an order number is another possibility. There's polled, asking what has been received to the given bitcoin address, and event driven. I guess in event driven, bitcoin would be told to run a command line when a certain amount is received to a certain bitcoin address.