Timechain
Search Donate
Sponsors
Cake Wallet, private Bitcoin and Monero walletSideShift.ai, no-signup crypto exchangeOrangeRock, non-custodial bitcoin spot and perps tradingBraiins Hashpower, buy and sell Bitcoin hashrateLayer Two Labs, drivechains for Bitcoin

Re: Bitcoin API research status

To: Martti Malmi <mmalmi@cc.hut.fi> Martti Malmi
I noticed this in the docs for wxSocketServer::Accept(bool wait = true):
"If wait is true and there are no pending connections to be accepted, it
will wait for the next incoming connection to arrive.  \*\*Warning: This
will block the GUI."

wxWidgets is pathologically single-threaded.  Not only single-threaded,
but must-be-the-GUI-thread-ed.  Even for something as non-UI as
wxStandardPaths I got nailed.  All this is fine for UI code, since this
is the same constraint placed by Windows anyway, but for UI-less server
daemon code, wx calls are uncertain.

Status of my research currently:

For PHP, Python, etc to access the server, we need to use regular
sockets.  I think we can make it local-only by binding to localhost
only, so it can only be accessed through the loopback.  They say it's
also watertight to simply check the IP of connections received and
disconnect anything not 127.0.0.1.  May as well do both.

XML-RPC is a bit fat.  There are 4 libraries for C++ but they're all big
and hard to build, dependencies, license issues.  Some posters complain
all the C++ and PHP XML-RPC libraries are buggy.

JSON-RPC is a simpler more elegant standard.  It's simple enough I could
use a generic JSON parser.

PHP, Python and Java all have good implementations of JSON-RPC.

I'm currently leaning towards JSON-RPC.

All writings · Satoshi era timeline

0:000:00