1

I bump into Session changes on reversion question and tried out the solution given by @bkchr, there was no unexpected epoch change error after an epoch is skipped due to finalisation getting stopped. But the thing is after an epoch is skipped I was not able to perform any extrinsics.

Steps I followed:

  • Cloned the commit mentioned in above question https://github.com/paritytech/substrate/blob/18b1fdcf984bcf87a81728e0622c5f9d33a0aa67/frame/babe/src/lib.rs#L588-L600
  • Set the epoch time to 1 minute.
  • Built it and run it on dev mode and also made its private network
  • Stopped the finalization of chain so that block production time increases.
  • After the block production time is more than epoch time didn't get unexpected epoch change error but the blocks were still producing.
  • Than I try to start the finalization by executing note_stalled but the extrisinc was not completing.
  • Than I tried other extrisincs like balance transafer and they were also not working.
  • System extrinsics are working fine such as heartbeat, and elections I can see their events in new block.

So from this my understanding is that even if the block generation does not stop the chain is still not working and we need to restart the chain from scratch, or maybe I am doing something wrong, can someone help me with this.

7
  • Why do you stop the finalization? Just stop all the nodes for one minute and then restart them. What does "not working" means for the balance transfers etc? What error do you get?
    – bkchr
    Commented Jun 13, 2023 at 14:33
  • 1
    @bkchr i didn't got any error, just transaction is not completing, so when I first got the unexpected epoch change error it was because of the finalization getting stopped due to which block production time increases and eventually leads to unexpected epoch change, so I replicated that and tried to start the finalization again through note_stalled but the transaction did not add in the block but remains in the transaction pool Commented Jun 14, 2023 at 5:36
  • I just tried this locally with Substrate. Started the node, let it produce some blocks. Then I took it offline. Brought back the node after there was more than one session without a block. It continued producing blocks and I could also send transactions.
    – bkchr
    Commented Jun 14, 2023 at 12:02
  • 1
    Yes @bkchr i was also able to achieve the same when nodes are going offline, just try it once when with a different approach like I did getting the finalization stopped and increase in block production time, eventually leading to skip an epcoh. Commented Jun 15, 2023 at 5:02
  • @bkchr any comments? Commented Jun 20, 2023 at 6:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.