electrumx icon indicating copy to clipboard operation
electrumx copied to clipboard

MemoryError in logs and broadcast tx package

Open biatwc opened this issue 2 months ago • 1 comments

Hello there

I've noticed the below error quite a bit recently and it got me thinking, is the 1MB limit in aiorpcx (which is where this error comes from) going to be an issue when clients are now sending broadcast_package messages (which I assume could easily hit this limit)?

ClientSession - MemoryError('dropping message over 1,000,000 bytes and re-synchronizing')

Grateful for your thoughts.

biatwc avatar Dec 09 '25 10:12 biatwc

You can set the MAX_RECV envvar to be higher. https://github.com/spesmilo/electrumx/blob/c5fb27ede8e8c3b607a816fdef9eeb5165e1bf14/docs/environment.rst?plain=1#L302-L308

going to be an issue when clients are now sending broadcast_package messages (which I assume could easily hit this limit)?

I don't know, could it? I am not sure what the max standard-policy size of package is, but I would guess it is still 400k weight units (?)

see https://github.com/bitcoin/bitcoin/blob/d5c8199b7904f4b13230d5677d4528591e4d5b41/doc/policy/packages.md?plain=1#L19-L20 (but not sure if/how cluster mempool changes that)

SomberNight avatar Dec 09 '25 15:12 SomberNight