Luke-Jr [ARCHIVE] on Nostr: 📅 Original date posted:2012-03-03 📝 Original message:On Saturday, March 03, ...
📅 Original date posted:2012-03-03
📝 Original message:On Saturday, March 03, 2012 9:23:08 AM Stefan Thomas wrote:
> From what I understand the BIP uses a polling model, e.g. a miner would
> use getmemorypool to request new work from a pool in intervals. Would it
> make sense to specify a version of the API supporting long polling?
You mean explicitly mention the getwork longpoll protocol as part of the
getmemorypool BIP? Probably a good idea.
> For BitcoinJS specifically, since we also support JSON-RPC over TCP, I'd
> even be interested in a genuine "push" API. Something like C->S
> "listenmemorypool", S->C "updatememorypool" (continually).
HTTP and JSON-RPC are a client-server model; there is no way for the server to
make calls to the client. It's not practical to expect clients to run their
own JSON-RPC server - many cannot listen on WAN ports at all.
Published at
2023-06-07 03:11:50Event JSON
{
"id": "7cc52547a541a93d2619e570552207d2db1709448425594e8b69809d23d749ec",
"pubkey": "6ac6a519b554d8ff726a301e3daec0b489f443793778feccc6ea7a536f7354f1",
"created_at": 1686107510,
"kind": 1,
"tags": [
[
"e",
"3c851c8f17df1dd68608e4374d6cde0ed02a6a2268be0433e6610590ab1017ab",
"",
"root"
],
[
"e",
"b770b8d2941246db2da18e8382e3b6587c3fe29d715c2393e7f6d167e142dc8a",
"",
"reply"
],
[
"p",
"49f07bd32c0108a2903a0fa59f904ed312e0ea427d3269eb5fa910eb4a9e22c4"
]
],
"content": "📅 Original date posted:2012-03-03\n📝 Original message:On Saturday, March 03, 2012 9:23:08 AM Stefan Thomas wrote:\n\u003e From what I understand the BIP uses a polling model, e.g. a miner would\n\u003e use getmemorypool to request new work from a pool in intervals. Would it\n\u003e make sense to specify a version of the API supporting long polling?\n\nYou mean explicitly mention the getwork longpoll protocol as part of the \ngetmemorypool BIP? Probably a good idea.\n\n\u003e For BitcoinJS specifically, since we also support JSON-RPC over TCP, I'd\n\u003e even be interested in a genuine \"push\" API. Something like C-\u003eS\n\u003e \"listenmemorypool\", S-\u003eC \"updatememorypool\" (continually).\n\nHTTP and JSON-RPC are a client-server model; there is no way for the server to \nmake calls to the client. It's not practical to expect clients to run their \nown JSON-RPC server - many cannot listen on WAN ports at all.",
"sig": "cede700567e2fcb8d7e1a61b09dc4f859a5d67d6f3b696aaf336e811256c955313ff20439f58df677e7b754f301aa1b0e8ad1509d9b0ed2606022cef32df2ac1"
}