bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

ETH: clientConfig maxReceivedFrameSize not working

Open solaris-rig opened this issue 5 years ago • 4 comments

im trying to sync ETH blockchain using openethereum but stuck after 2283440 height i try to change the web3 limit as per #2744 but still wont sync n keep disconnected. any advice? my eth config is as per following

ETH: { mainnet: { chainSource: 'p2p', trustedPeers: [{ host: '127.0.0.1', port: 30303 }], provider: { host: '127.0.0.1', protocol: 'ws', port: 8546, options: { clientConfig:{ maxReceivedFrameSize: 1073741824, maxReceivedMessageSize: 1073741824 } } } } }

solaris-rig avatar Jan 22 '21 12:01 solaris-rig

bitcore error message:

{"message":"2021-01-22 20:36:57.140 GMT+8 | Syncing... | Chain: ETH | Network: mainnet | 1666.67 blocks/min | Height: 2283440","level":"info"} {"level":"error","message":"Error syncing ETH mainnet"} connection not open on send() connection not open on send() making a new connection

solaris-rig avatar Jan 22 '21 12:01 solaris-rig

Add two lines of code after line 76 in this file:

rpc.web3.currentProvider.connection._client.config.maxReceivedFrameSize = 100000000;
rpc.web3.currentProvider.connection._client.config.maxReceivedMessageSize = 100000000;

https://github.com/bitpay/bitcore/blob/master/packages/bitcore-node/src/modules/ethereum/api/csp.ts#L76

It worked for me.

noateden avatar Jan 27 '21 04:01 noateden

after added those line, the "connection not open on send()" error disappear but still fail to sync.

bitcore message as per following:

{"message":"Syncing 5815925 blocks for ETH mainnet","level":"info"} {"message":"2021-01-28 05:59:39.537 GMT+8 | Syncing... | Chain: ETH | Network: mainnet | 4615.38 blocks/min | Height: 2283440","level":"info"} {"level":"error","message":"Error syncing ETH mainnet"}

btw i start openethereum as per follow:

./openethereum --chain mainnet --config dev --jsonrpc-cors=all --ws-origins=all --ws-apis=all --tracing on --base-path '/media/data/ethereum' --db-compaction ssd --cache-size 8192 --ws-max-payload 100

solaris-rig avatar Jan 27 '21 22:01 solaris-rig

i have installed parity. the result is still the same.... wont sync pass 2283440 height

solaris-rig avatar Jan 28 '21 11:01 solaris-rig