sei-protocol / sei-tendermint

Tendermint fork with ABCI++ support, bug fixes, and custom features
Other
39 stars 36 forks source link

Add request length check to json rpcs #221

Closed philipsu522 closed 8 months ago

philipsu522 commented 8 months ago

Describe your changes and provide context

We should limit the request of json rpc calls

Testing performed to validate your change

codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 58.19%. Comparing base (66ac407) to head (5d3c0e6).

:exclamation: Current head 5d3c0e6 differs from pull request most recent head fbccf90. Consider uploading reports for the commit fbccf90 to get more accurate results

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/sei-protocol/sei-tendermint/pull/221/graphs/tree.svg?width=650&height=150&src=pr&token=VYIWMMGYMP&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol)](https://app.codecov.io/gh/sei-protocol/sei-tendermint/pull/221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol) ```diff @@ Coverage Diff @@ ## main #221 +/- ## ========================================== + Coverage 58.13% 58.19% +0.05% ========================================== Files 249 249 Lines 33935 33940 +5 ========================================== + Hits 19729 19752 +23 + Misses 12636 12626 -10 + Partials 1570 1562 -8 ``` | [Files](https://app.codecov.io/gh/sei-protocol/sei-tendermint/pull/221?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol) | Coverage Δ | | |---|---|---| | [rpc/jsonrpc/server/http\_json\_handler.go](https://app.codecov.io/gh/sei-protocol/sei-tendermint/pull/221?src=pr&el=tree&filepath=rpc%2Fjsonrpc%2Fserver%2Fhttp_json_handler.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-cnBjL2pzb25ycGMvc2VydmVyL2h0dHBfanNvbl9oYW5kbGVyLmdv) | `68.31% <100.00%> (+1.65%)` | :arrow_up: | ... and [17 files with indirect coverage changes](https://app.codecov.io/gh/sei-protocol/sei-tendermint/pull/221/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol)