Several Grin wallets, including the version of Ledger Live Desktop & Mobile with Grin support and the Grin version of the MimbleWimble Coin web wallet, are capable of processing gzip compressed HTTP responses and use the grinnode.live node as their default Grin mainnet node.
Adding support for gzip compressing the grinnode.live node's HTTP responses will reduce syncing times and data usage for the users of those wallets.
You can test this feature by running the following command.
curl -v -H 'Accept-Encoding: gzip' https://grinnode.live:3413/v2/foreign -d '{"jsonrpc":"2.0","id":1,"method":"get_unspent_outputs","params":[2, 12730570, 2000, true]}'
The HTTP request shown will include the Accept-Encoding: gzip header which indicates that the client supports a gzip compressed response.
> POST /v2/foreign HTTP/1.1
> Host: grinnode.live:3413
> User-Agent: curl/7.68.0
> Accept: */*
> Accept-encoding: gzip
> Content-Length: 90
> Content-Type: application/x-www-form-urlencoded
The HTTP response shown won't include the Content-Encoding: gzip header and isn't gzip compressed since the grinnode.live node doesn't currently support this feature.
< HTTP/1.1 200 OK
< access-control-allow-origin: *
< access-control-allow-headers: Content-Type, Authorization
< content-type: application/json
< content-length: 3469833
< date: Fri, 30 Dec 2022 13:03:41 GMT
< vary: Accept-Encoding,Origin
< vary: Accept-Encoding,Origin
Several Grin wallets, including the version of Ledger Live Desktop & Mobile with Grin support and the Grin version of the MimbleWimble Coin web wallet, are capable of processing gzip compressed HTTP responses and use the grinnode.live node as their default Grin mainnet node.
Adding support for gzip compressing the grinnode.live node's HTTP responses will reduce syncing times and data usage for the users of those wallets.
You can test this feature by running the following command.
The HTTP request shown will include the
Accept-Encoding: gzipheader which indicates that the client supports a gzip compressed response.The HTTP response shown won't include the
Content-Encoding: gzipheader and isn't gzip compressed since the grinnode.live node doesn't currently support this feature.