0

The State History Plugin (SHiP) exposes the actions and deltas from the chain though Websocket.

@tbfleming, the creator of SHiP, have an example application that connects to the node and gets the actions and deltas using nodeJS:

https://github.com/EOSIO/test-state-history/blob/master/a.js

However, I get the following error when I am trying to read the block 21,289,343 in Jungle:

RangeError: Max payload size exceeded

I made a smaller example from the previous repo that reproduces the error:

https://github.com/mauhcs/ship_monitoring/blob/master/fill.js (from the above file simple run node fill.js, I left a Jungle node running with the State Plugin up for easier reference)

Is that a problem in the plugin or in the NodeJs application?

1

The solution is simple but obscure if you are not used to nodejs applications. Just run the application with the flag --max-old-space-size=8192

For example,

node --max-old-space-size=8192 fill.js

The issue is caused by blocks bigger than the application can handle by default. Since State Plugin downloads the whole block at once, the only way around is increasing its limit.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.