-
| 
         I have a strange bug for which I only see one plausible explanation. First of all a bit of logs (node was restarted): As you can see, node was offline and after restart connected to network, started sync and had reorg of the [previously] best block. I don't have detailed enough log to verify with 100% certainty, but I think the background process running in parallel to sync (triggered by block import actually) was requesting block 505898 by number and read non-canonical version of it (reorg didn't have effect yet). Since blocks are read with lag of 100 blocks, so 505898 wasn't read until 505998 was imported, I have an impression that maybe canonical chain is not updated until sync is finished somehow. Is it possible? Substrate implementation is quite complex so I didn't find exact place where canonical chain update happens yet. Substrate is used from 5bd5b84 (in case there were relevant changes since).  | 
  
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
| 
         I'm confused, what is your problem? Or better, what is the bug?  | 
  
Beta Was this translation helpful? Give feedback.
-
| 
         I don't think I understand the issue either. If the node ends up on a non-canonical block when you shut it down, it is normal to re-org right after the restart. At what exact point do you query for the block   | 
  
Beta Was this translation helpful? Give feedback.
-
| 
         I believe https://substrate.stackexchange.com/a/1322/25 describes the root cause. Code in verifier was relying of some things happening during block import, which often is the case, but not guaranteed, resulting in rare obscure errors.  | 
  
Beta Was this translation helpful? Give feedback.
I believe https://substrate.stackexchange.com/a/1322/25 describes the root cause. Code in verifier was relying of some things happening during block import, which often is the case, but not guaranteed, resulting in rare obscure errors.