erigon-pulse/rpc
a ad7be30679
jsonrpc HTTP Get handler & logs topic filter with map (#5922)
this pr has two things in it

1. changed filter logs to use a map for the topics. this will speed up
queries with many topics in them. I still don't have a use case for this
though. i put is as a method of Logs, since that made sense to me, happy
to move it back out though.

2. allows json-rpc over http get request. since firefox is a great json
viewer (can search through, collapse large results) i often use it to
debug. it is also useful for sharing data with those who are less
familiar with command line / programming.
example get request:

http://rpcdaemon/?method=eth_getLogs&params=[{"fromBlock":"0xf2316b","toBlock":"0xf2316b"}]

it is based on the old jsonrpc http specification
https://www.jsonrpc.org/historical/json-rpc-over-http.html#encoded-parameters
except we also accept not base64 encoded params. since every eth rpc
request has a [], it will immediately fail validation for base64 and
attempt to use the parameters as a they are. otherwise it will attempt
to parse the rest of the payload as base64 and use that.

Co-authored-by: a <a@a.a>
Co-authored-by: gfx <86091021+gfxlabs@users.noreply.github.com>
2022-11-03 09:09:04 +07:00
..
rpccfg rcpdaemon, erigon: add --rpc.evmtimeout flag (#5395) 2022-09-17 13:25:27 +07:00
testdata RPC: batch - preserve order, streaming to in-mem buf (#2541) 2021-08-19 09:26:06 +07:00
allow_list_test.go Granular rpc control (Allow list for RPC daemon) (#1341) 2020-11-10 10:08:42 +01:00
allow_list.go rpc: fix implemented filter methods being forbidden (#5801) 2022-10-26 09:08:09 +07:00
client_example_test.go rename (#1978) 2021-05-20 19:25:53 +01:00
client_test.go added Websocket support and authentication to Engine API (#3752) 2022-03-23 17:12:19 +01:00
client.go RPC: Enable back json streaming for non-batch and non-websocket cases (#4647) 2022-07-06 11:44:06 +01:00
doc.go go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
endpoints.go remove ipc package (#2405) 2021-07-20 15:34:04 +07:00
errors.go Refactor payload building (#3592) 2022-02-23 21:27:38 +01:00
handler.go Revert "cancel context before waiting for waitgroup to avoid deadlock in RPC on error (#5345)" (#5360) 2022-09-14 08:45:59 +01:00
helpers.go Rpcdaemon as lib (#940) 2020-08-19 12:46:20 +01:00
http_test.go RPC: Enable back json streaming for non-batch and non-websocket cases (#4647) 2022-07-06 11:44:06 +01:00
http.go jsonrpc HTTP Get handler & logs topic filter with map (#5922) 2022-11-03 09:09:04 +07:00
inproc.go rpc, p2p/simulations: use github.com/gorilla/websocket (#20289) 2019-12-03 13:37:18 +01:00
ipc.go Apache licensed logger (#2460) 2021-07-29 17:23:23 +07:00
json.go Fixed get-payload and Hanging ForkChoice (#3575) 2022-02-22 14:47:23 +01:00
metrics.go MIT licensed metrics lib (#2462) 2021-07-29 17:27:46 +07:00
server_test.go RPC: Enable back json streaming for non-batch and non-websocket cases (#4647) 2022-07-06 11:44:06 +01:00
server.go RPC: Enable back json streaming for non-batch and non-websocket cases (#4647) 2022-07-06 11:44:06 +01:00
service.go Genesis sync from existing snapshots (#3087) 2021-12-05 09:03:08 +07:00
stdio.go rpc, p2p/simulations: use github.com/gorilla/websocket (#20289) 2019-12-03 13:37:18 +01:00
subscription_test.go RPC: Enable back json streaming for non-batch and non-websocket cases (#4647) 2022-07-06 11:44:06 +01:00
subscription.go Enable gosec linter (#5083) 2022-08-17 12:18:19 +07:00
testservice_test.go RPC: Enable back json streaming for non-batch and non-websocket cases (#4647) 2022-07-06 11:44:06 +01:00
types_test.go Fix rpc.BlockNumberOrHash unmarshaling (#4218) 2022-05-20 16:04:24 +07:00
types.go missing return; (#5328) 2022-09-11 09:35:18 +07:00
websocket_test.go RPC: Enable back json streaming for non-batch and non-websocket cases (#4647) 2022-07-06 11:44:06 +01:00
websocket.go added Websocket support and authentication to Engine API (#3752) 2022-03-23 17:12:19 +01:00