@andiflabs did some great investigation to discover that Promise.race leaks memory, and the TL;DR is it'll be easiest to generally avoid using Promise.race. I added a lint rule to catch uses of this in the future, and added workarounds for our current use.
Testing Plan
Run status -f and watch the memory usage while rescanning to observe it doesn't rapidly increase.
Documentation
Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference)? If yes, link a
related documentation pull request for the website.
[ ] Yes
Breaking Change
Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.
Summary
@andiflabs did some great investigation to discover that Promise.race leaks memory, and the TL;DR is it'll be easiest to generally avoid using Promise.race. I added a lint rule to catch uses of this in the future, and added workarounds for our current use.
Testing Plan
Run
status -f
and watch the memory usage while rescanning to observe it doesn't rapidly increase.Documentation
Does this change require any updates to the Iron Fish Docs (ex. the RPC API Reference)? If yes, link a related documentation pull request for the website.
Breaking Change
Is this a breaking change? If yes, add notes below on why this is breaking and label it with
breaking-change-rpc
orbreaking-change-sdk
.