EnsoFinance / temper

Temper your expectations - Ethereum Transaction Simulator
MIT License
343 stars 43 forks source link

Make content_length_limit configurable #24

Closed fleupold closed 9 months ago

fleupold commented 9 months ago

Currently content_length_limit is hardcoded to 16KB, leading to errors of kind

Handling rejection: Rejection(PayloadTooLarge) unhandled rejection: Rejection(PayloadTooLarge) INFO ts::api > 127.0.0.1:52125 "POST /api/v1/simulate HTTP/1.1" 500 "-" "curl/7.79.1" 686.917µs

when trying to simulate batched intent beauties like https://etherscan.io/tx/0x8d1feb91a6ca9398607b7f02177b61425b1a64d511fcccb9ef7a60becdde0a7b

This PR adds an optional config value that allows to configure this value and allow processing larger request bodies.

Test Plan

Above mentioned transaction simulates successfully when MAX_REQUEST_SIZE=32

devanoneth commented 9 months ago

Thanks for your contribution @fleupold! :)