harmony-one / pangaea-community

The one-stop spot for Pangaea scripts! Open to contribution from all!
16 stars 16 forks source link

Pending transactions of the Pangaea nodes increasing associated with data/input extremely big #71

Closed BrunoMarshall closed 4 years ago

BrunoMarshall commented 5 years ago

In Pangaea Network several people is flooding the network with tx with a lot of MB data input, for example with base64 text, base 64 images, etc... This is not an issue itself, but this will lead to a memory/block size problems and an increase of pending transactions due to block propagation. Solution 1: the "--input data" command should allow much less size (bytes) base 64 input, to improve propagation and avoid pending transactions increasing. For example blocks with MAX ~2000 bytes, not 99999 bytes(currently). Solution 2: implement a gas mechanism to protect the network, the more the tx input data the more gas payment Current pending transactions in my node: 10108

C10NU7 commented 5 years ago

Current pending transactions in my node: 14345

Screenshot_1

chainum commented 5 years ago

The proper fix is to make sure that only necessary data is kept in memory and that all other data is persisted to disk. According to Eugene all pending tx data (yes including the base64 encoded data) is currently kept in memory, which is kinda insane. The go subroutines should also be bounded/pooled to prevent them from spinning out of control and consuming an excessive amount of memory.

Harmony devs have already acknowledged that there's a design flaw regarding the limitless go subroutines and they're working on a fix.

BrunoMarshall commented 4 years ago

I will close this issue, pls see Seb comment. Thank you