KomodoPlatform / komodo-defi-framework

This is the official Komodo DeFi Framework repository
https://komodoplatform.com/en/docs/komodo-defi-framework/
104 stars 94 forks source link

response too large (over 1,000,000 bytes"} returning from electrums for some UTXOs #1056

Closed tonymorony closed 3 years ago

tonymorony commented 3 years ago

@cipig electrums can't parse some valid transactions with a large number of inputs so such UTXOs are not possible to spend with AtomicDEX:

it looks like we should adjust the max response size on electrums

nc -v electrum1.cipig.net 10001
Connection to electrum1.cipig.net port 10001 [tcp/scp-config] succeeded!
{"jsonrpc":"2.0","id":"test","method":"blockchain.transaction.get","params":["b3ad0563ab9c5e16d5c815b02a3438fda4cbd67570bfae03272ffb46659a4449",true]}

{"jsonrpc": "2.0", "error": {"code": -32700, "message": "invalid JSON"}, "id": null}
{"jsonrpc": "2.0", "error": {"code": -32600, "message": "response too large (over 1,000,000 bytes"}, "id": "test"}
cipig commented 3 years ago

1,000,000 bytes is default setting for this: https://electrumx-spesmilo.readthedocs.io/en/latest/environment.html#envvar-MAX_SEND which is equal to 10000 entries. How many entries does the above tx has? Idk if it's a good idea to increase this too much. I can also only change this for "our" electrums.

artemii235 commented 3 years ago

@cipig The specific transaction size is 150 Kbytes, and the verbose getrawtransaction response is slightly bigger than 1 Mbyte. It causes the blockchain.transaction.get error mentioned in the initial comment. I think setting the MAX_SEND to 2,000,000 won't cause too much issue. I think some ElectrumX forks use even higher values.

cipig commented 3 years ago

Set it to 2M for KMD electrums. Try again.

tonymorony commented 3 years ago

Works now, tyvm! Would be great if you can apply this to all our electrums

cipig commented 3 years ago

Edited the configs of all KMD ACs, will be activated on Tuesday, when electrums are compacted and restarted automatically. Configs of all other coins are untouched, AuxPOW coins have a higher limit anyway and afaik you only hit this limit when you mine to your ADEX address. Please let me know when you see this error again, i will then increase the limit for respective coin too.