Implementation of the rolling protocol for https://github.com/pimatic/pimatic/issues/386