MultiChain / multichain

Source code for multichaind, multichain-cli and multichain-util.
GNU General Public License v3.0
536 stars 259 forks source link

SmartFilter: JS-Code size limit? #99

Closed tloriato closed 5 years ago

tloriato commented 5 years ago

Hello,

I seem to have hit the maximum size limit that a Smart Filter can have? Inside my code I'm loading an object with ~250k lines of information that I use to verify a few things about the transaction.

When I try to send the filter through Savior I get:

Json: {'result': None, 'error': {'code': -8, 'message': 'Invalid custom fields or filter name, too long'}, 'id': 1}
{'result': None, 'error': {'code': -8, 'message': 'Invalid custom fields or filter name, too long'}, 'id': 1}

However, if I empty my object the filter goes through:

> tloriato$ python3 filterwithObject.py 
Error! Status code: 500
Text: {"result":null,"error":{"code":-8,"message":"Invalid custom fields or filter name, too long"},"id":1}

Json: {'result': None, 'error': {'code': -8, 'message': 'Invalid custom fields or filter name, too long'}, 'id': 1}
{'result': None, 'error': {'code': -8, 'message': 'Invalid custom fields or filter name, too long'}, 'id': 1}
> tloriato$ python3 filterWithoutObject.py 
8167852d16573667efac308becdd0175af1a8effa549b0eb054ec5fb25446db7

The saddest part is that I wanted to load other object after this one with 2mi lines 😢

gidgreen commented 5 years ago

Answer will be posted here: https://www.multichain.com/qa/14138/create-smartfilters-from-file-due-to-arg_max