go-spacemesh icon indicating copy to clipboard operation
go-spacemesh copied to clipboard

self-healing outside tortoise window and adjustable memory requirements

Open dshulyak opened this issue 1 year ago • 0 comments

tortoise maintains decoded votes for 10 000 layers. in total thats about ~600MB of memory. implementation requires this data for self-healing purposes, the process when nodes disagree on the history and they either have to reach agreement by counting all votes, or rely on weak coin if votes margin is not sufficient for them to vote.

we have to introduce upper practical limit for number of layers in memory, otherwise there is no boundary for memory growth. it follows that protocol doesn't support self-healing if disagreement is outside this window.

there are several problems to solve:

  • heuristic that tracks uncounted weight using atxs and if large fraction of it wasn't counted it notifies that we are potentially need self-healing, but we are missing data
  • votes encoding that doesn't require unbounded memory. in other words how to decode votes that were vote differently on blocks years from now?

this is not very likely problem that we need self-healing for such long duration. e.g if it happens then some nodes were simply offline for long time , and if they want to rejoin they can simply resync or use verifying tortoise. but in long term (1 year) we want to handle this

dshulyak avatar Oct 03 '23 07:10 dshulyak