Open vincenthz opened 4 years ago
Currently we only update the main tag in storage so it gets lost if bootstrap is interrupted. I pushed https://github.com/input-output-hk/jormungandr/pull/1940/commits/a0907b523b419e900e6768bd6508d5c642c373e2 to address this issue but I'm not sure if this is exactly what you wanted.
If you meant shutting down the node in the midst of bootstrap, then we need to handle SIGINT
and tell the bootstrap process to stop in some way. Probably by using channels or something like that.
So, I tried 3 different approaches for that:
SIGINT
, update the tip and shutdown. No performance drop, works perfectly fine, but the code is a disaster.n
blocks. Looks like a good trade-off. Can be implemented by adding a few lines of code to bootstrap_from_stream
. If we update tip on every 50-th or 100-th block we miss a reasonable number of block on interruption. At the same time no significant performance drop was observed.
it seems that we don't update any storage state, so cancelling a partial netboot, seems to restart everything