From 4cf8985789d9ff3e24d446364f6db9f6156e7a69 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Mon, 25 Nov 2024 22:04:36 +0100 Subject: [PATCH] Improve sentences --- bip-0040.mediawiki | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bip-0040.mediawiki b/bip-0040.mediawiki index e6b88994..cb6cf706 100644 --- a/bip-0040.mediawiki +++ b/bip-0040.mediawiki @@ -32,6 +32,10 @@ The Stratum wire protocol was introduced by Marek Palatinus in late 2011 and ear Later in 2012, Marek Palatinus introduced Stratum for mining pools as well: The Stratum mining protocol, as defined in [[bip-0041.mediawiki|BIP 41]]. +==ExtensionThis is extended specification information of the Stratum wire protocol to make it more complete. This information will not be found in any code or specification before this BIP.== + +This BIP has some extended specification information that isn't found in the older, legacy specifications. For backwards compatibility, it is recommended to implement the legacy specification information too, which is also described in this specification. + ==Specification: Data Format== Stratum leverages [https://www.jsonrpc.org/ JSON-RPC]. Both versions 1.0 and 2.0 are allowed, according to their respective rules. @@ -46,11 +50,11 @@ The service vendor is optional. However, multiple vendors can define the same se It is possible to send JSON-RPC messages over different transport protocols, like TCP and HTTP. It is also possible to protect these protocols with SSL/TLS. -''Note: Because HTTP and WebSockets support virtual hosting (Host header or :authority pseudo-header), it is possible to create a server on a single IP address that supports multiple coins by checking the domain name. The same is the case for the transport protocols with SSL/TLS when SNI is used. On plain TCP, virtual hosting is not possible. A similar experience can be reached by using multiple IP addresses. For IPv6, a network of /96 would be enough to hypothetically support all coins ever listed in SLIP-44. For IPv4, you would need all IPv4 addresses that exist to do the same, even the invalid ones, so a suggestion is to only use the server for coins you really need. Also, other ports could possibly be used, and in that case, a /16 IP block with all 65536 TCP ports in use will be enough to support all coins. However, because using non-standard ports is not user-friendly, this is also not recommended.'' +''Note: Implementers may write servers that support multiple coins, assuming that those coins all use the same port (e.g. 50001). Because HTTP and WebSockets support virtual hosting (Host header or :authority pseudo-header), it is possible to create a server on a single IP address that supports multiple coins by checking the domain name. The same is the case for the transport protocols with SSL/TLS when SNI is used. On plain TCP, virtual hosting is not possible. A similar experience can be reached by using multiple IP addresses. For IPv6, a network of /96 would be enough to hypothetically support all coins ever listed in SLIP-44. For IPv4, you would need all IPv4 addresses that exist to do the same, even the invalid ones, so a suggestion is to only use the server for coins you really need. Also, other ports could possibly be used, and in that case, a /16 IP block with all 65536 TCP ports in use will be enough to support all coins. However, because using non-standard and non-default ports is not user-friendly, this is also not recommended.'' ===TCP=== -Stratum over a TCP connection. Every JSON-RPC message (including batch messages) is sent on a single line, ending with a line-feed (\n), so \r\n is also allowed. Line-feeds inside the JSON should be encoded as usual. Both client and server can initiate a request on which the other side could respond with a result or an error. +Stratum over a TCP connection. Every JSON-RPC message (including batch messages) is sent on a single line, ending with a line-feed (\n), so \r\n is also allowed. Line-feeds inside the JSON should be encoded as usual. Both client and server can initiate a request on which the other side could respond with a result or an error. Below, the default ports of Stratum for Bitcoin are defined. Other coins can define other default ports. * Default port: 50001 * Letter: t @@ -100,7 +104,7 @@ Stratum over an HTTP connection with SSL/TLS: the same as normal HTTP, but with Stratum over a WebSocket connection. When using WebSockets, the JSON-RPC messages (including batch messages) are encapsulated in a WebSocket message. It is also possible to send multiple JSON-RPC messages in one WebSocket message. Every JSON-RPC message should end with a line-feed (\n). Both client and server can initiate a message request on which the other side could respond with a result or an error, like Stratum over TCP. -* Default port: 8083This is extended specification information of the Stratum wire protocol to make it more complete. This information will not be found in any code or specification before this BIP. +* Default port: 8083 * Letter: w ====Subprotocol====