decentralized-identity / decentralized-identity/ion
Add support for bitcoinRpcTimeout
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 166
- PR merge metrics
- No merged PRs in 30d
Description
While testing ion-bitcoin I slowed down my bitcoind so that RPC responses were really slow and the [BitcoinClient](https://github.com/decentralized-identity/sidetree/blob/54509a579029d086c8e61a10bab61a79447a8fe0/lib/bitcoin/BitcoinClient.ts#L813) quickly timed out and ion-bitcoin that uses sidetree died.
This is a feature request to add a new "bitcoinRpcTimeout" config value [here](https://github.com/decentralized-identity/sidetree/blob/54509a579029d086c8e61a10bab61a79447a8fe0/lib/bitcoin/IBitcoinConfig.ts) and then modify the [BitcoinClient constructor](https://github.com/decentralized-identity/sidetree/blob/54509a579029d086c8e61a10bab61a79447a8fe0/lib/bitcoin/BitcoinClient.ts#L39) to accept the value passed to it from the [BitcoinProcessor](https://github.com/decentralized-identity/sidetree/blob/54509a579029d086c8e61a10bab61a79447a8fe0/lib/bitcoin/BitcoinProcessor.ts#L119). The value would then get used [here](https://github.com/decentralized-identity/sidetree/blob/54509a579029d086c8e61a10bab61a79447a8fe0/lib/bitcoin/BitcoinClient.ts#L817) when calculating the timeout for the RPC request.
This would allow for the tuning of RPC timeouts to handle cases where bitcoind is running on a slow machine or a machine with slow storage.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.