2

We are creating a small private network with the purpose of sharing data. We thought that the main concern about writing large amounts of data in Ethereum would be the gas cost, which is not a problem to us, as this will be a private network.

As we developed our POC, we stumbled across this error message on Geth:

content length too large

We investigated and saw that there is a limitation on Geth about how much data can be sent in a single request on http.go file:

const ( maxHTTPRequestContentLength = 1024 * 128 )

My question is: is there a technical reason for this limitation? Or is it just because is not reasonable in a public network to send this amount of data due to gas costs?

Can I increase the value or remove this constraint in my private network?

  • Possible duplicate of Is there a limit for transaction size? – Malone Nov 16 '17 at 19:33
  • I saw that post, but they talked about limitations based on gas, the limitation that I am seeing is in the geth RPC API, blocking requests bigger than 128Kb – marcusvcs Nov 16 '17 at 20:28
  • About your last question, you can change geth source code and build it back. – Florian Castelain Nov 17 '17 at 1:19
  • @marcusvcs I'd guess that limit is to avoid denial of service attack that send very big request to geth nodes. Since this is a private network you should be able to increase such limit and recompile geth as Andromelus has suggested. – Ismael Nov 18 '17 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.