I have a question regarding the behavior of a full node after the assume valid target discovery process.
A user reported that after their node completed the assume valid target discovery and began syncing block data, restarting the node caused it to re-enter the assume valid discovery phase again.
From what I understand, if the node is restarted during the assume valid discovery, it makes sense that the process would restart. However, once the assume valid target has been successfully found, I thought the node should persist that state — meaning a restart shouldn’t trigger discovery again, and syncing should resume from where it left off.
Thanks @matt_ckb
I’ve reviewed the discussion, and the situation mentioned there seems to be caused by an interruption during the searching assume valid target process. which would require restarting the search from 0. This aligns with my understanding.
However, my current question is kinda different: if the assume valid target has already been found and the node has started syncing blocks, does restarting the node require re-searching the assume valid target?
For example, suppose the node has already identified an assume valid target at height 1000, and has successfully synced up to height 900. If the user then upgrades the node and restarts it without changing the assume valid target, would it be require to re-search the target?
If the answer is yes, then we effectively have 3 possible starting points:
Height 0;
The synced height(e.g. 900)
The previously found assume valid target(e.g. 1000)
Which of these would be chosen?
Also, in another scenario where the specified assume valid target is updated at startup(e.g. increased to 2500), how would the starting point for re-searching be determined in that case?
If the node has already synced blocks up to a height higher than the assume valid target, restarting the node does not require re-searching for the assume valid target.
However, if the node’s latest synced block is still lower than the assume valid target, it will resume searching for the assume valid target starting from its latest synced height.
The synced height(e.g. 900) will be chosen.
If the assume valid target is increased from 1000 to 2500 during the second startup, re-searching will begin from the latest synced height from the first startup, which is 900.