Right now when stream.js or blocktogether.js wants to trigger a fresh fetch of blocks, it runs the call in its own process. But processing fresh blocks is expensive and is a different workload than those two processes normally handle. To split the world more clearly, this code ensures that all block updating happens in the update-blocks.js process. Other processes can trigger updates as needed using a TLS-protected RPC interface, that is authenticated at both ends.
Right now when stream.js or blocktogether.js wants to trigger a fresh fetch of blocks, it runs the call in its own process. But processing fresh blocks is expensive and is a different workload than those two processes normally handle. To split the world more clearly, this code ensures that all block updating happens in the update-blocks.js process. Other processes can trigger updates as needed using a TLS-protected RPC interface, that is authenticated at both ends.
cc @BooDoo for code review.