Closed shuse2 closed 5 years ago
The problem is that when we make RPC request { procedure: 'blocks' }
, a node returns a block that has 8176 number of transactions in mainnet This takes a lot of time to process for a peer to select and respond within 2000 ms (i.e, the default value of ackTimeout
). It is able to respond when we set the value of ackTimeout
to 10000 ms. For any other RPC call it doesn't timeout even with 2000 ms acknowledgment timeout.
peer.ts#L78
export const DEFAULT_ACK_TIMEOUT = 2000;
So either we put a limit to number of blocks being returned for blocks
rpc call by size (or total number of transactions in total) or we explicitly increase the ackTimeout
value to 10000 ms in order to make a successful call.
In mainnet, we are receiving this block below that has 8176 transactions. BlockId:13658550407518916215
genesis block =)
Its a Genesis block
Closing issue because behavior is correct and the fix is not related to the library
Expected behavior
Should be able to send a request to peers.
Actual behavior
After instantiating the P2P, try to request blocks. It returns timeout error. Also, it seems updateMySelf endpoint is returning error
missing required property
state``Steps to reproduce
Which version(s) does this affect? (Environment, OS, etc...)