Commit graph

11 commits

Author SHA1 Message Date
Daniel Liu
c75623ace7
rpc: add limit for batch request and response size #26681 (#998) 2025-04-28 17:00:30 +08:00
JukLee0ira
b899363d17 node: set JWT expiry to 60 seconds #25416 2025-04-28 10:25:07 +08:00
Daniel Liu
e9b0bc7d74
node: ensure resp.body closed #26969 (#987) 2025-04-28 09:12:42 +08:00
JukLee0ira
230a2f09ba
cmd/geth, node, rpc: implement jwt tokens #24364 (#993)
* cmd/geth, node, rpc: implement jwt tokens #24364

* fix
2025-04-27 18:17:09 +08:00
JukLee0ira
b4308ba733
internal/ethapi: disable sending of non eip155 replay protected tx #22339 (#971)
* internal/ethapi: disable sending of non eip155 replay protected tx #22339

* eth: optimize the initialization logic of EthAPIBackend

* fix
2025-04-25 11:55:52 +08:00
Daniel Liu
58e9b8c8f6
node, rpc: improve HTTP write timeout handling #25457 (#982)
Here we add special handling for sending an error response when the write timeout of the
HTTP server is just about to expire. This is surprisingly difficult to get right, since is
must be ensured that all output is fully flushed in time, which needs support from
multiple levels of the RPC handler stack:

The timeout response can't use chunked transfer-encoding because there is no way to write
the final terminating chunk. net/http writes it when the topmost handler returns, but the
timeout will already be over by the time that happens. We decided to disable chunked
encoding by setting content-length explicitly.

Gzip compression must also be disabled for timeout responses because we don't know the
true content-length before compressing all output, i.e. compression would reintroduce
chunked transfer-encoding.

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
2025-04-25 08:01:44 +08:00
JukLee0ira
10dd75e82f
node: serve JSON-RPC on custom path prefix #22184 (#952) 2025-04-24 11:34:26 +08:00
JukLee0ira
b1e08e6642
all: refactor package node #21105 (#923) 2025-04-10 18:52:49 +08:00
Daniel Liu
d55dca04b5 all: use http package to replace http method names (26535) 2024-12-05 10:59:42 +08:00
Daniel Liu
22ad2f57ef node: fix websocket connection header check (#21646) 2024-11-13 09:35:41 +08:00
Daniel Liu
b76438aafe node: allow WebSocket and HTTP work on same port (#20810) 2024-11-13 09:35:41 +08:00