forked from 0xPolygon/polygon-edge
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add limitation to jsonrpc batch query and block range (#145)
* Add debug logs * Remove websocket connection when closed * Add batch and block limit to jsonrpc and graphql * Refresh jsonrpc filter when it is reachable * Fix lint error * Disable rpc batch and block range limit when set to 0 * Fix lll nolint warning
- Loading branch information
1 parent
1928a2a
commit 5fff9a8
Showing
14 changed files
with
550 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package jsonrpc | ||
|
||
const ( | ||
// DefaultJSONRPCBatchRequestLimit maximum length allowed for json_rpc batch requests | ||
DefaultJSONRPCBatchRequestLimit uint64 = 1 | ||
// DefaultJSONRPCBlockRangeLimit maximum block range allowed for json_rpc | ||
// requests with fromBlock/toBlock values (e.g. eth_getLogs) | ||
DefaultJSONRPCBlockRangeLimit uint64 = 100 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.