Chia-Network/cadt

FIX: [CADT] Switch root tracking to use generation instead of timestamp

fizpawiz opened this issue · 0 comments

I was subscribed to Bhutan and was suddenly unable to get further updates, with the error:
2023-12-04 11:53:22 [1.7.2] [error]: Could not find root history for Royal Kingdom of Bhutan with timestamp 1701601811, something is wrong and the sync for this organization will be paused until this is resolved.
We figured out that the latest root for Bhutan had changed timestamp, almost certainly due to a reorg. The current sync method accesses each generation of data by timestamp, so this caused the problem.

After some discussion, Michael and I agreed that the right solution is to follow the index in the get_root_history output (confirmed roots only), rather than the timestamp.